2000-12-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+ * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
+ sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs): SR_REGNUM is
+ now part of gdbarch_tdep structure.
+ (sh_gdbarch_init): Initialize SR_REGNUM.
+
+ * config/sh/tm-sh.h (struct gdbarch_tdep): Add field SR_REGNUM.
+
* sh-tdep.c (sh_do_pseudo_register): Indent properly. Call
do_dr_register_info() only for DR registers.
(sh_sh4_register_name): Add comments with numbers.
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
int pr = read_register (gdbarch_tdep (current_gdbarch)->FPSCR_REGNUM) & 0x80000;
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
+ (long) read_register (gdbarch_tdep (current_gdbarch)->SR_REGNUM),
(long) read_register (PR_REGNUM),
(long) read_register (MACH_REGNUM),
(long) read_register (MACL_REGNUM));
statement below. */
tdep->FPUL_REGNUM = -1;
tdep->FPSCR_REGNUM = -1;
+ tdep->SR_REGNUM = 22;
tdep->DSR_REGNUM = -1;
tdep->FP_LAST_REGNUM = -1;
tdep->A0G_REGNUM = -1;