Nios II Custom Instruction User Guide

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

6.9. C Macros for round(), fmins(), and fmaxs()

Nios II GCC cannot reliably replace calls to the following newlib floating point functions with the equivalent custom instruction, even though it has –mcustom-<operation> command-line options and pragma support for them:

  • round()
  • fmins()
  • fmaxs()

Instead, these custom instructions must be invoked directly using the __builtin_custom_* facility of GCC. system.h provides the required #define macros to invoke the custom instructions directly. The Nios II Software Build Tools automatically include this header file in your C source files.