Don't understand hardfloat vs fastmath vs neither

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using a UC3C, which has a hardware FPU. I don't know how to tell if it's being used because AS6 basically has zero information about this and compilers in general are somewhat cryptic it seems.

Attached are 3 lss files. All three were compiled using O2 and then various other flags. The comparison is between hard float, fast math, and both. I don't know how to interpret the results even after looking at a diff of the files for quite a while. Is the FPU being used or not?

I know if there are double precision variables in the code, the FPU supposedly won't be used. I'm pretty sure there no variables of type double in my code at all after searching.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

-ffast-math is not processor-specific.
Among other things, it enables optimizations that might change the semantics of the code when floating point is involved.
For example, if might compile a+b+c as b+c+a.

Iluvatar is the better part of Valar.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

skeeve wrote:
-ffast-math is not processor-specific.
Among other things, it enables optimizations that might change the semantics of the code when floating point is involved.
For example, if might compile a+b+c as b+c+a.

I see. Thanks.

I should have clarified that I'm not as interested in fast-math as I am in hard-float. I want to be sure I'm using the FPU.