mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-09 09:25:39 +00:00
arm64: handle SP register. this fixes issue #122
This commit is contained in:
parent
4e9af41345
commit
c1dd9fbfdf
|
@ -51,6 +51,9 @@ int arm64_reg_read(struct uc_struct *uc, unsigned int regid, void *value)
|
|||
case UC_ARM64_REG_PC:
|
||||
*(uint64_t *)value = ARM_CPU(uc, mycpu)->env.pc;
|
||||
break;
|
||||
case UC_ARM64_REG_SP:
|
||||
*(int64_t *)value = ARM_CPU(uc, mycpu)->env.xregs[31];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +83,9 @@ int arm64_reg_write(struct uc_struct *uc, unsigned int regid, const void *value)
|
|||
case UC_ARM64_REG_PC:
|
||||
ARM_CPU(uc, mycpu)->env.pc = *(uint64_t *)value;
|
||||
break;
|
||||
case UC_ARM64_REG_SP:
|
||||
ARM_CPU(uc, mycpu)->env.xregs[31] = *(uint64_t *)value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue