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",
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",
- "pc", "vfp", "unique",
+ "pc", "", "unique"
};
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
alpha_cannot_fetch_register (int regno)
{
- return (regno == ALPHA_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
+ return regno == ALPHA_ZERO_REGNUM;
}
static int
alpha_cannot_store_register (int regno)
{
- return (regno == ALPHA_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
+ return regno == ALPHA_ZERO_REGNUM;
}
static int
/* Load the argument registers. */
for (i = 0; i < required_arg_regs; i++)
{
- LONGEST val;
-
- val = extract_unsigned_integer (arg_reg_buffer + i*ALPHA_REGISTER_SIZE,
- ALPHA_REGISTER_SIZE);
- regcache_cooked_write_signed (regcache, ALPHA_A0_REGNUM + i, val);
- regcache_cooked_write_signed (regcache, ALPHA_FPA0_REGNUM + i, val);
+ regcache_cooked_write (regcache, ALPHA_A0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
+ regcache_cooked_write (regcache, ALPHA_FPA0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
}
+ /* Finally, update the stack pointer. */
+ regcache_cooked_write_signed (regcache, ALPHA_SP_REGNUM, sp);
+
return sp;
}
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
{
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);
/* 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);