This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: x86 issue: unwelcome mmx instruction
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Stuart Hastings <stuart at apple dot com>, Ian Lance Taylor <iant at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, pinskia at gcc dot gnu dot org
- Date: Mon, 16 Oct 2006 14:28:25 +0200
- Subject: Re: x86 issue: unwelcome mmx instruction
- References: <51AC518F-A8FF-41CD-8163-2CC6C834ED0B@apple.com> <01DECFC5-6875-4023-B254-C507F1747E3E@apple.com> <m364gpo7i2.fsf@localhost.localdomain> <15BA92FA-BFFB-4CBD-BBEA-7DB5F09A1DA4@apple.com> <84fc9c000610160434q2b4b1a8bt536bcda27184d8da@mail.gmail.com>
On Mon, Oct 16, 2006 at 01:34:32PM +0200, Richard Guenther wrote:
> On 8/24/06, Stuart Hastings <stuart@apple.com> wrote:
> >PR 24073 had grown to two bugs; I cloned it into 28825 to track the
> >spurious MMX instruction issue, and marked my change with that PR.
[cut]
>
> PR28960 is the same problem on the 4.1 branch. So, backported, bootstrapped
> and tested on i686-pc-linux-gnu and applied.
Note that mainline still has problems problems with unsafe use of MMX
registers. Some of the testcases fail execution with -mmmx.
$ A=/mnt/sysfs/rask/cvsbuild/clean-gcc-i686/gcc
$ ${A}/xgcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../cvssrc/clean-gcc/configure
--enable-languages=c,c++,objc,obj-c++,fortran --with-arch=pentiumpro --disable-nls --with-system-zlib
Thread model: posix
gcc version 4.2.0 20061014 (experimental)
$ ${A}/xgcc -B${A}/ gcc.c-torture/execute/20050316-2.c -O2 -S -o /dev/stdout -mmmx | grep -F -e %mm -e emms
movq %mm0, -16(%ebp)
movq %mm0, -16(%ebp)
movq %mm0, -8(%ebp)
movq -24(%ebp), %mm0
movq -24(%ebp), %mm0
movq .LC2, %mm0
$ ${A}/xgcc -B${A}/ gcc.c-torture/execute/20050604-1.c -O2 -S -o /dev/stdout -mmmx | grep -F -e %mm -e emms
pxor %mm0, %mm0
movq %mm0, -56(%ebp)
$ ${A}/xgcc -B${A}/ gcc.dg/builtin-apply4.c -O2 -S -o /dev/stdout -mmmx | grep -F -e %mm -e emms
movq %mm0, -40(%ebp)
movq %mm1, -32(%ebp)
movq %mm2, -24(%ebp)
movq -40(%ebp), %mm0
movq -32(%ebp), %mm1
movq -24(%ebp), %mm2
movq %mm0, -168(%ebp)
movq -168(%ebp), %mm0
Additionally, I think the MMX problem also causes this testsuite failure:
FAIL: gcc.dg/compat/vector-2 c_compat_x_tst.o-c_compat_y_tst.o execute
Finally, there's a bogus warning:
${A}/xgcc -B${A}/ gcc.c-torture/execute/20050316-2.c -O2 -S -o /dev/null
gcc.c-torture/execute/20050316-2.c: In function 'test1':
gcc.c-torture/execute/20050316-2.c:11: warning: MMX vector argument without
MMX enabled changes the ABI
--
Rask Ingemann Lambertsen