Merge pull request #1453 from scribam/reg-read-write-fpscr

unicorn_arm: add reg_read/write operations for FPSCR and FPSID
This commit is contained in:
lazymio 2022-02-13 09:02:32 +01:00 committed by GitHub
commit 05b9a021dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,6 +248,12 @@ static uc_err reg_read(CPUARMState *env, unsigned int regid, void *value)
case UC_ARM_REG_FPEXC:
*(int32_t *)value = env->vfp.xregs[ARM_VFP_FPEXC];
break;
case UC_ARM_REG_FPSCR:
*(int32_t *)value = vfp_get_fpscr(env);
break;
case UC_ARM_REG_FPSID:
*(int32_t *)value = env->vfp.xregs[ARM_VFP_FPSID];
break;
case UC_ARM_REG_IPSR:
*(int32_t *)value = v7m_mrs_xpsr(env, 5);
break;
@ -353,6 +359,12 @@ static uc_err reg_write(CPUARMState *env, unsigned int regid, const void *value)
case UC_ARM_REG_FPEXC:
env->vfp.xregs[ARM_VFP_FPEXC] = *(int32_t *)value;
break;
case UC_ARM_REG_FPSCR:
vfp_set_fpscr(env, *(int32_t *)value);
break;
case UC_ARM_REG_FPSID:
env->vfp.xregs[ARM_VFP_FPSID] = *(int32_t *)value;
break;
case UC_ARM_REG_IPSR:
v7m_msr_xpsr(env, 0b1000, 5, *(uint32_t *)value);
break;