Debug
ARM DDI 0363E
Copyright © 2009 ARM Limited. All rights reserved.
11-70
ID013010
Non-Confidential, Unrestricted Access
// Step 1. Save R0.
saved_r0 := ReadRegister(0);
// Step 2. Execute instruction MCR p15, 0, R0, c0, c1, 0 through the ITR.
ExecuteARMInstruction(0xEE (CPnum<<8) + (opc1<<21) + (CRn<<16) + CRm
+ (opc2<<5));
// Step 3. Read the value of R0 that now contains the CP register.
CP15c1 := ReadRegister(0);
// Step 4. Restore the value of R0.
WriteRegister(0, saved_r0);
return CP15c1;
}