diff mbox series

[v2,066/108] linux-user: Split out arch_prctl

Message ID 20180610030220.3777-67-richard.henderson@linaro.org
State New
Headers show
Series linux-user: Split do_syscall | expand

Commit Message

Richard Henderson June 10, 2018, 3:01 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 linux-user/syscall.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ee3a31f06d..e3765069ab 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7680,6 +7680,17 @@  IMPL(alarm)
 }
 #endif
 
+#ifdef TARGET_NR_arch_prctl
+IMPL(arch_prctl)
+{
+# if defined(TARGET_I386) && !defined(TARGET_ABI32)
+    return do_arch_prctl(cpu_env, arg1, arg2);
+# else
+#  error unreachable
+# endif
+}
+#endif
+
 #ifdef TARGET_NR_bind
 IMPL(bind)
 {
@@ -11118,14 +11129,6 @@  static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1,
     void *p;
 
     switch(num) {
-#ifdef TARGET_NR_arch_prctl
-    case TARGET_NR_arch_prctl:
-#if defined(TARGET_I386) && !defined(TARGET_ABI32)
-        return do_arch_prctl(cpu_env, arg1, arg2);
-#else
-#error unreachable
-#endif
-#endif
 #ifdef TARGET_NR_pread64
     case TARGET_NR_pread64:
         if (regpairs_aligned(cpu_env, num)) {
@@ -12961,6 +12964,9 @@  static impl_fn *syscall_table(unsigned num)
 #ifdef TARGET_NR_alarm
         SYSCALL(alarm);
 #endif
+#ifdef TARGET_NR_arch_prctl
+        SYSCALL(arch_prctl);
+#endif
 #ifdef TARGET_NR_bind
         SYSCALL(bind);
 #endif