summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbstub.c3
-rw-r--r--target-ppc/cpu.h2
-rw-r--r--target-ppc/fpu_helper.c5
-rw-r--r--target-ppc/translate_init.c2
4 files changed, 10 insertions, 2 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 43b7d4d00f..5167c64bdf 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -781,7 +781,8 @@ static int cpu_gdb_write_register(CPUPPCState *env, uint8_t *mem_buf, int n)
/* fpscr */
if (gdb_has_xml)
return 0;
- return 4;
+ store_fpscr(env, ldtul_p(mem_buf), 0xffffffff);
+ return sizeof(target_ulong);
}
}
return 0;
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 6886666d6e..9b9c784366 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -1180,6 +1180,8 @@ void ppc_tlb_invalidate_one (CPUPPCState *env, target_ulong addr);
#endif
#endif
+void store_fpscr(CPUPPCState *env, uint64_t arg, uint32_t mask);
+
static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn)
{
uint64_t gprv;
diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c
index 9d67926209..9e779eace6 100644
--- a/target-ppc/fpu_helper.c
+++ b/target-ppc/fpu_helper.c
@@ -463,6 +463,11 @@ void helper_store_fpscr(CPUPPCState *env, uint64_t arg, uint32_t mask)
fpscr_set_rounding_mode(env);
}
+void store_fpscr(CPUPPCState *env, uint64_t arg, uint32_t mask)
+{
+ helper_store_fpscr(env, arg, mask);
+}
+
void helper_float_check_status(CPUPPCState *env)
{
if (env->exception_index == POWERPC_EXCP_PROGRAM &&
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 15eebe9177..bd5033c415 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -7693,7 +7693,7 @@ static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
return 8;
}
if (n == 32) {
- /* FPSCR not implemented */
+ helper_store_fpscr(env, ldl_p(mem_buf), 0xffffffff);
return 4;
}
return 0;