Skip to main content

IAR Embedded Workbench for RX 5.20

Summary of intrinsic functions

In this section:

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

__as_get_base

Creates a pointer of the same type as the parameter, representing the base of the area pointed to by the parameter. See Compiler and linker reference for C-RUN.

__as_get_bounds

Creates a pointer of the same type as the parameter, representing the upper bound of the area pointed to by the parameter. See Compiler and linker reference for C-RUN.

__as_make_bounds

Creates a pointer with bounds information. See Compiler and linker reference for C-RUN.

__atan2fx

Calculates the arctangent, using the TFU (fixed-point)

__atan2hypotf

Returns the arctangent and the hypotenuse, using the TFU

__atan2hypotfx

Calculates the arctangent and the hypotenuse at the same time, using the TFU (fixed-point)

__break

Inserts a BRK instruction

__c_base

Returns the value of the base register for constant data when ROPI is enabled

__cosfx

Calculates the cosine value using TFU (fixed-point)

__delay_cycles

Inserts No Operation (NOP) instructions to delay execution

__disable_interrupt

Disables interrupts

__enable_interrupt

Enables interrupts

__exchange

Inserts an XCHG instruction

__FSQRT

Inserts an FSQRT instruction

__get_DCMR_register

Returns the value of the DCMR register

__get_DECNT_register

Returns the value of the DECNT register

__get_DEPC_register

Returns the value of the DEPC register

__get_DPSW_register

Returns the value of the DPSW register

__get_FINTV_register

Returns the value of the FINTV register

__get_FPSW_register

Returns the value of the FPSW register

__get_interrupt_level

Returns the interrupt level

__get_interrupt_state

Returns the interrupt state

__get_interrupt_table

Returns the value of the INTB register

__get_ISP_register

Returns the value of the ISP register

__get_PSW_register

Returns the value of the PSW register

__get_return_address

Returns the return address

__get_SP

Returns the value of the stack pointer

__get_USP_register

Returns the value of the USP register

__hypotfx

Calculates the hypotenuse length using the TFU (fixed-point)

__illegal_opcode

Inserts an illegal operation code

__inline_atan2f

Returns the arctangent, using the TFU

__inline_cosf

Returns the cosine, using the TFU

__inline_hypotf

Returns the hypotenuse, using the TFU

__inline_sinf

Returns the sine, using the TFU

__macl

Executes MAC operations on 16-bit signed data vectors and returns a 32-bit value

__macw1

Executes a MAC operation on 16-bit signed data and returns a 16-bit value, rounded using the RACW #1 instruction

__macw2

Executes a MAC operation on 16-bit signed data and returns a 16-bit value, rounded using the RACW #2 instruction

__MOVCO

Inserts a MOVCO instruction

__MOVLI

Inserts a MOVLI instruction

__no_operation

Inserts a NOP instruction

__RMPA_B

Inserts an RMPA.B instruction

__RMPA_L

Inserts an RMPA.L instruction

__RMPA_W

Inserts an RMPA.W instruction

__ROUND

Inserts a ROUND instruction

__s_base

Returns the value of the base register for static data when RWPI is enabled

__set_DCMR_register

Writes a specific value to the DCMR register

__set_DECNT_register

Writes a specific value to the DECNT register

__set_DEPC_register

Writes a specific value to the DEPC register

__set_DPSW_register

Writes a specific value to the DPSW register

__set_FINTV_register

Writes a specific value to the FINTV register

__set_FPSW_register

Writes a specific value to the FPSW register

__set_interrupt_level

Sets the interrupt level

__set_interrupt_state

Restores the interrupt state

__set_interrupt_table

Writes a specific value to the INTB register

__set_ISP_register

Writes a specific value to the ISP register

__set_PSW_register

Writes a specific value to the PSW register

__set_USP_register

Writes a specific value to the USP register

__sincosf

Returns the sine and the cosine, using the TFU

__sincosfx

Calculates the sine and the cosine at the same time, using the TFU (fixed-point)

__sinfx

Calculates the sine, using the TFU (fixed-point)

__software_interrupt

Inserts an INT instruction

__wait_for_interrupt

Inserts a WAIT instruction

Table 83. Intrinsic functions summary