linux-user/mips: use tswap32 in elf_core_copy_regs
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
Matt Turner committed
May 21, 2026 at 14:41 UTC
75b5f0331015ad8969d26d674545e4a839cfa12d
1 file changed
+7
-7
linux-user/mips/elfload.c
+7
-7
@@ -135,16 +135,16 @@ const char *get_elf_base_platform(CPUState *cs)
135
void elf_core_copy_regs(target_elf_gregset_t *r, const CPUMIPSState *env)
136
{
137
for (int i = 1; i < ARRAY_SIZE(env->active_tc.gpr); i++) {
138
- r->pt.regs[i] = tswapl(env->active_tc.gpr[i]);
138
+ r->pt.regs[i] = tswap32(env->active_tc.gpr[i]);
139
}
140
141
r->pt.regs[26] = 0;
142
r->pt.regs[27] = 0;
143
- r->pt.lo = tswapl(env->active_tc.LO[0]);
144
- r->pt.hi = tswapl(env->active_tc.HI[0]);
145
- r->pt.cp0_epc = tswapl(env->active_tc.PC);
146
- r->pt.cp0_badvaddr = tswapl(env->CP0_BadVAddr);
147
- r->pt.cp0_status = tswapl(env->CP0_Status);
148
- r->pt.cp0_cause = tswapl(env->CP0_Cause);
143
+ r->pt.lo = tswap32(env->active_tc.LO[0]);
144
+ r->pt.hi = tswap32(env->active_tc.HI[0]);
145
+ r->pt.cp0_epc = tswap32(env->active_tc.PC);
146
+ r->pt.cp0_badvaddr = tswap32(env->CP0_BadVAddr);
147
+ r->pt.cp0_status = tswap32(env->CP0_Status);
148
+ r->pt.cp0_cause = tswap32(env->CP0_Cause);
149
}
150
#endif