qemu/linux-user/openrisc/elfload.c
Richard Henderson 611dd00a45 linux-user/openrisc: Expand target_elf_gregset_t
Make use of the fact that target_elf_gregset_t is a proper structure.
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>
2025-08-30 07:04:04 +10:00

22 lines
457 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "qemu/osdep.h"
#include "qemu.h"
#include "loader.h"
#include "target_elf.h"
const char *get_elf_cpu_model(uint32_t eflags)
{
return "any";
}
void elf_core_copy_regs(target_elf_gregset_t *r, const CPUOpenRISCState *env)
{
for (int i = 0; i < 32; i++) {
r->pt.gpr[i] = tswapal(cpu_get_gpr(env, i));
}
r->pt.pc = tswapal(env->pc);
r->pt.sr = tswapal(cpu_get_sr(env));
}