On Fri, 2005-04-22 at 19:06, Mark Mitchell wrote:
I wrote this test while doing a backport of the ARM VFP functionality
to an older compiler to test that we're generating the right machine
instructions for the basic floating-point operations. The FSF
compilers pass the test, but it helped me find a couple of bugs in the
backport, so it might help prevent some going forward.
Tested on arm-none-eabi and x86_64-linux-gnu, applied on the mainline
and csl-arm-branch.
+ /* negsf2_vfp */
+ /* { dg-final { scan-assembler "fnegs" } } */
+ f1 = -f1;
This generates a failure on all the machines I've tried, because the
compiler does this with integer registers and logical operations (it's
cheaper that way).
I think changing the test to something more complex but requiring a
fnegs would fix it (something like -(f1 + f2)), but I haven't tried it
yet.