linux-user: move get_sp_from_cpustate() to target_cpu.h

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>
This commit is contained in:
Laurent Vivier
2018-06-04 01:30:44 +02:00
parent 995d2004b7
commit 9850f9f63a
60 changed files with 83 additions and 177 deletions
-1
View 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"
+4
View 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
-7
View 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 */
-1
View 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"
+4
View 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
-8
View 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 */
-1
View 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"
+4
View 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
-7
View 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 */
-1
View 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"
+4
View 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
-7
View 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 */
-1
View 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"
+6 -2
View 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
-6
View 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 */
-1
View 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"
+4
View 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 */
-7
View 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 */
-1
View 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"
+4
View 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

Some files were not shown because too many files have changed in this diff Show More