Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__arm_rsr, __arm_rsr64, __arm_rsrp

In this section:
Syntax
unsigned int __arm_rsr(sys_reg special_register);
unsigned long long __arm_rsr64(__sys_reg special_register);
void * __arm_rsrp(sys_reg special_register);
Parameters

special_register

A string literal specifying a register.

Description

Reads a system register. Use a string literal to specify which register to read. For __arm_rsr and __arm_rsrp, the string literal can specify the name of a system register accepted in an MRS or VMRS instruction for the architecture specified by the compiler option ‑‑cpu.

For __arm_rsr and __arm_rsrp, the string literal can also specify a 32-bit coprocessor register, using this format:

coprocessor : opc1 :c CRn :c CRm : opc2

For __arm_rsr64, the string literal can specify a 64-bit coprocessor register using this format:

coprocessor : opc1 :c CRm

where, for both formats:

  • coprocessor is a number, c0..c15 or cp0..cp15

  • opc1 and opc2 are coprocessor-specific operation codes, 0..7

  • CRn and CRm are coprocessor registers 0..15

These intrinsic functions are defined according to the Arm C Language Extensions (ACLE).

Note

To use intrinsic functions in an application, you must include the header file(s) where they are declared, see Summary of intrinsic functions.