Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

9.5.4.1.1. When to Use the Unimplemented Instruction Handler

You do not normally need the unimplemented instruction handler, because the HAL includes software emulation for unimplemented instructions from its run-time libraries if you are compiling for a Nios® II processor that does not support the instructions.

You might need the unimplemented instruction handler under the following circumstances:

  • You are running a Nios® II program on an implementation of the Nios® II processor other than the one you compiled for. The best solution is to build your program for the correct Nios® II processor implementation. Resort to the unimplemented instruction handler only if it is not possible to determine the processor implementation at compile time.
  • You have assembly language code that uses an implementation-dependent instruction.

If unimplemented instruction emulation is disabled, but the processor encounters an unimplemented instruction, the software exception funnel treats the exception as a miscellaneous exception.

For more information about miscellaneous exceptions, refer to the “Miscellaneous Exceptions” chapter.

Otherwise, if instruction emulation is not enabled, this logic is omitted.