Merge pull request #14 from MerryMage/a32-fpscr

unicorn_arm: Allow for read/write of UC_ARM_REG_FPSCR
This commit is contained in:
Mat M 2018-09-03 16:20:00 -04:00 committed by GitHub
commit 3dc1c40462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,9 @@ int arm_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int coun
case UC_ARM_REG_FPEXC:
*(int32_t *)value = state->vfp.xregs[ARM_VFP_FPEXC];
break;
case UC_ARM_REG_FPSCR:
*(int32_t *)value = vfp_get_fpscr(state);
break;
}
}
}
@ -151,6 +154,9 @@ int arm_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, i
case UC_ARM_REG_FPEXC:
state->vfp.xregs[ARM_VFP_FPEXC] = *(int32_t *)value;
break;
case UC_ARM_REG_FPSCR:
vfp_set_fpscr(state, *(uint32_t *)value);
break;
}
}
}