target/arm: remove run-time semihosting checks for linux-user
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 19 Sep 2019 13:18:41 +0000 (14:18 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 27 Sep 2019 10:41:32 +0000 (11:41 +0100)
Now we do all our checking at translate time we can make cpu_loop a
little bit simpler. We also introduce a simple linux-user semihosting
test case to defend the functionality. The out-of-tree softmmu based
semihosting tests are still more comprehensive.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20190913151845.12582-6-alex.bennee@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
linux-user/arm/cpu_loop.c
linux-user/arm/target_syscall.h

index 8d65de5b9f4919a8316de4285f500ec0c5f14df6..e28c45cd4abbdb3000d7c44c72f2964dd92e310b 100644 (file)
@@ -325,9 +325,6 @@ void cpu_loop(CPUARMState *env)
 
                 if (n == ARM_NR_cacheflush) {
                     /* nop */
-                } else if (n == ARM_NR_semihosting
-                           || n == ARM_NR_thumb_semihosting) {
-                    env->regs[0] = do_arm_semihosting (env);
                 } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
                     /* linux syscall */
                     if (env->thumb || n == 0) {
index afc0772e1948d6f5af3341142cc09a6eddd3de24..f85cbdaf56ffe0b70ce3a170b66b3ec3034e2baa 100644 (file)
@@ -18,9 +18,6 @@ struct target_pt_regs {
 #define ARM_NR_set_tls   (ARM_NR_BASE + 5)
 #define ARM_NR_get_tls    (ARM_NR_BASE + 6)
 
-#define ARM_NR_semihosting       0x123456
-#define ARM_NR_thumb_semihosting  0xAB
-
 #if defined(TARGET_WORDS_BIGENDIAN)
 #define UNAME_MACHINE "armv5teb"
 #else