x86 issue: unwelcome mmx instruction

Rask Ingemann Lambertsen rask@sygehus.dk
Mon Oct 16 15:26:00 GMT 2006


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



More information about the Gcc-patches mailing list