mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
linux-user/loongarch64: Use traps to track LSX/LASX usage
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231101030816.2353416-2-gaosong@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
1d832c19db
commit
91ffd93be6
2 changed files with 13 additions and 11 deletions
|
@ -72,6 +72,19 @@ void cpu_loop(CPULoongArchState *env)
|
|||
case EXCCODE_BCE:
|
||||
force_sig_fault(TARGET_SIGSYS, TARGET_SI_KERNEL, env->pc);
|
||||
break;
|
||||
|
||||
/*
|
||||
* Begin with LSX and LASX disabled, then enable on the first trap.
|
||||
* In this way we can tell if the unit is in use. This is used to
|
||||
* choose the layout of any signal frame.
|
||||
*/
|
||||
case EXCCODE_SXD:
|
||||
env->CSR_EUEN |= R_CSR_EUEN_SXE_MASK;
|
||||
break;
|
||||
case EXCCODE_ASXD:
|
||||
env->CSR_EUEN |= R_CSR_EUEN_ASXE_MASK;
|
||||
break;
|
||||
|
||||
case EXCP_ATOMIC:
|
||||
cpu_exec_step_atomic(cs);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue