+2003-06-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_register_byte): Remove.
+ (h8300h_register_byte): Remove.
+ (h8300_register_virtual_type): Remove. Substitute by...
+ (h8300_register_type): New function.
+ (h8300_extract_struct_value_address): Drop usage of h8300_register_byte.
+ (h8300h_extract_struct_value_address): Ditto.
+ (h8300_gdbarch_init): Drop calls to
+ set_gdbarch_deprecated_register_byte and
+ set_gdbarch_deprecated_register_virtual_type.
+ Add call to set_gdbarch_register_type.
+
2003-06-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Update comments on registers.
return read_memory_unsigned_integer (read_register (E_SP_REGNUM), BINWORD);
}
-static int
-h8300_register_byte (int regno)
-{
- if (regno < 0 || regno >= NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_byte: illegal register number %d", regno);
- else
- return regno * h8300_reg_size;
-}
-
-static int
-h8300h_register_byte (int regno)
-{
- if (regno < 0 || regno >= NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_byte: illegal register number %d", regno);
- else
- return regno * h8300h_reg_size;
-}
-
static struct type *
-h8300_register_virtual_type (int regno)
+h8300_register_type (struct gdbarch *gdbarch, int regno)
{
if (regno < 0 || regno >= NUM_REGS)
internal_error (__FILE__, __LINE__,
- "h8300_register_virtual_type: illegal register number %d",
+ "h8300_register_type: illegal register number %d",
regno);
else
{
h8300_extract_struct_value_address (char *regbuf)
{
return
- extract_unsigned_integer (regbuf + h8300_register_byte (E_ARG0_REGNUM),
+ extract_unsigned_integer (regbuf + h8300_reg_size * E_ARG0_REGNUM,
h8300_reg_size);
}
h8300h_extract_struct_value_address (char *regbuf)
{
return
- extract_unsigned_integer (regbuf + h8300_register_byte (E_ARG0_REGNUM),
+ extract_unsigned_integer (regbuf + h8300h_reg_size * E_ARG0_REGNUM,
h8300h_reg_size);
}
h8300hmode = 0;
set_gdbarch_num_regs (gdbarch, 13);
set_gdbarch_register_name (gdbarch, h8300_register_name);
- set_gdbarch_deprecated_register_byte (gdbarch, h8300_register_byte);
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
break;
h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 13);
set_gdbarch_register_name (gdbarch, h8300_register_name);
- set_gdbarch_deprecated_register_byte (gdbarch, h8300h_register_byte);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
break;
h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 14);
set_gdbarch_register_name (gdbarch, h8300s_register_name);
- set_gdbarch_deprecated_register_byte (gdbarch, h8300h_register_byte);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
break;
h8300hmode = 1;
set_gdbarch_num_regs (gdbarch, 18);
set_gdbarch_register_name (gdbarch, h8300sx_register_name);
- set_gdbarch_deprecated_register_byte (gdbarch, h8300h_register_byte);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
break;
set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
- set_gdbarch_deprecated_register_virtual_type (gdbarch, h8300_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, h8300_register_type);
set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);