[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 21/39] target-ppc: gdbstub: fix float registers for lit
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 21/39] target-ppc: gdbstub: fix float registers for little-endian guests |
Date: |
Fri, 29 Jan 2016 16:06:53 +1100 |
From: Greg Kurz <address@hidden>
Let's reuse the ppc_maybe_bswap_register() helper, like we already do
with the general registers.
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/translate_init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 4c61525..26b9b67 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8755,10 +8755,12 @@ static int gdb_get_float_reg(CPUPPCState *env, uint8_t
*mem_buf, int n)
{
if (n < 32) {
stfq_p(mem_buf, env->fpr[n]);
+ ppc_maybe_bswap_register(env, mem_buf, 8);
return 8;
}
if (n == 32) {
stl_p(mem_buf, env->fpscr);
+ ppc_maybe_bswap_register(env, mem_buf, 4);
return 4;
}
return 0;
@@ -8767,10 +8769,12 @@ static int gdb_get_float_reg(CPUPPCState *env, uint8_t
*mem_buf, int n)
static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
{
if (n < 32) {
+ ppc_maybe_bswap_register(env, mem_buf, 8);
env->fpr[n] = ldfq_p(mem_buf);
return 8;
}
if (n == 32) {
+ ppc_maybe_bswap_register(env, mem_buf, 4);
helper_store_fpscr(env, ldl_p(mem_buf), 0xffffffff);
return 4;
}
--
2.5.0
- [Qemu-ppc] [PULL 11/39] ppc: Clean up error handling in ppc_set_compat(), (continued)
- [Qemu-ppc] [PULL 11/39] ppc: Clean up error handling in ppc_set_compat(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 14/39] pseries: Clean up error handling in spapr_vga_init(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 27/39] cuda.c: return error for unknown commands, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 22/39] target-ppc: gdbstub: introduce avr_need_swap(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 13/39] pseries: Clean up error handling in spapr_validate_node_memory(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 26/39] pseries: Allow TCG h_enter to work with hotplugged memory, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 23/39] target-ppc: gdbstub: fix altivec registers for little-endian guests, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 37/39] target-ppc: Helper to determine page size information from hpte alone, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 33/39] target-ppc: Use actual page size encodings from HPTE, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 25/39] target-ppc: gdbstub: Add VSX support, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 21/39] target-ppc: gdbstub: fix float registers for little-endian guests,
David Gibson <=
- [Qemu-ppc] [PULL 28/39] uninorth.c: add support for UniNorth kMacRISCPCIAddressSelect (0x48) register, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 20/39] target-ppc: rename and export maybe_bswap_register(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 34/39] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 32/39] target-ppc: Rework SLB page size lookup, David Gibson, 2016/01/29