Visible to Intel only — GUID: lro1432145356178
Ixiasoft
Visible to Intel only — GUID: lro1432145356178
Ixiasoft
6.8. Nios II FPH2 and the Newlib Library
The Nios II SBT include the newlib library (C and math) in precompiled and source versions. However, the precompiled newlib libraries are not recommended for FPH2.
You should compile newlib from source code with individual –mcustom-<operation> options, selected to match your hardware configuration. This allows newlib to incorporate the benefits of all FPH2 operations that can be inferred by GCC. If you use the Nios II software build tools, the BSP generator takes care of this for you.
The newlib isgreater(), isgreaterequal(), isless(), islessequal(), and islessgreater macros defined in math.h use the normal comparison operators (such as. < and >=), so these macros automatically use the FPH2 comparison operations.
The newlib fmaxf() and fminf() functions return the maximum or minimum numeric value of their arguments. NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the functions return the numeric value. The FPH2 fmaxs() and fmins() operations match this behavior.