Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__arm_wsr, __arm_wsr64, __arm_wsrp

In this section:
Syntax
void __arm_wsr(const char * special_reg, _uint32_t value);
void __arm_wsr64(const char * special_reg, uint64_t value);
void __arm_wsrp(const char * special_reg, const void * value);
Parameters

special_reg

A string literal specifying a system register.

value

The value to write to the system register.

Description

Writes to a system register. Use a string literal to specify which register to write to. For __arm_wsr and __arm_wsrp, the string literal can specify the name of a system register accepted in an MSR or VMSR instruction for the architecture specified by the compiler option ‑‑cpu.

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

coprocessor : opc1 :c CRn :c CRm : opc2

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

coprocessor : opc1 :c CRm

where, for both formats:

  • coprocessor is the coprocessor number, cp0..cp15 or p0..p15

  • 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 ACLE (Arm C Language Extensions). For more details, see the ACLE documentation at developer.arm.com.

Note

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