2002-08-15 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_do_registers_info): Make static. (mips_gdbarch_init): Insert mips_do_registers_info into gdbarch. * config/mips/tm-mips.h (DO_REGISTERS_INFO): Delete.
This commit is contained in:
parent
bcb0cc15ad
commit
bf1f5b4c04
|
@ -8,11 +8,15 @@
|
||||||
REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
|
REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
|
||||||
MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
|
MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
|
||||||
(TARGET_READ_SP): Delete.
|
(TARGET_READ_SP): Delete.
|
||||||
|
(DO_REGISTERS_INFO): Delete.
|
||||||
|
|
||||||
* mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
|
* mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
|
||||||
(mips_register_convertible, mips_register_convert_to_virtual,
|
(mips_register_convertible, mips_register_convert_to_virtual,
|
||||||
mips_register_convert_to_raw): Make static.
|
mips_register_convert_to_raw): Make static.
|
||||||
(mips_read_sp): New function.
|
(mips_read_sp): New function.
|
||||||
(mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
|
(mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
|
||||||
|
(mips_do_registers_info): Make static.
|
||||||
|
(mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
|
||||||
|
|
||||||
2002-08-15 Andrew Cagney <ac131313@redhat.com>
|
2002-08-15 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -141,12 +141,6 @@ extern const char *mips_register_name (int regnr);
|
||||||
#define PRID_REGNUM 89 /* Processor ID */
|
#define PRID_REGNUM 89 /* Processor ID */
|
||||||
#define LAST_EMBED_REGNUM 89 /* Last one */
|
#define LAST_EMBED_REGNUM 89 /* Last one */
|
||||||
|
|
||||||
/* Define DO_REGISTERS_INFO() to do machine-specific formatting
|
|
||||||
of register dumps. */
|
|
||||||
|
|
||||||
#define DO_REGISTERS_INFO(_regnum, fp) mips_do_registers_info(_regnum, fp)
|
|
||||||
extern void mips_do_registers_info (int, int);
|
|
||||||
|
|
||||||
/* Total amount of space needed to store our copies of the machine's
|
/* Total amount of space needed to store our copies of the machine's
|
||||||
register state, the array `registers'. */
|
register state, the array `registers'. */
|
||||||
|
|
||||||
|
|
|
@ -2302,11 +2302,9 @@ mips_frame_chain (struct frame_info *frame)
|
||||||
we loop forever if we see a zero size frame. */
|
we loop forever if we see a zero size frame. */
|
||||||
if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
|
if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
|
||||||
&& PROC_FRAME_OFFSET (proc_desc) == 0
|
&& PROC_FRAME_OFFSET (proc_desc) == 0
|
||||||
/* The previous frame from a sigtramp frame might be frameless
|
/* The previous frame from a sigtramp frame might be frameless
|
||||||
and have frame size zero. */
|
and have frame size zero. */
|
||||||
&& !frame->signal_handler_caller
|
&& !frame->signal_handler_caller)
|
||||||
/* Check if this is a call dummy frame. */
|
|
||||||
&& frame->pc != mips_call_dummy_address ())
|
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return get_frame_pointer (frame, proc_desc);
|
return get_frame_pointer (frame, proc_desc);
|
||||||
|
@ -3356,22 +3354,13 @@ mips_pop_frame (void)
|
||||||
if (frame->saved_regs == NULL)
|
if (frame->saved_regs == NULL)
|
||||||
FRAME_INIT_SAVED_REGS (frame);
|
FRAME_INIT_SAVED_REGS (frame);
|
||||||
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
for (regnum = 0; regnum < NUM_REGS; regnum++)
|
||||||
if (regnum != SP_REGNUM && regnum != PC_REGNUM
|
{
|
||||||
&& frame->saved_regs[regnum])
|
if (regnum != SP_REGNUM && regnum != PC_REGNUM
|
||||||
{
|
&& frame->saved_regs[regnum])
|
||||||
/* Floating point registers must not be sign extended,
|
write_register (regnum,
|
||||||
in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */
|
read_memory_integer (frame->saved_regs[regnum],
|
||||||
|
MIPS_SAVED_REGSIZE));
|
||||||
if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32)
|
}
|
||||||
write_register (regnum,
|
|
||||||
read_memory_unsigned_integer (frame->saved_regs[regnum],
|
|
||||||
MIPS_SAVED_REGSIZE));
|
|
||||||
else
|
|
||||||
write_register (regnum,
|
|
||||||
read_memory_integer (frame->saved_regs[regnum],
|
|
||||||
MIPS_SAVED_REGSIZE));
|
|
||||||
}
|
|
||||||
|
|
||||||
write_register (SP_REGNUM, new_sp);
|
write_register (SP_REGNUM, new_sp);
|
||||||
flush_cached_frames ();
|
flush_cached_frames ();
|
||||||
|
|
||||||
|
@ -3739,7 +3728,7 @@ do_gp_register_row (int regnum)
|
||||||
|
|
||||||
/* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
|
/* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
|
||||||
|
|
||||||
void
|
static void
|
||||||
mips_do_registers_info (int regnum, int fpregs)
|
mips_do_registers_info (int regnum, int fpregs)
|
||||||
{
|
{
|
||||||
if (regnum != -1) /* do one specified register */
|
if (regnum != -1) /* do one specified register */
|
||||||
|
@ -4098,28 +4087,15 @@ return_value_location (struct type *valtype,
|
||||||
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
|
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
|
||||||
&& len < MIPS_SAVED_REGSIZE)
|
&& len < MIPS_SAVED_REGSIZE)
|
||||||
{
|
{
|
||||||
if ((gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N32
|
/* "un-left-justify" the value in the low register */
|
||||||
|| gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N64)
|
lo->reg_offset = MIPS_SAVED_REGSIZE - len;
|
||||||
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|
|
||||||
|| TYPE_CODE (valtype) == TYPE_CODE_UNION))
|
|
||||||
{
|
|
||||||
/* Values are already aligned in the low register. */
|
|
||||||
lo->reg_offset = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* "un-left-justify" the value in the low register */
|
|
||||||
lo->reg_offset = MIPS_SAVED_REGSIZE - len;
|
|
||||||
}
|
|
||||||
hi->reg_offset = 0;
|
|
||||||
lo->len = len;
|
lo->len = len;
|
||||||
|
hi->reg_offset = 0;
|
||||||
hi->len = 0;
|
hi->len = 0;
|
||||||
}
|
}
|
||||||
else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
|
else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
|
||||||
&& len > MIPS_SAVED_REGSIZE /* odd-size structs */
|
&& len > MIPS_SAVED_REGSIZE /* odd-size structs */
|
||||||
&& len < MIPS_SAVED_REGSIZE * 2
|
&& len < MIPS_SAVED_REGSIZE * 2
|
||||||
&& gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N32
|
|
||||||
&& gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N64
|
|
||||||
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT ||
|
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT ||
|
||||||
TYPE_CODE (valtype) == TYPE_CODE_UNION))
|
TYPE_CODE (valtype) == TYPE_CODE_UNION))
|
||||||
{
|
{
|
||||||
|
@ -4957,7 +4933,6 @@ mips_gdbarch_init (struct gdbarch_info info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef MIPS_DEFAULT_ABI
|
|
||||||
#ifdef MIPS_DEFAULT_ABI
|
#ifdef MIPS_DEFAULT_ABI
|
||||||
if (mips_abi == MIPS_ABI_UNKNOWN)
|
if (mips_abi == MIPS_ABI_UNKNOWN)
|
||||||
mips_abi = MIPS_DEFAULT_ABI;
|
mips_abi = MIPS_DEFAULT_ABI;
|
||||||
|
@ -5238,7 +5213,7 @@ mips_gdbarch_init (struct gdbarch_info info,
|
||||||
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
|
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
|
||||||
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
|
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
|
||||||
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
|
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
|
||||||
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
|
set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
|
||||||
set_gdbarch_register_convert_to_virtual (gdbarch,
|
set_gdbarch_register_convert_to_virtual (gdbarch,
|
||||||
mips_register_convert_to_virtual);
|
mips_register_convert_to_virtual);
|
||||||
set_gdbarch_register_convert_to_raw (gdbarch,
|
set_gdbarch_register_convert_to_raw (gdbarch,
|
||||||
|
@ -5264,6 +5239,8 @@ mips_gdbarch_init (struct gdbarch_info info,
|
||||||
define REGISTER_VIRTUAL_TYPE. */
|
define REGISTER_VIRTUAL_TYPE. */
|
||||||
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
|
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
|
||||||
|
|
||||||
|
set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info);
|
||||||
|
|
||||||
/* Hook in OS ABI-specific overrides, if they have been registered. */
|
/* Hook in OS ABI-specific overrides, if they have been registered. */
|
||||||
gdbarch_init_osabi (info, gdbarch, osabi);
|
gdbarch_init_osabi (info, gdbarch, osabi);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue