From 9850f9f63acb44724138a2b89b07ea4f6b3d2ba0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 29 May 2018 21:42:00 +0200 Subject: linux-user: move get_sp_from_cpustate() to target_cpu.h Remove useless includes Fix HPPA include guard. Signed-off-by: Laurent Vivier Acked-by: Richard Henderson Message-Id: <20180529194207.31503-9-laurent@vivier.eu> --- linux-user/sparc/signal.c | 1 - linux-user/sparc/target_cpu.h | 11 +++++++++++ linux-user/sparc/target_signal.h | 14 -------------- 3 files changed, 11 insertions(+), 15 deletions(-) (limited to 'linux-user/sparc') diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 45e922f..55e9d6f 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" #include "qemu.h" -#include "target_signal.h" #include "signal-common.h" #include "linux-user/trace.h" diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index f2fe526..1ffc0ae 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -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 diff --git a/linux-user/sparc/target_signal.h b/linux-user/sparc/target_signal.h index 467abea..bfa19bb 100644 --- a/linux-user/sparc/target_signal.h +++ b/linux-user/sparc/target_signal.h @@ -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 */ -- cgit v1.1