2003-11-12 Michael Snyder <msnyder@redhat.com>
* sh64-tdep.c: Coding standard and spelling comment fixes. (sh64_extract_return_value): Replace deprecated_store_floating with store_typed_floating. (sh_sh64_register_convert_to_raw): Replace deprecated_store_floating with store_typed_floating. (sh_sh64_register_virtual_type): Convert to sh64_register_type. (sh64_frame_chain, sh64_get_saved_pr, sh64_get_saved_register, sh64_nofp_frame_init_saved_regs, sh64_push_arguments, sh64_extract_struct_value_address, sh64_pop_frame, sh64_extract_return_value, sh64_store_return_value, sh_sh64_register_convert_to_virtual, sh64_pseudo_register_read, sh_sh64_register_convert_to_raw, sh_pseudo_register_write): Replace DEPRECATED_REGISTER_RAW_SIZE with register_size. Replace DEPRECATED_REGISTER_VIRTUAL_TYPE with register_type. (sh64_gdbarch_init): Don't set deprecated_register_bytes, deprecated_register_virtual_type, deprecated_register_raw_size, deprecated_max_register_raw_size, or deprecated_max_register_virtual_size. Instead, just set gdbarch_register_type.
This commit is contained in:
parent
5e2d1ae86d
commit
7bb1155820
|
@ -1,3 +1,25 @@
|
|||
2003-11-12 Michael Snyder <msnyder@redhat.com>
|
||||
|
||||
* sh64-tdep.c: Coding standard and spelling comment fixes.
|
||||
(sh64_extract_return_value): Replace deprecated_store_floating
|
||||
with store_typed_floating.
|
||||
(sh_sh64_register_convert_to_raw): Replace
|
||||
deprecated_store_floating with store_typed_floating.
|
||||
(sh_sh64_register_virtual_type): Convert to sh64_register_type.
|
||||
(sh64_frame_chain, sh64_get_saved_pr, sh64_get_saved_register,
|
||||
sh64_nofp_frame_init_saved_regs, sh64_push_arguments,
|
||||
sh64_extract_struct_value_address, sh64_pop_frame,
|
||||
sh64_extract_return_value, sh64_store_return_value,
|
||||
sh_sh64_register_convert_to_virtual, sh64_pseudo_register_read,
|
||||
sh_sh64_register_convert_to_raw, sh_pseudo_register_write):
|
||||
Replace DEPRECATED_REGISTER_RAW_SIZE with register_size.
|
||||
Replace DEPRECATED_REGISTER_VIRTUAL_TYPE with register_type.
|
||||
(sh64_gdbarch_init): Don't set deprecated_register_bytes,
|
||||
deprecated_register_virtual_type, deprecated_register_raw_size,
|
||||
deprecated_max_register_raw_size, or
|
||||
deprecated_max_register_virtual_size. Instead, just set
|
||||
gdbarch_register_type.
|
||||
|
||||
2003-11-12 Daniel Jacobowitz <drow@mvista.com>
|
||||
|
||||
* dwarf2read.c (struct dwarf2_cu): New type.
|
||||
|
@ -1759,7 +1781,7 @@
|
|||
2003-09-29 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* gdbarch.sh (DEPRECATED_REGISTER_VIRTUAL_TYPE): Rename
|
||||
DEPRECATED_REGISTER_VIRTUAL_TYPE.
|
||||
REGISTER_VIRTUAL_TYPE.
|
||||
* gdbarch.h, gdbarch.c: Regenerate.
|
||||
* arch-utils.c, hppa-tdep.c, regcache.c, regcache.h: Update.
|
||||
* sh64-tdep.c, sparc-tdep.c: Update.
|
||||
|
@ -8150,7 +8172,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
|
|||
for 32-bit targets. Set extract_return_value and
|
||||
store_return_value instead.
|
||||
* config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE,
|
||||
DEPRECTAED_EXTRACT_RETURN_VALUE,
|
||||
DEPRECATED_EXTRACT_RETURN_VALUE,
|
||||
DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Don't define these.
|
||||
(STORE_RETURN_VALUE, EXTRACT_RETURN_VALUE,
|
||||
EXTRACT_STRUCT_VALUE_ADDRESS): Define these instead.
|
||||
|
|
183
gdb/sh64-tdep.c
183
gdb/sh64-tdep.c
|
@ -749,7 +749,9 @@ sh64_frame_chain (struct frame_info *frame)
|
|||
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
|
||||
size = 4;
|
||||
else
|
||||
size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode));
|
||||
size = register_size (current_gdbarch,
|
||||
translate_insn_rn (DEPRECATED_FP_REGNUM,
|
||||
media_mode));
|
||||
return read_memory_integer (get_frame_base (frame)
|
||||
+ get_frame_extra_info (frame)->f_offset,
|
||||
size);
|
||||
|
@ -766,8 +768,9 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
|
|||
for (; fi; fi = get_next_frame (fi))
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
/* When the caller requests PR from the dummy frame, we return PC because
|
||||
that's where the previous routine appears to have done a call from. */
|
||||
/* When the caller requests PR from the dummy frame, we return
|
||||
PC because that's where the previous routine appears to have
|
||||
done a call from. */
|
||||
return deprecated_read_register_dummy (get_frame_pc (fi),
|
||||
get_frame_base (fi), pr_regnum);
|
||||
else
|
||||
|
@ -783,7 +786,7 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
|
|||
int gdb_reg_num = translate_insn_rn (pr_regnum, media_mode);
|
||||
int size = ((gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
|
||||
? 4
|
||||
: DEPRECATED_REGISTER_RAW_SIZE (gdb_reg_num));
|
||||
: register_size (current_gdbarch, gdb_reg_num));
|
||||
return read_memory_integer (deprecated_get_frame_saved_regs (fi)[pr_regnum], size);
|
||||
}
|
||||
}
|
||||
|
@ -1181,8 +1184,8 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
|
|||
|
||||
/* Watch out! saved_regs is only for the real registers, and
|
||||
doesn't include space for the pseudo registers. */
|
||||
deprecated_get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth;
|
||||
|
||||
deprecated_get_frame_saved_regs (fi)[register_number]
|
||||
= get_frame_base (fi) - where[rn] + depth;
|
||||
}
|
||||
else
|
||||
deprecated_get_frame_saved_regs (fi)[register_number] = 0;
|
||||
|
@ -1201,8 +1204,10 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
|
|||
if (tdep->sh_abi == SH_ABI_32)
|
||||
size = 4;
|
||||
else
|
||||
size = DEPRECATED_REGISTER_RAW_SIZE (fp_regnum);
|
||||
deprecated_get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp_regnum], size);
|
||||
size = register_size (current_gdbarch, fp_regnum);
|
||||
deprecated_get_frame_saved_regs (fi)[sp_regnum]
|
||||
= read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp_regnum],
|
||||
size);
|
||||
}
|
||||
else
|
||||
deprecated_get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
|
||||
|
@ -1289,7 +1294,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
|||
memcpy (raw_buffer,
|
||||
(deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
|
||||
+ DEPRECATED_REGISTER_BYTE (regnum)),
|
||||
DEPRECATED_REGISTER_RAW_SIZE (regnum));
|
||||
register_size (current_gdbarch, regnum));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1302,7 +1307,9 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
|||
if (regnum == SP_REGNUM)
|
||||
{
|
||||
if (raw_buffer) /* SP register treated specially */
|
||||
store_unsigned_integer (raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum),
|
||||
store_unsigned_integer (raw_buffer,
|
||||
register_size (current_gdbarch,
|
||||
regnum),
|
||||
deprecated_get_frame_saved_regs (frame)[regnum]);
|
||||
}
|
||||
else
|
||||
|
@ -1318,13 +1325,13 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
|||
|| live_regnum == PR_REGNUM))
|
||||
size = 4;
|
||||
else
|
||||
size = DEPRECATED_REGISTER_RAW_SIZE (live_regnum);
|
||||
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);
|
||||
else
|
||||
read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
|
||||
raw_buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (live_regnum)
|
||||
+ register_size (current_gdbarch, live_regnum)
|
||||
- size,
|
||||
size);
|
||||
}
|
||||
|
@ -1348,7 +1355,8 @@ static CORE_ADDR
|
|||
sh64_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
return (extract_unsigned_integer ((regbuf + DEPRECATED_REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
|
||||
DEPRECATED_REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
|
||||
register_size (current_gdbarch,
|
||||
STRUCT_RETURN_REGNUM)));
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
|
@ -1388,8 +1396,8 @@ sh64_pop_frame (void)
|
|||
|| regnum == PR_REGNUM))
|
||||
size = 4;
|
||||
else
|
||||
size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (regnum,
|
||||
media_mode));
|
||||
size = register_size (current_gdbarch,
|
||||
translate_insn_rn (regnum, media_mode));
|
||||
write_register (regnum,
|
||||
read_memory_integer (deprecated_get_frame_saved_regs (frame)[regnum],
|
||||
size));
|
||||
|
@ -1522,7 +1530,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
|
||||
if (TYPE_CODE (type) != TYPE_CODE_FLT)
|
||||
{
|
||||
argreg_size = DEPRECATED_REGISTER_RAW_SIZE (int_argreg);
|
||||
argreg_size = register_size (current_gdbarch, int_argreg);
|
||||
|
||||
if (len < argreg_size)
|
||||
{
|
||||
|
@ -1686,7 +1694,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
else
|
||||
floatformat_to_doublest (&floatformat_ieee_double_big,
|
||||
(char *) regbuf + offset, &val);
|
||||
deprecated_store_floating (valbuf, len, val);
|
||||
store_typed_floating (valbuf, type, val);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1698,7 +1706,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
|||
return_register = DEFAULT_RETURN_REGNUM;
|
||||
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
|
||||
offset = DEPRECATED_REGISTER_BYTE (return_register) +
|
||||
DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
|
||||
register_size (current_gdbarch, return_register) - len;
|
||||
else
|
||||
offset = DEPRECATED_REGISTER_BYTE (return_register);
|
||||
memcpy (valbuf, (char *) regbuf + offset, len);
|
||||
|
@ -1739,14 +1747,15 @@ sh64_store_return_value (struct type *type, char *valbuf)
|
|||
int return_register = DEFAULT_RETURN_REGNUM;
|
||||
int offset = 0;
|
||||
|
||||
if (len <= DEPRECATED_REGISTER_RAW_SIZE (return_register))
|
||||
if (len <= register_size (current_gdbarch, return_register))
|
||||
{
|
||||
/* Pad with zeros. */
|
||||
memset (buf, 0, DEPRECATED_REGISTER_RAW_SIZE (return_register));
|
||||
memset (buf, 0, register_size (current_gdbarch, return_register));
|
||||
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
|
||||
offset = 0; /*DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;*/
|
||||
offset = 0; /*register_size (current_gdbarch,
|
||||
return_register) - len;*/
|
||||
else
|
||||
offset = DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
|
||||
offset = register_size (current_gdbarch, return_register) - len;
|
||||
|
||||
memcpy (buf + offset, valbuf, len);
|
||||
deprecated_write_register_gen (return_register, buf);
|
||||
|
@ -1837,7 +1846,7 @@ sh64_show_compact_regs (void)
|
|||
(long) read_register (FP0_REGNUM + i + 7));
|
||||
}
|
||||
|
||||
/*FIXME!!! This only shows the registers for shmedia, excluding the
|
||||
/* FIXME!!! This only shows the registers for shmedia, excluding the
|
||||
pseudo registers. */
|
||||
void
|
||||
sh64_show_regs (void)
|
||||
|
@ -2003,41 +2012,6 @@ sh_sh64_register_byte (int reg_nr)
|
|||
+ (reg_nr - FP0_REGNUM + 1) * 4);
|
||||
}
|
||||
|
||||
static int
|
||||
sh_sh64_register_raw_size (int reg_nr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||
|
||||
if ((reg_nr >= DR0_REGNUM
|
||||
&& reg_nr <= DR_LAST_REGNUM)
|
||||
|| (reg_nr >= FPP0_REGNUM
|
||||
&& reg_nr <= FPP_LAST_REGNUM)
|
||||
|| (reg_nr >= DR0_C_REGNUM
|
||||
&& reg_nr <= DR_LAST_C_REGNUM)
|
||||
|| (reg_nr <= TR7_REGNUM))
|
||||
return 8;
|
||||
|
||||
else if ((reg_nr >= FV0_REGNUM
|
||||
&& reg_nr <= FV_LAST_REGNUM)
|
||||
|| (reg_nr >= FV0_C_REGNUM
|
||||
&& reg_nr <= FV_LAST_C_REGNUM))
|
||||
return 16;
|
||||
|
||||
else /* this covers also the 32-bit SH compact registers. */
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* ??????? FIXME */
|
||||
static int
|
||||
sh_sh64_register_virtual_size (int reg_nr)
|
||||
{
|
||||
if (reg_nr >= FP0_REGNUM
|
||||
&& reg_nr <= FP_LAST_REGNUM)
|
||||
return 4;
|
||||
else
|
||||
return 8;
|
||||
}
|
||||
|
||||
static struct type *
|
||||
sh_sh64_build_float_register_type (int high)
|
||||
{
|
||||
|
@ -2047,8 +2021,10 @@ sh_sh64_build_float_register_type (int high)
|
|||
return create_array_type (NULL, builtin_type_float, temp);
|
||||
}
|
||||
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register REG_NR. */
|
||||
static struct type *
|
||||
sh_sh64_register_virtual_type (int reg_nr)
|
||||
sh64_register_type (struct gdbarch *gdbarch, int reg_nr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||
|
||||
|
@ -2088,7 +2064,7 @@ sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
|
|||
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
|
||||
{
|
||||
/* It is a no-op. */
|
||||
memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
|
||||
memcpy (to, from, register_size (current_gdbarch, regnum));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2098,11 +2074,12 @@ sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
|
|||
&& regnum <= DR_LAST_C_REGNUM))
|
||||
{
|
||||
DOUBLEST val;
|
||||
floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, from, &val);
|
||||
deprecated_store_floating(to, TYPE_LENGTH(type), val);
|
||||
floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
|
||||
from, &val);
|
||||
store_typed_floating(to, type, val);
|
||||
}
|
||||
else
|
||||
error("sh_register_convert_to_virtual called with non DR register number");
|
||||
error("sh64_register_convert_to_virtual called with non DR register number");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2114,7 +2091,7 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
|
|||
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
|
||||
{
|
||||
/* It is a no-op. */
|
||||
memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
|
||||
memcpy (to, from, register_size (current_gdbarch, regnum));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2124,10 +2101,11 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
|
|||
&& regnum <= DR_LAST_C_REGNUM))
|
||||
{
|
||||
DOUBLEST val = deprecated_extract_floating (from, TYPE_LENGTH(type));
|
||||
floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword, &val, to);
|
||||
floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword,
|
||||
&val, to);
|
||||
}
|
||||
else
|
||||
error("sh_register_convert_to_raw called with non DR register number");
|
||||
error("sh64_register_convert_to_raw called with non DR register number");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2151,10 +2129,12 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 2; portion++)
|
||||
regcache_raw_read (regcache, base_regnum + portion,
|
||||
(temp_buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch, base_regnum) * portion));
|
||||
|
||||
/* We must pay attention to the endiannes. */
|
||||
sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
|
||||
/* We must pay attention to the endianness. */
|
||||
sh_sh64_register_convert_to_virtual (reg_nr,
|
||||
gdbarch_register_type (gdbarch,
|
||||
reg_nr),
|
||||
temp_buffer, buffer);
|
||||
|
||||
}
|
||||
|
@ -2170,7 +2150,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 2; portion++)
|
||||
regcache_raw_read (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch, base_regnum) * portion));
|
||||
}
|
||||
|
||||
else if (reg_nr >= FV0_REGNUM
|
||||
|
@ -2184,7 +2164,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 4; portion++)
|
||||
regcache_raw_read (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch, base_regnum) * portion));
|
||||
}
|
||||
|
||||
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
|
||||
|
@ -2207,7 +2187,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
|
||||
/* Build the value in the provided buffer. */
|
||||
/* Floating point registers map 1-1 to the media fp regs,
|
||||
they have the same size and endienness. */
|
||||
they have the same size and endianness. */
|
||||
regcache_raw_read (regcache, base_regnum, buffer);
|
||||
}
|
||||
|
||||
|
@ -2221,10 +2201,12 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 2; portion++)
|
||||
regcache_raw_read (regcache, base_regnum + portion,
|
||||
(temp_buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch, base_regnum) * portion));
|
||||
|
||||
/* We must pay attention to the endiannes. */
|
||||
sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
|
||||
/* We must pay attention to the endianness. */
|
||||
sh_sh64_register_convert_to_virtual (reg_nr,
|
||||
gdbarch_register_type (gdbarch,
|
||||
reg_nr),
|
||||
temp_buffer, buffer);
|
||||
}
|
||||
|
||||
|
@ -2239,7 +2221,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 4; portion++)
|
||||
regcache_raw_read (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch, base_regnum) * portion));
|
||||
}
|
||||
|
||||
else if (reg_nr == FPSCR_C_REGNUM)
|
||||
|
@ -2309,8 +2291,9 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
&& reg_nr <= DR_LAST_REGNUM)
|
||||
{
|
||||
base_regnum = dr_reg_base_num (reg_nr);
|
||||
/* We must pay attention to the endiannes. */
|
||||
sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), 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);
|
||||
|
||||
|
||||
|
@ -2318,7 +2301,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 2; portion++)
|
||||
regcache_raw_write (regcache, base_regnum + portion,
|
||||
(temp_buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch,
|
||||
base_regnum) * portion));
|
||||
}
|
||||
|
||||
else if (reg_nr >= FPP0_REGNUM
|
||||
|
@ -2330,7 +2314,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 2; portion++)
|
||||
regcache_raw_write (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch,
|
||||
base_regnum) * portion));
|
||||
}
|
||||
|
||||
else if (reg_nr >= FV0_REGNUM
|
||||
|
@ -2342,7 +2327,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
for (portion = 0; portion < 4; portion++)
|
||||
regcache_raw_write (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch,
|
||||
base_regnum) * portion));
|
||||
}
|
||||
|
||||
/* sh compact general pseudo registers. 1-to-1 with a shmedia
|
||||
|
@ -2380,13 +2366,16 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
base_regnum = sh64_compact_reg_base_num (reg_nr);
|
||||
for (portion = 0; portion < 2; portion++)
|
||||
{
|
||||
/* We must pay attention to the endiannes. */
|
||||
sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), 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);
|
||||
|
||||
regcache_raw_write (regcache, base_regnum + portion,
|
||||
(temp_buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch,
|
||||
base_regnum) * portion));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2399,7 +2388,8 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
{
|
||||
regcache_raw_write (regcache, base_regnum + portion,
|
||||
((char *) buffer
|
||||
+ DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
|
||||
+ register_size (gdbarch,
|
||||
base_regnum) * portion));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2639,16 +2629,15 @@ sh64_do_pseudo_register (int regnum)
|
|||
|
||||
else if (regnum >= R0_C_REGNUM
|
||||
&& regnum <= R_LAST_C_REGNUM)
|
||||
do_r_c_register_info (regnum); /* FIXME, this function will not print the right format */
|
||||
|
||||
/* FIXME, this function will not print the right format. */
|
||||
do_r_c_register_info (regnum);
|
||||
else if (regnum >= FP0_C_REGNUM
|
||||
&& regnum <= FP_LAST_C_REGNUM)
|
||||
sh_do_fp_register (current_gdbarch, gdb_stdout, regnum); /* this should work also for pseudoregs */
|
||||
|
||||
/* This should work also for pseudoregs. */
|
||||
sh_do_fp_register (current_gdbarch, gdb_stdout, regnum);
|
||||
else if (regnum >= PC_C_REGNUM
|
||||
&& regnum <= FPUL_C_REGNUM)
|
||||
do_cr_c_register_info (regnum);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2895,27 +2884,17 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
set_gdbarch_fp0_regnum (gdbarch, SIM_SH64_FR0_REGNUM);
|
||||
set_gdbarch_pc_regnum (gdbarch, 64);
|
||||
|
||||
/* the number of real registers is the same whether we are in
|
||||
/* The number of real registers is the same whether we are in
|
||||
ISA16(compact) or ISA32(media). */
|
||||
set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS);
|
||||
set_gdbarch_deprecated_register_size (gdbarch, 8); /*????*/
|
||||
set_gdbarch_deprecated_register_bytes (gdbarch,
|
||||
((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_deprecated_register_virtual_type (gdbarch, sh_sh64_register_virtual_type);
|
||||
set_gdbarch_register_type (gdbarch, sh64_register_type);
|
||||
set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
|
||||
set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh64_register_raw_size);
|
||||
set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
|
||||
set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
|
||||
/* This seems awfully wrong!*/
|
||||
/*set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);*/
|
||||
/* should include the size of the pseudo regs. */
|
||||
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
|
||||
/* Or should that go in the virtual_size? */
|
||||
/*set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);*/
|
||||
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
|
||||
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
|
||||
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
|
||||
|
||||
|
|
Loading…
Reference in New Issue