From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 10 16:16:16 2013 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF861B9E for ; Tue, 10 Sep 2013 16:16:16 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2F42764 for ; Tue, 10 Sep 2013 16:16:16 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkEKAJZFL1JbsL2o/2dsb2JhbABbgwd9sCwBk0MXdIMCXzQqiD2fLKBSj3iEBwOQJIdRkWyDIjo Received: from 168.189-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.189.168]) by relay.skynet.be with ESMTP; 10 Sep 2013 18:16:09 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r8AGG8Df070088 for ; Tue, 10 Sep 2013 18:16:08 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 10 Sep 2013 18:16:01 +0200 From: Tijl Coosemans To: toolchain@FreeBSD.org Subject: i386 clang optimisation problem with stack alignment Message-ID: <20130910181601.2e89af87@kalimero.tijl.coosemans.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/gEVVo3ItF0VCrtW6P+SuGFL"; protocol="application/pgp-signature" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2013 16:16:17 -0000 --Sig_/gEVVo3ItF0VCrtW6P+SuGFL Content-Type: multipart/mixed; boundary="MP_/OBal1sZBrqwL6nV1BuLfBxk" --MP_/OBal1sZBrqwL6nV1BuLfBxk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I've attached a small test program extracted from multimedia/gstreamer-ffmp= eg (libavcodec/h264_cabac.c:ff_h264_init_cabac_states(H264Context *h)). When you compile and run it like this on FreeBSD/i386, it results in a SIGBUS: % cc -o paddd paddd.c -O3 -msse2 -fPIE -fomit-frame-pointer=20 % ./paddd Bus error The reason is this instruction where %esp isn't 16-byte aligned: paddd (%esp), %xmm7 Is this an upstream bug or is this because of local changes (to make the stack 4 byte aligned by default or something)? --MP_/OBal1sZBrqwL6nV1BuLfBxk-- --Sig_/gEVVo3ItF0VCrtW6P+SuGFL Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iF4EAREIAAYFAlIvRccACgkQfoCS2CCgtit/jgD/a+S+G3cvtUtMLnJWPjsPmvdB zvkRsr9B64VuWVEPsOAA/jDa4txTanfzio69/H3qHv0aeTJe9MXR2PsNgAuAne0b =iiie -----END PGP SIGNATURE----- --Sig_/gEVVo3ItF0VCrtW6P+SuGFL--