Skip to main content

IAR Embedded Workbench for RL78 5.20

Summary of intrinsic functions

In this section:

The intrinsic functions provide direct access to low-level processor operations and can be very useful in, for example, time-critical routines. The intrinsic functions compile into inline code, either as a single instruction or as a short sequence of instructions.

To use intrinsic functions in an application, include the header file intrinsics.h.

Note that the intrinsic function names start with double underscores, for example:

__disable_interrupt

This table summarizes the intrinsic functions:

Intrinsic function

Description

__break

Inserts a BRK instruction

__disable_interrupt

Disables interrupts

__enable_interrupt

Enables interrupts

__get_interrupt_level

Returns the interrupt level

__get_interrupt_state

Returns the interrupt state

__halt

Inserts a halt/no-operation instruction pair

__mach

Inserts a MACH instruction (S3 core)

__machu

Inserts a MACHU instruction (S3 core)

__no_operation

Inserts a NOP instruction

__rol1b

Rotates a char value one step left

__rol1w

Rotates a short value one step left

__ror1b

Rotates a char value one step right

__ror1w

Rotates a short value one step right

__set_interrupt_level

Sets the interrupt level

__set_interrupt_state

Restores the interrupt state

__stop

Inserts a STOP instruction

Table 83. Intrinsic functions summary