aboutsummaryrefslogtreecommitdiff
path: root/linux-user/sparc/cpu_loop.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-02-15 19:45:07 -1000
committerLaurent Vivier <laurent@vivier.eu>2023-03-10 20:45:47 +0100
commitd6b036378004c27579aa68bf0174e4e8fbfff726 (patch)
tree3b39607a322118deb5e462d7b4118477f65b8786 /linux-user/sparc/cpu_loop.c
parent6f772241e6d0b154c4a99c8f4c55e9ebe5173a09 (diff)
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>
Diffstat (limited to 'linux-user/sparc/cpu_loop.c')
-rw-r--r--linux-user/sparc/cpu_loop.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index 2bcf32590f..edbc4f3bdc 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -213,25 +213,24 @@ void cpu_loop (CPUSPARCState *env)
env->npc = env->npc + 4;
break;
- case TARGET_TT_SPILL: /* window overflow */
- save_window(env);
- break;
- case TARGET_TT_FILL: /* window underflow */
- restore_window(env);
- break;
-
#ifdef TARGET_SPARC64
-#ifndef TARGET_ABI32
- case 0x16e:
+ case TT_TRAP + 0x6e:
flush_windows(env);
sparc64_get_context(env);
break;
- case 0x16f:
+ case TT_TRAP + 0x6f:
flush_windows(env);
sparc64_set_context(env);
break;
#endif
-#endif
+
+ case TARGET_TT_SPILL: /* window overflow */
+ save_window(env);
+ break;
+ case TARGET_TT_FILL: /* window underflow */
+ restore_window(env);
+ break;
+
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;