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: PATCH: ARM VFP test


Richard Earnshaw wrote:
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.

I'm really sorry I haven't fixed this yet. I'll get to it soon, I promise.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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