Skip to contentSkip to conversation

linux-user: Add ARM get_tls syscall support

PATCH In review Christophe Lyon 2 participants 2 messages Apr 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Add ARM get_tls syscall support

linux-user/arm/target_syscall.h +1 -0
index 94e2a42..afc0772 100644
@@ -16,6 +16,7 @@ struct target_pt_regs {
 #define ARM_NR_breakpoint (ARM_NR_BASE + 1)
 #define ARM_NR_cacheflush (ARM_NR_BASE + 2)
 #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
linux-user/main.c +3 -0
index 8907a84..2acac36 100644
@@ -720,6 +720,9 @@ void cpu_loop(CPUARMState *env)
                         case ARM_NR_breakpoint:
                             env->regs[15] -= env->thumb ? 2 : 4;
                             goto excp_debug;
+                        case ARM_NR_get_tls:
+                            env->regs[0] = cpu_get_tls(env);
+                            break;
                         default:
                             gemu_log("qemu: Unsupported ARM syscall: 0x%x\n",
                                      n);
Signature · 1 line
2.6.3