PPC/GDB: handle read and write of fpscr
Although the support of this register may be uncomplete, there are no reason to prevent the debugger from reading or writing it. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
7b56516058
commit
d6478bc7e9
@ -781,7 +781,8 @@ static int cpu_gdb_write_register(CPUPPCState *env, uint8_t *mem_buf, int n)
|
|||||||
/* fpscr */
|
/* fpscr */
|
||||||
if (gdb_has_xml)
|
if (gdb_has_xml)
|
||||||
return 0;
|
return 0;
|
||||||
return 4;
|
store_fpscr(env, ldtul_p(mem_buf), 0xffffffff);
|
||||||
|
return sizeof(target_ulong);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1180,6 +1180,8 @@ void ppc_tlb_invalidate_one (CPUPPCState *env, target_ulong addr);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void store_fpscr(CPUPPCState *env, uint64_t arg, uint32_t mask);
|
||||||
|
|
||||||
static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn)
|
static inline uint64_t ppc_dump_gpr(CPUPPCState *env, int gprn)
|
||||||
{
|
{
|
||||||
uint64_t gprv;
|
uint64_t gprv;
|
||||||
|
@ -463,6 +463,11 @@ void helper_store_fpscr(CPUPPCState *env, uint64_t arg, uint32_t mask)
|
|||||||
fpscr_set_rounding_mode(env);
|
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)
|
void helper_float_check_status(CPUPPCState *env)
|
||||||
{
|
{
|
||||||
if (env->exception_index == POWERPC_EXCP_PROGRAM &&
|
if (env->exception_index == POWERPC_EXCP_PROGRAM &&
|
||||||
|
@ -7693,7 +7693,7 @@ static int gdb_set_float_reg(CPUPPCState *env, uint8_t *mem_buf, int n)
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
if (n == 32) {
|
if (n == 32) {
|
||||||
/* FPSCR not implemented */
|
helper_store_fpscr(env, ldl_p(mem_buf), 0xffffffff);
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user