linux-user/s390x: Convert target_elf_gregset_t to a struct
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
a9caaa69f0
commit
f2accdfac4
1 changed files with 9 additions and 7 deletions
|
|
@ -770,7 +770,9 @@ static void elf_core_copy_regs(target_elf_gregset_t *r, const CPUM68KState *env)
|
|||
|
||||
/* See linux kernel: arch/s390/include/uapi/asm/ptrace.h (s390_regs). */
|
||||
#define ELF_NREG 27
|
||||
typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG];
|
||||
typedef struct target_elf_gregset_t {
|
||||
target_elf_greg_t regs[ELF_NREG];
|
||||
} target_elf_gregset_t;
|
||||
|
||||
enum {
|
||||
TARGET_REG_PSWM = 0,
|
||||
|
|
@ -780,22 +782,22 @@ enum {
|
|||
TARGET_REG_ORIG_R2 = 26,
|
||||
};
|
||||
|
||||
static void elf_core_copy_regs(target_elf_gregset_t *regs,
|
||||
static void elf_core_copy_regs(target_elf_gregset_t *r,
|
||||
const CPUS390XState *env)
|
||||
{
|
||||
int i;
|
||||
uint32_t *aregs;
|
||||
|
||||
(*regs)[TARGET_REG_PSWM] = tswapreg(env->psw.mask);
|
||||
(*regs)[TARGET_REG_PSWA] = tswapreg(env->psw.addr);
|
||||
r->regs[TARGET_REG_PSWM] = tswapreg(env->psw.mask);
|
||||
r->regs[TARGET_REG_PSWA] = tswapreg(env->psw.addr);
|
||||
for (i = 0; i < 16; i++) {
|
||||
(*regs)[TARGET_REG_GPRS + i] = tswapreg(env->regs[i]);
|
||||
r->regs[TARGET_REG_GPRS + i] = tswapreg(env->regs[i]);
|
||||
}
|
||||
aregs = (uint32_t *)&((*regs)[TARGET_REG_ARS]);
|
||||
aregs = (uint32_t *)&(r->regs[TARGET_REG_ARS]);
|
||||
for (i = 0; i < 16; i++) {
|
||||
aregs[i] = tswap32(env->aregs[i]);
|
||||
}
|
||||
(*regs)[TARGET_REG_ORIG_R2] = 0;
|
||||
r->regs[TARGET_REG_ORIG_R2] = 0;
|
||||
}
|
||||
|
||||
#define USE_ELF_CORE_DUMP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue