linux-user/mips: Use target_ulong for target_elf_greg_t

Make use of the fact that target_elf_gregset_t is a proper structure.
The target_ulong type matches the abi_ulong/abi_ullong
selection within mips64/target_elf.h.

Drop ELF_NREG, target_elf_greg_t, and tswapreg.

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-30 07:04:04 +10:00
parent 0dcef57730
commit c61b88fbe4
3 changed files with 22 additions and 50 deletions
+6 -8
View File
@@ -8,20 +8,18 @@
#ifndef MIPS64_TARGET_ELF_H
#define MIPS64_TARGET_ELF_H
#include "target_ptrace.h"
#define HAVE_ELF_HWCAP 1
#define HAVE_ELF_BASE_PLATFORM 1
#define HAVE_ELF_CORE_DUMP 1
#ifdef TARGET_ABI_MIPSN32
typedef abi_ullong target_elf_greg_t;
#else
typedef abi_ulong target_elf_greg_t;
#endif
/* See linux kernel: arch/mips/include/asm/elf.h. */
#define ELF_NREG 45
typedef struct target_elf_gregset_t {
target_elf_greg_t regs[ELF_NREG];
union {
target_ulong reserved[45];
struct target_pt_regs pt;
};
} target_elf_gregset_t;
#endif