}
}
-/* Returns the register size in unit byte. Returns 0 for an unimplemented
- register, -1 for an invalid register. */
-
-static int
-cris_register_size (int regno)
-{
- int i;
- int spec_regno;
-
- if (regno >= 0 && regno < NUM_GENREGS)
- {
- /* General registers (R0 - R15) are 32 bits. */
- return 4;
- }
- else if (regno >= NUM_GENREGS && regno < NUM_REGS)
- {
- /* Special register (R16 - R31). cris_spec_regs is zero-based.
- Adjust regno accordingly. */
- spec_regno = regno - NUM_GENREGS;
-
- /* The entries in cris_spec_regs are stored in register number order,
- which means we can shortcut into the array when searching it. */
- for (i = spec_regno; cris_spec_regs[i].name != NULL; i++)
- {
- if (cris_spec_regs[i].number == spec_regno
- && cris_spec_reg_applicable (cris_spec_regs[i]))
- /* Go with the first applicable register. */
- return cris_spec_regs[i].reg_size;
- }
- /* Special register not applicable to this CRIS version. */
- return 0;
- }
- else
- {
- /* Invalid register. */
- return -1;
- }
-}
-
/* Nonzero if regno should not be fetched from the target. This is the case
for unimplemented (size 0) and non-existant registers. */
in the saved register state. */
set_gdbarch_deprecated_register_byte (gdbarch, cris_register_offset);
- /* The length of the registers in the actual machine representation. */
- set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size);
-
- /* The length of the registers in the program's representation. */
- set_gdbarch_deprecated_register_virtual_size (gdbarch, cris_register_size);
-
set_gdbarch_register_type (gdbarch, cris_register_type);
/* Dummy frame functions. */
gdbarch_register_name_ftype *register_name;
gdbarch_register_type_ftype *register_type;
gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
- gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
- gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
int deprecated_fp_regnum;
gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
0, /* register_name */
0, /* register_type */
generic_register_byte, /* deprecated_register_byte */
- generic_register_size, /* deprecated_register_raw_size */
- generic_register_size, /* deprecated_register_virtual_size */
0, /* unwind_dummy_id */
-1, /* deprecated_fp_regnum */
0, /* deprecated_target_read_fp */
current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->deprecated_register_byte = generic_register_byte;
- current_gdbarch->deprecated_register_raw_size = generic_register_size;
- current_gdbarch->deprecated_register_virtual_size = generic_register_size;
current_gdbarch->deprecated_fp_regnum = -1;
current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
current_gdbarch->print_registers_info = default_print_registers_info;
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
/* Skip verify of register_type, has predicate */
/* Skip verify of deprecated_register_byte, has predicate */
- /* Skip verify of deprecated_register_raw_size, has predicate */
- /* Skip verify of deprecated_register_virtual_size, has predicate */
/* Skip verify of unwind_dummy_id, has predicate */
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
/* Skip verify of deprecated_target_read_fp, has predicate */
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_register_byte = <0x%lx>\n",
(long) current_gdbarch->deprecated_register_byte);
-#ifdef DEPRECATED_REGISTER_RAW_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_RAW_SIZE_P()",
- XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ()));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_deprecated_register_raw_size_p() = %d\n",
- gdbarch_deprecated_register_raw_size_p (current_gdbarch));
-#ifdef DEPRECATED_REGISTER_RAW_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)",
- XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr)));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: deprecated_register_raw_size = <0x%lx>\n",
- (long) current_gdbarch->deprecated_register_raw_size);
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_register_size = %s\n",
paddr_d (current_gdbarch->deprecated_register_size));
-#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: gdbarch_deprecated_register_virtual_size_p() = %d\n",
- gdbarch_deprecated_register_virtual_size_p (current_gdbarch));
-#ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)",
- XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr)));
-#endif
- fprintf_unfiltered (file,
- "gdbarch_dump: deprecated_register_virtual_size = <0x%lx>\n",
- (long) current_gdbarch->deprecated_register_virtual_size);
#ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
gdbarch->deprecated_register_byte = deprecated_register_byte;
}
-int
-gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_raw_size != generic_register_size;
-}
-
-int
-gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
- /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
- return gdbarch->deprecated_register_raw_size (reg_nr);
-}
-
-void
-set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
-{
- gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
-}
-
-int
-gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_register_virtual_size != generic_register_size;
-}
-
-int
-gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
- /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
- return gdbarch->deprecated_register_virtual_size (reg_nr);
-}
-
-void
-set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
- gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
-{
- gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
-}
-
int
gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
{
#define DEPRECATED_REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif
-/* If all registers have identical raw and virtual sizes and those
- sizes agree with the value computed from REGISTER_TYPE,
- DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
- registers. */
-
-#if defined (DEPRECATED_REGISTER_RAW_SIZE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_RAW_SIZE */
-#if !defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_REGISTER_RAW_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_RAW_SIZE_P)
-#define DEPRECATED_REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
-extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_RAW_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_RAW_SIZE)
-#define DEPRECATED_REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
-#endif
-
-/* If all registers have identical raw and virtual sizes and those
- sizes agree with the value computed from REGISTER_TYPE,
- DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
- registers. */
-
-#if defined (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-/* Legacy for systems yet to multi-arch DEPRECATED_REGISTER_VIRTUAL_SIZE */
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE_P)
-#define DEPRECATED_REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
-extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_VIRTUAL_SIZE"
-#endif
-#if !defined (DEPRECATED_REGISTER_VIRTUAL_SIZE)
-#define DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
-#endif
-
/* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);