arm_reg_current() function
Returns handle to the register currently mapped to a given number. Someone must have called arm_set_cpsr() before.
Arguments
arm
This core's state and registers are used.
regnum
From 0..15 corresponding to R0..R14 and PC. Note that R0..R7 don't require mapping; you may access those as the first eight entries in the register cache. Likewise R15 (PC) doesn't need mapping; you may also access it directly. However, R8..R14, and SPSR (arm->spsr) *must* be mapped. CPSR (arm->cpsr) is also not mapped.