mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-15 06:01:58 -06:00
target/arm: Report correct syndrome for FP/SIMD traps to Hyp mode
For traps of FP/SIMD instructions to AArch32 Hyp mode, the syndrome provided in HSR has more information than is reported to AArch64. Specifically, there are extra fields TA and coproc which indicate whether the trapped instruction was FP or SIMD. Add this extra information to the syndromes we construct, and mask it out when taking the exception to AArch64. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181012144235.19646-11-peter.maydell@linaro.org
This commit is contained in:
parent
2ed08180db
commit
4be42f4013
3 changed files with 26 additions and 5 deletions
|
@ -8546,6 +8546,15 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
|
|||
case EXCP_HVC:
|
||||
case EXCP_HYP_TRAP:
|
||||
case EXCP_SMC:
|
||||
if (syn_get_ec(env->exception.syndrome) == EC_ADVSIMDFPACCESSTRAP) {
|
||||
/*
|
||||
* QEMU internal FP/SIMD syndromes from AArch32 include the
|
||||
* TA and coproc fields which are only exposed if the exception
|
||||
* is taken to AArch32 Hyp mode. Mask them out to get a valid
|
||||
* AArch64 format syndrome.
|
||||
*/
|
||||
env->exception.syndrome &= ~MAKE_64BIT_MASK(0, 20);
|
||||
}
|
||||
env->cp15.esr_el[new_el] = env->exception.syndrome;
|
||||
break;
|
||||
case EXCP_IRQ:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue