linux-user: move get_sp_from_cpustate() to target_cpu.h
authorLaurent Vivier <laurent@vivier.eu>
Tue, 29 May 2018 19:42:00 +0000 (21:42 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Sun, 3 Jun 2018 23:30:44 +0000 (01:30 +0200)
Remove useless includes
Fix HPPA include guard.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180529194207.31503-9-laurent@vivier.eu>

60 files changed:
linux-user/aarch64/signal.c
linux-user/aarch64/target_cpu.h
linux-user/aarch64/target_signal.h
linux-user/alpha/signal.c
linux-user/alpha/target_cpu.h
linux-user/alpha/target_signal.h
linux-user/arm/signal.c
linux-user/arm/target_cpu.h
linux-user/arm/target_signal.h
linux-user/cris/signal.c
linux-user/cris/target_cpu.h
linux-user/cris/target_signal.h
linux-user/hppa/signal.c
linux-user/hppa/target_cpu.h
linux-user/hppa/target_signal.h
linux-user/i386/signal.c
linux-user/i386/target_cpu.h
linux-user/i386/target_signal.h
linux-user/m68k/signal.c
linux-user/m68k/target_cpu.h
linux-user/m68k/target_signal.h
linux-user/microblaze/signal.c
linux-user/microblaze/target_cpu.h
linux-user/microblaze/target_signal.h
linux-user/mips/signal.c
linux-user/mips/target_cpu.h
linux-user/mips/target_signal.h
linux-user/mips64/target_signal.h
linux-user/nios2/signal.c
linux-user/nios2/target_cpu.h
linux-user/nios2/target_signal.h
linux-user/openrisc/signal.c
linux-user/openrisc/target_cpu.h
linux-user/openrisc/target_signal.h
linux-user/ppc/signal.c
linux-user/ppc/target_cpu.h
linux-user/ppc/target_signal.h
linux-user/qemu.h
linux-user/riscv/signal.c
linux-user/riscv/target_cpu.h
linux-user/riscv/target_signal.h
linux-user/s390x/signal.c
linux-user/s390x/target_cpu.h
linux-user/s390x/target_signal.h
linux-user/sh4/signal.c
linux-user/sh4/target_cpu.h
linux-user/sh4/target_signal.h
linux-user/signal.c
linux-user/sparc/signal.c
linux-user/sparc/target_cpu.h
linux-user/sparc/target_signal.h
linux-user/sparc64/target_signal.h
linux-user/syscall_defs.h
linux-user/tilegx/signal.c
linux-user/tilegx/target_cpu.h
linux-user/tilegx/target_signal.h
linux-user/x86_64/target_signal.h
linux-user/xtensa/signal.c
linux-user/xtensa/target_cpu.h
linux-user/xtensa/target_signal.h

index f95dc61dfb9fce9c63e39e2c12baef0cb886bb11..07fedfc33cac3ea13a1cfa168c163b89fb23d288 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 777ce29f16c099f150b2d182e06020a8fa6c0325..a021c95fa418ff6bd543417c42b59a7f4324e758 100644 (file)
@@ -35,4 +35,8 @@ static inline void cpu_set_tls(CPUARMState *env, target_ulong newtls)
     env->cp15.tpidr_el[0] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
+{
+   return state->xregs[31];
+}
 #endif
index 0b7ae25120b79c1979105ef9ea0539645e3bf445..18599b14472d9b428b866f0e4cb8ba1a7a605180 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef AARCH64_TARGET_SIGNAL_H
 #define AARCH64_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_SIGSTKSZ 8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
-{
-   return state->xregs[31];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* AARCH64_TARGET_SIGNAL_H */
index f24de02c6f01c90fd8c3905e3d78a74e0ecb5004..c5c27ce0841928b0faeb1356b7fca755d8f379f5 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index ad124da7c0225a1a8d7b085063f2ba550c113454..ac4d255ae752ab8ebf42f6abe268ab6385b7169c 100644 (file)
@@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls)
     env->unique = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state)
+{
+    return state->ir[IR_SP];
+}
 #endif
index 4e912e1cf9a017d62b9dc0f16460f530c7b3ee4d..e6f2f04911ace7255367d3684358a6104f466bec 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef ALPHA_TARGET_SIGNAL_H
 #define ALPHA_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -22,12 +20,6 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     4096
 #define TARGET_SIGSTKSZ                16384
 
-static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state)
-{
-    return state->ir[IR_SP];
-}
-
-
 /* From <asm/gentrap.h>.  */
 #define TARGET_GEN_INTOVF      -1      /* integer overflow */
 #define TARGET_GEN_INTDIV      -2      /* integer division by zero */
index 59b5b65ed19dce7075ba62d4b8d243c85ce56fcd..b0e753801b6cc42d0be4da13639e5425cd9251e0 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index c3eb4b243d97a7e948e319977430112db3b597fc..8a3764919ad96ca8c63cc71f58abab05b7d802aa 100644 (file)
@@ -49,4 +49,8 @@ static inline target_ulong cpu_get_tls(CPUARMState *env)
     }
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
+{
+   return state->regs[13];
+}
 #endif
index d6a03ec87d1bbbaa0197b51abace90771abc04bf..f80eb0a215431b4799df3d62aa2357a5fd4b2394 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef ARM_TARGET_SIGNAL_H
 #define ARM_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ                8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
-{
-   return state->regs[13];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* ARM_TARGET_SIGNAL_H */
index 322d9db1a7ca699ae514c7159f4c306ad8260392..0b405247cf31e7b567f35ae88f40235c4f954b37 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index c43aac62f95297d0533807a136a2f4b2a1561414..23093439790c0e798b25a7fdf943b17f3996b419 100644 (file)
@@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUCRISState *env, target_ulong newtls)
     env->pregs[PR_PID] = (env->pregs[PR_PID] & 0xff) | newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUCRISState *state)
+{
+    return state->regs[14];
+}
 #endif
index 74ff2f3382ba0f74c400f149940c714b4001690f..bf404a85fd64c9448b28d86703270db1759a33a8 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef CRIS_TARGET_SIGNAL_H
 #define CRIS_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUCRISState *state)
-{
-    return state->regs[14];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* CRIS_TARGET_SIGNAL_H */
index 6e7a295aeeafcda8ea17ac1dcbd8f776a392c4b2..b6927ee67351f0cfc230b249ecb5be3de79abb33 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 7b78bbea8078fd983576abb6128ff7abcbe9f441..1c539bdbd6e9c3794caf6c0e6da9bc363a08f40a 100644 (file)
@@ -16,8 +16,8 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef ALPHA_TARGET_CPU_H
-#define ALPHA_TARGET_CPU_H
+#ifndef HPPA_TARGET_CPU_H
+#define HPPA_TARGET_CPU_H
 
 static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp)
 {
@@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)
     env->cr[27] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUHPPAState *state)
+{
+    return state->gr[30];
+}
 #endif
index f28b4bf6e8c97079e19c0eef67baeb5f56a30f73..1beae6485a2c0218ee9458d9f007f708504f34ac 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef HPPA_TARGET_SIGNAL_H
 #define HPPA_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,8 +19,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ                8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUHPPAState *state)
-{
-    return state->gr[30];
-}
 #endif /* HPPA_TARGET_SIGNAL_H */
index e9a23a2dec727d96e3ba66387670ad207389cc7b..fecb4c99c38fb51f34a2ef5d72eeee8325d88e2d 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 7fbcf9bb57ae8729e25f1dd1d69ae620cc74af3a..ece04d096675679a98f3aab1839bfeef0f1912f3 100644 (file)
@@ -45,4 +45,8 @@ static inline void cpu_set_tls(CPUX86State *env, target_ulong newtls)
 }
 #endif /* defined(TARGET_ABI32) */
 
+static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
+{
+    return state->regs[R_ESP];
+}
 #endif /* I386_TARGET_CPU_H */
index 6ad40894827278cd762064b88eeb961e0b7bdde1..8a284f4b579b0d68e8b3da3a0b6d6702e7af305f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef I386_TARGET_SIGNAL_H
 #define I386_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ                8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
-{
-    return state->regs[R_ESP];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* I386_TARGET_SIGNAL_H */
index 5dd8bb5f9940348fff4a53fcc68b70eac4fd9d34..38bd77ec1608e5a76ff57f987213ac1d9b0191d1 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index cc0bfc298e6ff048382ae5fcf4d121b7cbbb692e..611df065cac62e37f7447b2a2f89dfd04400bd1d 100644 (file)
@@ -37,4 +37,8 @@ static inline void cpu_set_tls(CPUM68KState *env, target_ulong newtls)
     ts->tp_value = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUM68KState *state)
+{
+    return state->aregs[7];
+}
 #endif
index ff303f2b3cb8c6ab447798b740b7468f873b52f0..0cf26b79e58e197b7f346395b63e38ab402da060 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef M68K_TARGET_SIGNAL_H
 #define M68K_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ        8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUM68KState *state)
-{
-    return state->aregs[7];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* M68K_TARGET_SIGNAL_H */
index fada0f14950dec057d26081c9413f9a6d58ad0d6..712ee522b2e19af4f60940e58916740f59773d9c 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 7dd979f96010cde4b370bb4b6796597f1b1b0d6e..73e139938cc64fd1998d6fb12627bf3ace58323b 100644 (file)
@@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUMBState *env, target_ulong newtls)
     env->regs[21] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUMBState *state)
+{
+    return state->regs[1];
+}
 #endif
index 9fe40482929df6fbe7f0b6947b1e86d82d80fd19..86adcc1fc963075639836fe0384f3b410d5606af 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef MICROBLAZE_TARGET_SIGNAL_H
 #define MICROBLAZE_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUMBState *state)
-{
-    return state->regs[1];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* MICROBLAZE_TARGET_SIGNAL_H */
index ed9849c7f662d8fdf9d54c076e240d68e67d27b4..6aa303ec9c164773cf0625842bba7b99a2c73237 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 2002920312c61f5ae9275fc1bbc11f75b8245616..02cf5eeff7c2015476879ff291f9c61be2dc24ba 100644 (file)
@@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUMIPSState *env, target_ulong newtls)
     env->active_tc.CP0_UserLocal = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state)
+{
+    return state->active_tc.gpr[29];
+}
 #endif
index d36f5da0a086778c8f94b48c346b8965a549ea42..5f68bd7634e93d5332413a448184ccee6df7ae65 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef MIPS_TARGET_SIGNAL_H
 #define MIPS_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,11 +19,6 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state)
-{
-    return state->active_tc.gpr[29];
-}
-
 #if defined(TARGET_ABI_MIPSO32)
 /* compare linux/arch/mips/kernel/signal.c:setup_frame() */
 #define TARGET_ARCH_HAS_SETUP_FRAME
index c074e1592fbb333b6b19ec24f5848e8a39f1d120..7fe6b2f5176206442707c43dbbae51dc101aa399 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef MIPS64_TARGET_SIGNAL_H
 #define MIPS64_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,8 +19,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state)
-{
-    return state->active_tc.gpr[29];
-}
 #endif /* MIPS64_TARGET_SIGNAL_H */
index 9a0b36e5ad20fb3c96868810a8b8876d245c3665..4985dc22126f6adc9bd92a4f785a904e0dc7bbe2 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 20ab4790a927e054bf6df07552c64cf95b6ac683..14f63338fa092417018ba8f42ba576a817d5800e 100644 (file)
@@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUNios2State *env, target_ulong newtls)
      */
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUNios2State *state)
+{
+    return state->regs[R_SP];
+}
 #endif
index f4db4d6d62da3723c6b27f68b12c4302e24fb814..1f09f1e6bba289fc910df531b44997763d69b437 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef TARGET_SIGNAL_H
 #define TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -18,8 +16,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUNios2State *state)
-{
-    return state->regs[R_SP];
-}
 #endif /* TARGET_SIGNAL_H */
index ecf2897ccd4b9bd926b85800bb98b7d7e295e984..8be0b74001e36779d11dc44495e424a87cd39dd2 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 606ad6f69581f829dbaed125cf68c37705ec25df..d1ea4506e2365c9690d9768ba887c2f401087980 100644 (file)
@@ -33,4 +33,8 @@ static inline void cpu_set_tls(CPUOpenRISCState *env, target_ulong newtls)
     cpu_set_gpr(env, 10, newtls);
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUOpenRISCState *state)
+{
+    return cpu_get_gpr(state, 1);
+}
 #endif
index 2a4e00b035fa0d4255b5d0d7d8589a3a071d4542..590383302ca9f94c99e4b3094aeb5edcf1cb8b8e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef OPENRISC_TARGET_SIGNAL_H
 #define OPENRISC_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -18,8 +16,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUOpenRISCState *state)
-{
-    return cpu_get_gpr(state, 1);
-}
 #endif /* OPENRISC_TARGET_SIGNAL_H */
index cacc9afb5a1fd807027add71772e7e73b6ce80a8..ef4c518f111928852e4bd16dbae422eebc1f592e 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 3aab3d185da45c9509324cece4dd174cdd218be3..c4641834e79489051c851bd6a4279fab95ec0863 100644 (file)
@@ -47,5 +47,8 @@ static inline uint32_t get_ppc64_abi(struct image_info *infop)
   return infop->elf_flags & EF_PPC64_ABI;
 }
 
-
+static inline abi_ulong get_sp_from_cpustate(CPUPPCState *state)
+{
+    return state->gpr[1];
+}
 #endif
index e3bf1d285611161f4eccb475ab4947af72e45b49..6f9e67e321df9334efea16847cbcfba9ea2c42a7 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef PPC_TARGET_SIGNAL_H
 #define PPC_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,11 +19,6 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUPPCState *state)
-{
-    return state->gpr[1];
-}
-
 #if !defined(TARGET_PPC64)
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif
index c55c8e294b8b3e77fb0d074ae9291963cc0b698b..6fa1e968db35900488d6f5c822e15c942c32dc89 100644 (file)
@@ -623,7 +623,6 @@ static inline void *lock_user_string(abi_ulong guest_addr)
  * above, so include them last.
  */
 #include "target_cpu.h"
-#include "target_signal.h"
 #include "target_structs.h"
 
 #endif /* QEMU_H */
index ef599e319a10d07fafc90a2c31a7b5d2ed964e9b..f598d41891c1fb3fda317f273e14810e26a971da 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index c5549b1120c5398d5b455057f19455e53b23ba7a..7e090f376af0c476177bf8aca61fbbe9290b12c2 100644 (file)
@@ -15,4 +15,8 @@ static inline void cpu_set_tls(CPURISCVState *env, target_ulong newtls)
     env->gpr[xTP] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state)
+{
+   return state->gpr[xSP];
+}
 #endif
index 9dac002c0dce59b364e046ae1f201fc7cdd3e0b8..c7fa357008beda84f70fab73cdcfbb75c904a3c0 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef TARGET_SIGNAL_H
 #define TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 typedef struct target_sigaltstack {
     abi_ulong ss_sp;
     abi_int ss_flags;
@@ -15,8 +13,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ 2048
 #define TARGET_SIGSTKSZ 8192
 
-static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state)
-{
-   return state->gpr[xSP];
-}
 #endif /* TARGET_SIGNAL_H */
index e35cbe68700273e933f8aee65dee989fd39fa2df..3d3cb67bbe1556e6acec83e82e805b20cb2df5b5 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 87ea4d2d9bb2c4b848a848c65080ac8185610a50..66ef8aa8c27f175af7ac28da455f3a1f2b753b30 100644 (file)
@@ -36,4 +36,8 @@ static inline void cpu_set_tls(CPUS390XState *env, target_ulong newtls)
     env->aregs[1] = newtls & 0xffffffffULL;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUS390XState *state)
+{
+   return state->regs[15];
+}
 #endif
index 4e99f8fadd9f5898b1aae9af2311a5860f51e907..8f41ccf9b2b3127aedddb57e93a692f35ff9be0c 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef S390X_TARGET_SIGNAL_H
 #define S390X_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 typedef struct target_sigaltstack {
     abi_ulong ss_sp;
     int ss_flags;
@@ -18,10 +16,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ        8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUS390XState *state)
-{
-   return state->regs[15];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* S390X_TARGET_SIGNAL_H */
index 2a5378e16e8324ab7e168818440813dfe3dbe4e1..c6752baa7ee793c05fe294a80e04194bcf1c698a 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 9d305d2833634609ad19225294a6c3b5deb9f0a2..1a647ddb98526cb478156571c4db00adc39e0843 100644 (file)
@@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUSH4State *env, target_ulong newtls)
   env->gbr = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUSH4State *state)
+{
+    return state->gregs[15];
+}
 #endif
index e7b18a6db4985043707627ebe216d6b13d1322bf..2bdc24c48e4952ae9ab27eb514dd8792a5115c9e 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SH4_TARGET_SIGNAL_H
 #define SH4_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,10 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUSH4State *state)
-{
-    return state->gregs[15];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* SH4_TARGET_SIGNAL_H */
index 01de433e3a06a66accf734940295f3b7e7f98721..be2815b45da4728a58e69ad156a7f710b9f373ec 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "qemu.h"
 #include "qemu-common.h"
-#include "target_signal.h"
 #include "trace.h"
 #include "signal-common.h"
 
index 45e922f328800560edd9aa99af54975cb9919003..55e9d6f9b221e700ce3d484c90dd0a41ecb3be16 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index f2fe526204db358829c8bb26cefa589b826580f6..1ffc0ae9f2ec70bdaf55ce2c5165e3dd9186e6b2 100644 (file)
@@ -41,4 +41,15 @@ static inline void cpu_set_tls(CPUSPARCState *env, target_ulong newtls)
     env->gregs[7] = newtls;
 }
 
+#ifndef UREG_I6
+#define UREG_I6        6
+#endif
+#ifndef UREG_FP
+#define UREG_FP        UREG_I6
+#endif
+
+static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state)
+{
+    return state->regwptr[UREG_FP];
+}
 #endif
