qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] linux-user/sparc: Handle "ta 5"


From: Richard Henderson
Subject: Re: [PATCH 3/4] linux-user/sparc: Handle "ta 5"
Date: Wed, 1 Feb 2023 09:49:15 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 1/31/23 14:46, Ilya Leoshkevich wrote:
GCC lowers __builtin_trap() to "ta 5", which in turn generates trap
0x105. Follow what kernel's bad_trap() is doing there.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
  linux-user/sparc/cpu_loop.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index 434c90a55f8..fa36d452a51 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -225,6 +225,9 @@ void cpu_loop (CPUSPARCState *env)
              restore_window(env);
              break;
  #ifndef TARGET_ABI32
+        case 0x105:
+            force_sig_fault(TARGET_SIGILL, ILL_ILLTRP, env->pc);
+            break;
          case 0x16e:
              flush_windows(env);
              sparc64_get_context(env);

Quite a lot of ttable{32,64}.S is missing here. We should certainly make use of TT_TRAP, instead of hard-coding 0x100 vs 0x80.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]