linux-user/sparc: Fix sparc64_{get, set}_context traps

These traps are present for sparc64 with ilp32, aka sparc32plus.
Enabling them means adjusting the defines over in signal.c,
and fixing an incorrect usage of abi_ulong when we really meant
the full register, target_ulong.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230216054516.1267305-7-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Richard Henderson 2023-02-15 19:45:07 -10:00 committed by Laurent Vivier
parent 6f772241e6
commit d6b0363780
2 changed files with 30 additions and 29 deletions

View file

@ -213,6 +213,17 @@ void cpu_loop (CPUSPARCState *env)
env->npc = env->npc + 4;
break;
#ifdef TARGET_SPARC64
case TT_TRAP + 0x6e:
flush_windows(env);
sparc64_get_context(env);
break;
case TT_TRAP + 0x6f:
flush_windows(env);
sparc64_set_context(env);
break;
#endif
case TARGET_TT_SPILL: /* window overflow */
save_window(env);
break;
@ -220,18 +231,6 @@ void cpu_loop (CPUSPARCState *env)
restore_window(env);
break;
#ifdef TARGET_SPARC64
#ifndef TARGET_ABI32
case 0x16e:
flush_windows(env);
sparc64_get_context(env);
break;
case 0x16f:
flush_windows(env);
sparc64_set_context(env);
break;
#endif
#endif
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;