unicorn_arm: add reg_read/write operations for FPSCR and FPSID

This commit is contained in:
scribam 2021-10-06 22:01:16 +02:00
parent 085ee07c73
commit 039cd50187

View File

@ -194,6 +194,12 @@ static void reg_read(CPUARMState *env, unsigned int regid, void *value)
case UC_ARM_REG_FPEXC: case UC_ARM_REG_FPEXC:
*(int32_t *)value = env->vfp.xregs[ARM_VFP_FPEXC]; *(int32_t *)value = env->vfp.xregs[ARM_VFP_FPEXC];
break; 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: case UC_ARM_REG_IPSR:
*(int32_t *)value = v7m_mrs_xpsr(env, 5); *(int32_t *)value = v7m_mrs_xpsr(env, 5);
break; break;
@ -291,6 +297,12 @@ static void reg_write(CPUARMState *env, unsigned int regid, const void *value)
case UC_ARM_REG_FPEXC: case UC_ARM_REG_FPEXC:
env->vfp.xregs[ARM_VFP_FPEXC] = *(int32_t *)value; env->vfp.xregs[ARM_VFP_FPEXC] = *(int32_t *)value;
break; 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: case UC_ARM_REG_IPSR:
v7m_msr_xpsr(env, 0b1000, 5, *(uint32_t *)value); v7m_msr_xpsr(env, 0b1000, 5, *(uint32_t *)value);
break; break;