This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/19009] Loading of FP constants into FP reg via SSE reg


------- Additional Comments From uros at kss-loka dot si  2004-12-16 13:50 -------
-finline-functions is needed to trigger the bug with -O2. 

The attached testcase should be compiled with '-O2 -march=pentium4 -mfpmath=387
-ffast-math -D__NO_MATH_INLINES -finline-functions' to get:
	...
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16(%ebp)
	fldl	-16(%ebp)
	fcomip	%st(1), %st
	je	.L23
	fld	%st(0)
	...

and:

grep xmm zero.s
        pxor    %xmm0, %xmm0
        movsd   %xmm0, -16(%ebp)
        movsd   %xmm0, -16(%ebp)
        movsd   %xmm0, -16(%ebp)
        movsd   %xmm0, -16(%ebp)

        movsd   %xmm0, 8(%edx)
        movsd   %xmm0, (%edx)

where movsds are followed by:
	fldl	-16(%ebp)

BTW: "#include <math.h> can be removed from testcase to avoid
-D__NO_MATH_INLINES. Ther result will be the same.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19009


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]