Skip to main content

IAR Embedded Workbench for RH850 3.20.x

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

__BSH

Inserts a BSH instruction

__BSW

Inserts a BSW instruction

__c_base

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

__CAXI

Inserts a CAXI instruction

__CEILF_DL

Inserts a CEILF.DL instruction

__CEILF_DUL

Inserts a CEILF.DUL instruction

__CEILF_DUW

Inserts a CEILF.DUW instruction

__CEILF_DW

Inserts a CEILF.DW instruction

__CEILF_SL

Inserts a CEILF.SL instruction

__CEILF_SUL

Inserts a CEILF.SUL instruction

__CEILF_SUW

Inserts a CEILF.SUW instruction

__CEILF_SW

Inserts a CEILF.SW instruction

__DBCP

Inserts a DBCP instruction

__DBHVTRAP

Inserts a DBHVTRAP instruction

__DBPUSH

Pushes a register set to the debug interface

__DBRET

Inserts a DBRET instruction

__DBTAG

Generates a debug tag

__DBTRAP

Inserts a DBTRAP instruction

__disable_interrupt

Disables interrupts

__DST

Inserts a DST instruction

__enable_interrupt

Enables interrupts

__EST

Inserts an EST instruction

__FLOORF_DL

Inserts a FLOORF.DL instruction

__FLOORF_DUL

Inserts a FLOORF.DUL instruction

__FLOORF_DUW

Inserts a FLOORF.DUW instruction

__FLOORF_DW

Inserts a FLOORF.DW instruction

__FLOORF_SL

Inserts a FLOORF.SL instruction

__FLOORF_SUL

Inserts a FLOORF.SUL instruction

__FLOORF_SUW

Inserts a FLOORF.SUW instruction

__FLOORF_SW

Inserts a FLOORF.SW instruction

__get_interrupt_state

Returns the interrupt state

__halt

Inserts a HALT instruction

__HSW

Inserts an HSW instruction

__LDL

Inserts an LDL instruction

__LDSR

Inserts an LDSR instruction

__MAC

Executes MAC operations on 32-bit signed data values and returns a 64-bit signed value

__MACU

Executes MAC operations on 32-bit unsigned data values and returns a 64-bit unsigned value

__MADDF

Inserts an MADDF instruction

__MSUBF

Inserts an MSUBF instruction

__NMADDF

Inserts an NMADDF instruction

__NMSUBF

Inserts an NMSUBF instruction

__no_operation

Inserts a NOP instruction

__RECIPF_D

Inserts a RECIPF.D instruction

__RECIPF_S

Inserts a RECIPF.S instruction

__RMTRAP

Inserts an RMTRAP instruction

__ROUNDF_DL

Inserts a ROUNDF.DL instruction

__ROUNDF_DUL

Inserts a ROUNDF.DUL instruction

__ROUNDF_DUW

Inserts a ROUNDF.DUW instruction

__ROUNDF_DW

Inserts a ROUNDF.DW instruction

__ROUNDF_SL

Inserts a ROUNDF.SL instruction

__ROUNDF_SUL

Inserts a ROUNDF.SUL instruction

__ROUNDF_SUW

Inserts a ROUNDF.SUW instruction

__ROUNDF_SW

Inserts a ROUNDF.SW instruction

__saturated_add

Inserts a SATADD instruction

__saturated_sub

Inserts a SATSUB instruction

__SCH0L

Inserts an SCH0L instruction

__SCH0R

Inserts an SCH0R instruction

__SCH1L

Inserts an SCH1L instruction

__SCH1R

Inserts an SCH1R instruction

__set_interrupt_state

Restores the interrupt state

__snooze

Inserts a SNOOZE instruction

__SQRTF_D

Inserts an SQRTF.D instruction

__SQRTF_S

Inserts an SQRTF.S instruction

__STC

Inserts an STC instruction

__STSR

Inserts an STSR instruction

__SYNCE

Inserts a SYNCE instruction

__SYNCI

Inserts a SYNCI instruction

__SYNCM

Inserts a SYNCM instruction

__SYNCP

Inserts a SYNCP instruction

__TLBAI

Inserts a TLBAI instruction

__TLBR

Inserts a TLBR instruction

__TLBS

Inserts a TLBS instruction

__TLBVI

Inserts a TLBVI instruction

__TLBW

Inserts a TLBW instruction

__TRNCF_DL

Inserts a TRNCF.DL instruction

__TRNCF_DUL

Inserts a TRNCF.DUL instruction

__TRNCF_DUW

Inserts a TRNCF.DUW instruction

__TRNCF_DW

Inserts a TRNCF.DW instruction

__TRNCF_SL

Inserts a TRNCF.SL instruction

__TRNCF_SUL

Inserts a TRNCF.SUL instruction

__TRNCF_SUW

Inserts a TRNCF.SUW instruction

__TRNCF_SW

Inserts a TRNCF.SW instruction

__upper_mul64

Returns the 32 most significant bits of a 64-bit multiplication of two 32-bit long values.

Table 82. Intrinsic functions summary (Continued)