Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2013 18:16:01 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        toolchain@FreeBSD.org
Subject:   i386 clang optimisation problem with stack alignment
Message-ID:  <20130910181601.2e89af87@kalimero.tijl.coosemans.org>

next in thread | raw e-mail | index | archive | help
--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130910181601.2e89af87>