Nios II Custom Instruction User Guide

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

6.6.1. FPH2 and Nios II GCC

The GCC compiler infers most FPH2 operations from C source code. The table in "Floating Point Hardware 2 Operations" lists all the operations and shows how the FPH2 are inferred.
Note: GCC does not infer newlib math functions. These functions can be replaced with their equivalent custom instruction using the __builtin_custom_* facility of GCC.
The system.h header file provides a C #define macro declaration that redefines the required newlib math functions to use the corresponding custom instruction instead.