mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
gdb/csky return type int32 for float and vector pseudo regs
When reg_nr is one of the float and vector pseudo registers, return builtin_type (gdbarch)->builtin_int32 for it.
This commit is contained in:
@ -700,6 +700,17 @@ csky_vector_type (struct gdbarch *gdbarch)
|
|||||||
static struct type *
|
static struct type *
|
||||||
csky_register_type (struct gdbarch *gdbarch, int reg_nr)
|
csky_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||||
{
|
{
|
||||||
|
int num_regs = gdbarch_num_regs (gdbarch);
|
||||||
|
csky_gdbarch_tdep *tdep
|
||||||
|
= gdbarch_tdep<csky_gdbarch_tdep> (gdbarch);
|
||||||
|
|
||||||
|
if (tdep->fv_pseudo_registers_count)
|
||||||
|
{
|
||||||
|
if ((reg_nr >= num_regs)
|
||||||
|
&& (reg_nr < (num_regs + tdep->fv_pseudo_registers_count)))
|
||||||
|
return builtin_type (gdbarch)->builtin_int32;
|
||||||
|
}
|
||||||
|
|
||||||
/* If type has been described in tdesc-xml, use it. */
|
/* If type has been described in tdesc-xml, use it. */
|
||||||
if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
|
if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user