Nios II Custom Instruction User Guide

ID 683242
Date 4/27/2020
Public
Document Table of Contents

6.7.3. -funsafe-math-optimizations

From the GCC documentation:
“Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards. When used at link-time, it may include libraries or startup files that change the default FPU control word or other similar optimizations.”

The -funsafe-math-optimizations option is not required, because FPH2 does not implement transcendental functions (sin(), cos(), tan(), atan(), exp(), and log()).

This option would be required if the floating point hardware implemented the transcendental functions. GCC requires this option to ensure that application code does not inadvertently use hardware accelerators that might be problematic.