mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
3bbfbb92b3
* config/sh/tm-sh.h (struct gdbarch_tdep): Add FLOAT_ARGLAST_REGNUM, RETURN_REGNUM, ARG0_REGNUM, ARGLAST_REGNUM, PR_REGNUM fields. * sh-tdep.c (sh_skip_prologue_hard_way): Rename from skip_prologue_hard_way(). (skip_prologue_hard_way): Make it a function pointer. (sh_print_register): Use function pointer do_pseudo_register, instead of sh_do_pseudo_register. (sh_do_registers_info): Ditto. (sh_gdbarch_init): Initialize do_pseudo_register. (IS_MOV_TO_R14): Rename from IS_MOV_R14. (skip_prologue_hard_way): Update. (sh_gdbarch_init): Move setting of frame_chain, get_saved_register, init_extra_frame_info, push_arguments, extract_return_value, pop_frame, store_struct_return, extract_struct_value_address, use_struct_convention, init_extra_frame_info to before target specific settings. (sh_gdbarch_init): Initialize new tdep fields FLOAT_ARGLAST_REGNUM, RETURN_REGNUM, ARG0_REGNUM, ARGLAST_REGNUM, PR_REGNUM. (sh_push_arguments): Use new gdbarch_tdep fields {ARG0,ARGLAST}_REGNUM. (sh_saved_pc_after_call, sh_nofp_frame_init_saved_regs, sh_init_extra_frame_info, sh_push_return_address, sh_generic_show_regs, sh3_show_regs, sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs): Update to use gdbarch_tdep->PR_REGNUM. (dr_reg_base_num, fv_reg_base_num): Move to earlier in the file.
85 lines
3.2 KiB
C
85 lines
3.2 KiB
C
/* Target-specific definition for a Hitachi Super-H.
|
|
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
|
Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
|
|
|
#define GDB_MULTI_ARCH 1
|
|
|
|
/* Information that is dependent on the processor variant. */
|
|
|
|
struct gdbarch_tdep
|
|
{
|
|
int PR_REGNUM;
|
|
int FPUL_REGNUM; /* sh3e, sh4 */
|
|
int FPSCR_REGNUM; /* sh3e, sh4 */
|
|
int SR_REGNUM; /* sh-dsp, sh3, sh3-dsp, sh3e, sh4 */
|
|
int DSR_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int FP_LAST_REGNUM; /* sh3e, sh4 */
|
|
int A0G_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int A0_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int A1G_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int A1_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int M0_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int M1_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int X0_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int X1_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int Y0_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int Y1_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int MOD_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int SSR_REGNUM; /* sh3, sh3-dsp, sh3e, sh4 */
|
|
int SPC_REGNUM; /* sh3, sh3-dsp, sh3e, sh4 */
|
|
int RS_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int RE_REGNUM; /* sh-dsp, sh3-dsp */
|
|
int DR0_REGNUM; /* sh4 */
|
|
int DR_LAST_REGNUM; /* sh4 */
|
|
int FV0_REGNUM; /* sh4 */
|
|
int FV_LAST_REGNUM; /* sh4 */
|
|
int ARG0_REGNUM;
|
|
int ARGLAST_REGNUM;
|
|
int FLOAT_ARGLAST_REGNUM;
|
|
int RETURN_REGNUM;
|
|
};
|
|
|
|
/* Registers common to all the SH variants. */
|
|
enum
|
|
{
|
|
R0_REGNUM = 0,
|
|
STRUCT_RETURN_REGNUM = 2,
|
|
ARG0_REGNUM = 4, /* Used in h8300-tdep.c */
|
|
ARGLAST_REGNUM = 7, /* Used in h8300-tdep.c */
|
|
PR_REGNUM = 17, /* used in sh3-rom.c */
|
|
GBR_REGNUM = 18,
|
|
VBR_REGNUM = 19,
|
|
MACH_REGNUM = 20,
|
|
MACL_REGNUM = 21,
|
|
SR_REGNUM = 22
|
|
};
|
|
|
|
#define NUM_REALREGS 59 /* used in remote-e7000.c which is not multiarched. */
|
|
|
|
#define REGISTER_TYPE long /* used in standalone.c */
|
|
|
|
#define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
|
|
#define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
|
|
|
|
/*#define NOP {0x20, 0x0b}*/ /* Who uses this???*/
|
|
|