};
static const char *
-sh_sh64_register_name (int reg_nr)
+sh64_register_name (int reg_nr)
{
static char *register_names[] =
{
}
static const unsigned char *
-sh_sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+sh64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
/* The BRK instruction for shmedia is
01101111 11110101 11111111 11110000
static int
translate_insn_rn (int rn, int media_mode)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
/* FIXME: this assumes that the number rn is for a not pseudo
register only. */
if (media_mode)
static int
is_media_pseudo (int rn)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- return (rn >= DR0_REGNUM
- && rn <= FV_LAST_REGNUM);
+ return (rn >= DR0_REGNUM && rn <= FV_LAST_REGNUM);
}
static int
sh64_media_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
sh64_compact_reg_base_num (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* general register N maps to general register N */
if (reg_nr >= R0_C_REGNUM
int insn_size;
int gdb_register_number;
int register_number;
- char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
+ char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
+ get_frame_base (fi));
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (deprecated_get_frame_saved_regs (fi) == NULL)
else
size = register_size (current_gdbarch, live_regnum);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer, size);
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
+ raw_buffer, size);
else
read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
raw_buffer
int len;
int argreg_size;
int fp_args[12];
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
memset (fp_args, 0, sizeof (fp_args));
int offset;
int return_register;
int len = TYPE_LENGTH (type);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
sh64_show_media_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s SR=%016llx \n",
paddr (read_register (PC_REGNUM)),
sh64_show_compact_regs (void)
{
int i;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
printf_filtered ("PC=%s \n",
paddr (read_register (PC_C_REGNUM)));
*/
/* *INDENT-ON* */
static int
-sh_sh64_register_byte (int reg_nr)
+sh64_register_byte (int reg_nr)
{
int base_regnum = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* If it is a pseudo register, get the number of the first floating
point register that is part of it. */
}
static struct type *
-sh_sh64_build_float_register_type (int high)
+sh64_build_float_register_type (int high)
{
struct type *temp;
static struct type *
sh64_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if ((reg_nr >= FP0_REGNUM
&& reg_nr <= FP_LAST_REGNUM)
|| (reg_nr >= FP0_C_REGNUM
return builtin_type_double;
else if (reg_nr >= FPP0_REGNUM
&& reg_nr <= FPP_LAST_REGNUM)
- return sh_sh64_build_float_register_type (1);
+ return sh64_build_float_register_type (1);
else if ((reg_nr >= FV0_REGNUM
&& reg_nr <= FV_LAST_REGNUM)
||(reg_nr >= FV0_C_REGNUM
&& reg_nr <= FV_LAST_C_REGNUM))
- return sh_sh64_build_float_register_type (3);
+ return sh64_build_float_register_type (3);
else if (reg_nr == FPSCR_REGNUM)
return builtin_type_int;
else if (reg_nr >= R0_C_REGNUM
}
static void
-sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
+sh64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
DOUBLEST val;
floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
from, &val);
- store_typed_floating(to, type, val);
+ store_typed_floating (to, type, val);
}
else
- error("sh64_register_convert_to_virtual called with non DR register number");
+ error ("sh64_register_convert_to_virtual called with non DR register number");
}
static void
-sh_sh64_register_convert_to_raw (struct type *type, int regnum,
+sh64_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
&val, to);
}
else
- error("sh64_register_convert_to_raw called with non DR register number");
+ error ("sh64_register_convert_to_raw called with non DR register number");
}
static void
int portion;
int offset = 0;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
+ register_size (gdbarch, base_regnum) * portion));
/* We must pay attention to the endianness. */
- sh_sh64_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch,
- reg_nr),
- temp_buffer, buffer);
+ sh64_register_convert_to_virtual (reg_nr,
+ gdbarch_register_type (gdbarch,
+ reg_nr),
+ temp_buffer, buffer);
}
+ register_size (gdbarch, base_regnum) * portion));
/* We must pay attention to the endianness. */
- sh_sh64_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch,
- reg_nr),
- temp_buffer, buffer);
+ sh64_register_convert_to_virtual (reg_nr,
+ gdbarch_register_type (gdbarch,
+ reg_nr),
+ temp_buffer, buffer);
}
else if (reg_nr >= FV0_C_REGNUM
int base_regnum, portion;
int offset;
char temp_buffer[MAX_REGISTER_SIZE];
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= DR0_REGNUM
&& reg_nr <= DR_LAST_REGNUM)
{
base_regnum = dr_reg_base_num (reg_nr);
/* We must pay attention to the endianness. */
- sh_sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
- reg_nr), reg_nr,
- buffer, temp_buffer);
-
+ sh64_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
+ reg_nr,
+ buffer, temp_buffer);
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
for (portion = 0; portion < 2; portion++)
{
/* We must pay attention to the endianness. */
- sh_sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
- reg_nr),
- reg_nr,
- buffer, temp_buffer);
+ sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
+ reg_nr),
+ reg_nr,
+ buffer, temp_buffer);
regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
sh64_do_pseudo_register (int regnum)
{
/* All the sh64-compact mode registers are pseudo registers. */
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (regnum < NUM_REGS
|| regnum >= NUM_REGS + NUM_PSEUDO_REGS_SH_MEDIA + NUM_PSEUDO_REGS_SH_COMPACT)
static void
sh_compact_do_registers_info (int regnum, int fpregs)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (regnum != -1) /* do one specified register */
{
if (*(REGISTER_NAME (regnum)) == '\0')
((SIM_SH64_NR_FP_REGS + 1) * 4)
+ (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
- set_gdbarch_register_name (gdbarch, sh_sh64_register_name);
+ set_gdbarch_register_name (gdbarch, sh64_register_name);
set_gdbarch_register_type (gdbarch, sh64_register_type);
set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
- set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh64_register_byte);
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
- set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
+ set_gdbarch_breakpoint_from_pc (gdbarch, sh64_breakpoint_from_pc);
set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));