Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNIOS2 HW & DIV Instructions + FPU
Hello i am in charge of designing a system that does a lot of complex sin/cos/* instructions and i need them to be fast. I am using NIOS2-F at 100mhz in a Cyclone IV. I've enabled HW and DIV ...
Altera_Forum
Honored Contributor
15 years agoHmmm... the code altera added to gcc to default FP constants to 'float' is trully borked.
The option is normally selectable as -f[no-]single-precision-constant. However, rather than set this when the -mcustom-fpu-cfg options is seen, it is done at the end of option processing so cannot be turned off from the command line. Worse still, the generation of fp custom instructions can be enabled by a pragma - this will also force single precision constants from then on! Seems tempting to rebuild the compiler with the assignment "flag_single_precision_constant = 1;" moved into the argument saving code (if not deleted completely).