linux-user/sparc: Create target_ptrace.h

Move target_pt_regs to target_ptrace.h.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-08-28 21:51:46 +10:00
parent ab2d261ab3
commit 8bb7873f28
3 changed files with 26 additions and 19 deletions

View file

@ -21,6 +21,8 @@
#include "user-internals.h"
#include "signal-common.h"
#include "linux-user/trace.h"
#include "target_ptrace.h"
/* A Sparc register window */
struct target_reg_window {

View file

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SPARC_TARGET_PTRACE_H
#define SPARC_TARGET_PTRACE_H
/* See arch/sparc/include/uapi/asm/ptrace.h. */
struct target_pt_regs {
#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
abi_ulong u_regs[16];
abi_ulong tstate;
abi_ulong pc;
abi_ulong npc;
uint32_t y;
uint32_t magic;
#else
abi_ulong psr;
abi_ulong pc;
abi_ulong npc;
abi_ulong y;
abi_ulong u_regs[16];
#endif
};
#endif /* SPARC_TARGET_PTRACE_H */

View file

@ -1,25 +1,6 @@
#ifndef SPARC_TARGET_SYSCALL_H
#define SPARC_TARGET_SYSCALL_H
#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
struct target_pt_regs {
abi_ulong u_regs[16];
abi_ulong tstate;
abi_ulong pc;
abi_ulong npc;
uint32_t y;
uint32_t magic;
};
#else
struct target_pt_regs {
abi_ulong psr;
abi_ulong pc;
abi_ulong npc;
abi_ulong y;
abi_ulong u_regs[16];
};
#endif
#ifdef TARGET_SPARC64
# define UNAME_MACHINE "sparc64"
#else