index 467abea49ef08d93f0dc9e59c2c26f1a8b40601a..bfa19bbb6723a07428ab9f2a656622dfd353b212 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SPARC_TARGET_SIGNAL_H
 #define SPARC_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,17 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     4096
 #define TARGET_SIGSTKSZ                16384
 
-#ifndef UREG_I6
-#define UREG_I6        6
-#endif
-#ifndef UREG_FP
-#define UREG_FP        UREG_I6
-#endif
-
-static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state)
-{
-    return state->regwptr[UREG_FP];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* SPARC_TARGET_SIGNAL_H */
index 14b01d9632d2f5306e9f0cd91261964f13f2f36a..1d804bfe86f24da32e64c9fa92c5ce25bc13a471 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SPARC64_TARGET_SIGNAL_H
 #define SPARC64_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,17 +19,5 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     4096
 #define TARGET_SIGSTKSZ                16384
 
-#ifndef UREG_I6
-#define UREG_I6        6
-#endif
-#ifndef UREG_FP
-#define UREG_FP        UREG_I6
-#endif
-
-static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state)
-{
-    return state->regwptr[UREG_FP];
-}
-
 #define TARGET_ARCH_HAS_SETUP_FRAME
 #endif /* SPARC64_TARGET_SIGNAL_H */
index fbf1bf995a720c357115d0026c7880b061ba8b01..85e0d870d8db2dfcff8685c635618cef938bbdae 100644 (file)
@@ -482,6 +482,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
 #define TARGET_SA_RESTORER     0x04000000
 #endif
 
+#include "target_signal.h"
+
 #ifdef TARGET_SA_RESTORER
 #define TARGET_ARCH_HAS_SA_RESTORER 1
 #endif
index d0ed3de569d0676b8b7cb454475fac47588dc99d..c5a1c7161d768b3dffefb05d285f798e6043ee05 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 4878e01b0361fee0a8fb901f5c740517cabde12b..d1aa5824f2922e5198f35e2acc77c5de9eb4eae9 100644 (file)
@@ -32,4 +32,8 @@ static inline void cpu_set_tls(CPUTLGState *env, target_ulong newtls)
     env->regs[TILEGX_R_TP] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUTLGState *state)
+{
+    return state->regs[TILEGX_R_SP];
+}
 #endif
index a74fa37aacc586fb65f685bffcfd1f8438873adf..4cb8c56adf9851a7fc09e7ea26a0ea5892bf4a22 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef TILEGX_TARGET_SIGNAL_H
 #define TILEGX_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -20,8 +18,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUTLGState *state)
-{
-    return state->regs[TILEGX_R_SP];
-}
 #endif /* TILEGX_TARGET_SIGNAL_H */
index 6b01b5acb744bcf32311cde93cbb54220d4053c5..be054d1e59e1f74a2d7546e49024ebb05306ac22 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef X86_64_TARGET_SIGNAL_H
 #define X86_64_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -21,8 +19,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ     2048
 #define TARGET_SIGSTKSZ                8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
-{
-    return state->regs[R_ESP];
-}
 #endif /* X86_64_TARGET_SIGNAL_H */
index 3e483efc618f2faddfc2a7f90ac84b975ae900e7..8d54ef3ae34bcbb60a2e61afbfdce2409d6b39a7 100644 (file)
@@ -18,7 +18,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu.h"
-#include "target_signal.h"
 #include "signal-common.h"
 #include "linux-user/trace.h"
 
index 747d82861416cde61dfd358565b20613c5ba3a71..e31efe3ea090dcb9baee7c1147d9271794d4033a 100644 (file)
@@ -19,4 +19,8 @@ static inline void cpu_set_tls(CPUXtensaState *env, target_ulong newtls)
     env->uregs[THREADPTR] = newtls;
 }
 
+static inline abi_ulong get_sp_from_cpustate(CPUXtensaState *state)
+{
+    return state->regs[1];
+}
 #endif
index 4376b2e53875f95baff31e343d971b7a79f23efc..de03c0a5642d6ce5d8409a5556e7f6c34c409fdf 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef XTENSA_TARGET_SIGNAL_H
 #define XTENSA_TARGET_SIGNAL_H
 
-#include "cpu.h"
-
 /* this struct defines a stack used during syscall handling */
 
 typedef struct target_sigaltstack {
@@ -20,8 +18,4 @@ typedef struct target_sigaltstack {
 #define TARGET_MINSIGSTKSZ    2048
 #define TARGET_SIGSTKSZ       8192
 
-static inline abi_ulong get_sp_from_cpustate(CPUXtensaState *state)
-{
-    return state->regs[1];
-}
 #endif