mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target-arm: Report correct syndrome for FPEXC32_EL2 traps
If access to FPEXC32_EL2 is trapped by CPTR_EL2.TFP or CPTR_EL3.TFP, this should be reported with a syndrome register indicating an FP access trap, not one indicating a system register access trap. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Sergey Fedorov <serge.fdrv@gmail.com>
This commit is contained in:
parent
d6c8cf8151
commit
f2cae60927
3 changed files with 20 additions and 2 deletions
|
@ -500,6 +500,19 @@ void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip, uint32_t syndrome,
|
|||
target_el = 3;
|
||||
syndrome = syn_uncategorized();
|
||||
break;
|
||||
case CP_ACCESS_TRAP_FP_EL2:
|
||||
target_el = 2;
|
||||
/* Since we are an implementation that takes exceptions on a trapped
|
||||
* conditional insn only if the insn has passed its condition code
|
||||
* check, we take the IMPDEF choice to always report CV=1 COND=0xe
|
||||
* (which is also the required value for AArch64 traps).
|
||||
*/
|
||||
syndrome = syn_fp_access_trap(1, 0xe, false);
|
||||
break;
|
||||
case CP_ACCESS_TRAP_FP_EL3:
|
||||
target_el = 3;
|
||||
syndrome = syn_fp_access_trap(1, 0xe, false);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue