Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by cizard@Sep 14 2006, 12:27 AM so when i write c code : a > b (where a and b are float type), assembler code do not use custom instruction (but use math library function "gtsf2" call).
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18261)
--- quote end ---
--- Quote End --- I actually had this problem running Altera's floating point profile example. If I set the project to Release mode, it would no longer use the FPU instructions. I had to modify the compiler flags via right-clicking on the project folder, selecting Properties, then C/C++ Build, the release mode, then Tool Settings/Compiler/General and set the optimization level to -O1 instead of the default of -O2. Then when I looked at the generated .s file, I saw the code written by the compiler was correct (use Compiler flag -save-temps to be able to see the generated .s file).