mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 16:45:38 +00:00
arm: allow to read CPSR register
This commit is contained in:
parent
56a7b0246c
commit
142d3a6f72
|
@ -51,6 +51,9 @@ int arm_reg_read(struct uc_struct *uc, unsigned int regid, void *value)
|
||||||
*(int32_t *)value = ARM_CPU(uc, mycpu)->env.regs[regid - UC_ARM_REG_R0];
|
*(int32_t *)value = ARM_CPU(uc, mycpu)->env.regs[regid - UC_ARM_REG_R0];
|
||||||
else {
|
else {
|
||||||
switch(regid) {
|
switch(regid) {
|
||||||
|
case UC_ARM_REG_CPSR:
|
||||||
|
*(int32_t *)value = cpsr_read(&ARM_CPU(uc, mycpu)->env);
|
||||||
|
break;
|
||||||
//case UC_ARM_REG_SP:
|
//case UC_ARM_REG_SP:
|
||||||
case UC_ARM_REG_R13:
|
case UC_ARM_REG_R13:
|
||||||
*(int32_t *)value = ARM_CPU(uc, mycpu)->env.regs[13];
|
*(int32_t *)value = ARM_CPU(uc, mycpu)->env.regs[13];
|
||||||
|
|
Loading…
Reference in a new issue