* alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE

instead of ALPHA_MAX_REGISTER_RAW_SIZE.
        (supply_gregset): Likewise.
        * alpha-tdep.c (alpha_store_return_value): Likewise.
        (alpha_get_longjmp_target): Likewise.
        (alpha_register_name): Constify array.
        (alpha_gdbarch_init): Remove deprecated_fp_regnum,
        deprecated_register_size, deprecated_register_bytes,
        deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
        * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
        (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.
This commit is contained in:
Richard Henderson 2003-06-01 18:44:13 +00:00
parent 09cc52fd98
commit 5ab8487279
4 changed files with 23 additions and 23 deletions

View File

@ -1,3 +1,17 @@
2003-06-01 Richard Henderson <rth@redhat.com>
* alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE
instead of ALPHA_MAX_REGISTER_RAW_SIZE.
(supply_gregset): Likewise.
* alpha-tdep.c (alpha_store_return_value): Likewise.
(alpha_get_longjmp_target): Likewise.
(alpha_register_name): Constify array.
(alpha_gdbarch_init): Remove deprecated_fp_regnum,
deprecated_register_size, deprecated_register_bytes,
deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
* alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
(ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.
2003-06-01 Richard Henderson <rth@redhat.com>
* alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies

View File

@ -94,8 +94,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
EF_PC, -1
#endif
};
static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
{0};
static char zerobuf[ALPHA_REGISTER_SIZE] = {0};
for (regno = 0; regno < NUM_REGS; regno++)
{
@ -202,8 +201,7 @@ supply_gregset (gdb_gregset_t *gregsetp)
{
register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
{0};
static char zerobuf[ALPHA_REGISTER_SIZE] = {0};
for (regi = 0; regi < 31; regi++)
supply_register (regi, (char *) (regp + regi));

View File

@ -47,7 +47,7 @@
static const char *
alpha_register_name (int regno)
{
static char *register_names[] =
static const char * const register_names[] =
{
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
@ -61,10 +61,10 @@ alpha_register_name (int regno)
};
if (regno < 0)
return (NULL);
return NULL;
if (regno >= (sizeof(register_names) / sizeof(*register_names)))
return (NULL);
return (register_names[regno]);
return NULL;
return register_names[regno];
}
static int
@ -348,14 +348,14 @@ alpha_extract_return_value (struct type *valtype,
static void
alpha_store_return_value (struct type *valtype, char *valbuf)
{
char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
char raw_buffer[ALPHA_REGISTER_SIZE];
int regnum = ALPHA_V0_REGNUM;
int length = TYPE_LENGTH (valtype);
if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
{
regnum = FP0_REGNUM;
length = REGISTER_RAW_SIZE (regnum);
length = ALPHA_REGISTER_SIZE;
alpha_register_convert_to_raw (valtype, regnum, valbuf, raw_buffer);
}
else
@ -510,7 +510,7 @@ alpha_get_longjmp_target (CORE_ADDR *pc)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
CORE_ADDR jb_addr;
char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
char raw_buffer[ALPHA_REGISTER_SIZE];
jb_addr = read_register (ALPHA_A0_REGNUM);
@ -1243,19 +1243,13 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Register info */
set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM);
set_gdbarch_register_name (gdbarch, alpha_register_name);
set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE);
set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, alpha_register_byte);
set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
ALPHA_MAX_REGISTER_VIRTUAL_SIZE);
set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type);
set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register);

View File

@ -34,12 +34,6 @@
register state. */
#define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8)
/* Largest value REGISTER_RAW_SIZE can have. */
#define ALPHA_MAX_REGISTER_RAW_SIZE 8
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8
/* Register numbers of various important registers. Note that most of
these values are "real" register numbers, and correspond to the
general registers of the machine, and DEPRECATED_FP_REGNUM is a