This is the mail archive of the gcc-patches@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]

Re: Fix libgfortran FMA3/FMA4 tests


Hi Rainer,

It turns out that the FMA3 and FMA4 tests in acinclude.m4 don't test
what they claim to:  if one compiles the test program

float
flt_mul_add (float a, float b, float c)
{
	return __builtin_fmaf (a, b, c);
}

with -O2 -mfma -mno-fma4 (FMA3) resp. -O2 -mfma4 -mno-fma (FMA4), both
boil done to

flt_mul_add:
         jmp     fmaf

so the test always succeeds.

The following patch fixes this by instead using the tests from
gcc.target/i386/i386.exp.  While the FMA3 test still passes with
/bin/as, the FMA4 one fails, avoiding the breakage.

Bootstrapped on i386-pc-solaris2.12 with both as and gas without
regressions.

Ok for mainline?

OK, and thanks a lot for the patch!

I hope this is the last fallout from the AMD patchess...

Regards

	Thomas


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