6.4 __arm_mrc, __arm_mrc2, __arm_mrrc, __arm_mrrc2 Intrinsic Function

Inserts a coprocessor read instruction, MRC, MRC2, MRRC, or MRRC2. Returns the value of the specified coprocessor register. The parameters coproc, opc1, opc2, CRn, and CRm will be encoded in the instruction and must therefore be constants.

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

Suggested Replacement

__builtin_arm_mrc
__builtin_arm_mrc2
__builtin_arm_mrrc
__builtin_arm_mrrc2

Caveats

None.

Examples

Consider migrating IAR code such as:
unsigned int __arm_mrc(__cpid coproc, __cpopc opc1, __cpreg CRn, __cpreg CRm, __cpopc opc2);

unsigned int __arm_mrc2(__cpid coproc, __cpopc opc1, __cpreg CRn, __cpreg CRm, __cpopc opc2); 
unsigned long long __arm_mrrc(__cpid coproc, __cpopc opc1, __cpreg CRm);

unsigned long long __arm_mrrc2(__cpid coproc, __cpopc opc1, __cpreg CRm); 
to MPLAB XC codes similar to:
unsigned int __builtin_arm_mrc(__cpid coproc, __cpopc opc1, __cpreg CRn, __cpreg CRm, __cpopc opc2);

unsigned int __builtin_arm_mrc2(__cpid coproc, __cpopc opc1, __cpreg CRn, __cpreg CRm, __cpopc opc2); 
unsigned long long __builtin_arm_mrrc(__cpid coproc, __cpopc opc1, __cpreg CRm);

unsigned long long __builtin_arm_mrrc2(__cpid coproc, __cpopc opc1, __cpreg CRm); 

Further Information

None.