Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI think I might know what's going on here. The double precision constants are being treated as single precision constants. When you include the custom instruction you get one of the following flags passed in:
-mcustom-fpu-config=60-1 (+, -, *) -mcustom-fpu-config=60-2 (+, -, *, /) These two flags boil down the the following: -mcustom-fmuls=252 –mcustom-fadds=253 –mcustom-fsubs=254 -fsingle-precision-constant -mcustom-fmuls=252 –mcustom-fadds=253 –mcustom-fsubs=254 –mcustom-divs=255 -fsingle-precision-constant The workaround would be to just manually pass these flags in for custom instructions 252-254/255 leaving out "-fsingle-precision-constant". If you use the software build tools newlib will be recompiled when you pass these flags in to include hardware support. The key thing though is that without -fsingle-prcecision-constant you should no longer see double precision constants trimmed down to single precision resolution.