1999-04-16 01:35:26 +00:00
|
|
|
/* Target-specific definition for a Hitachi Super-H.
|
|
|
|
Copyright (C) 1993 Free Software Foundation, Inc.
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
This file is part of GDB.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
/* Contributed by Steve Chamberlain sac@cygnus.com */
|
|
|
|
|
2000-07-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
Multiarch the sh target.
* sh-tdep.c:
(sh_generic_reg_names, sh_reg_names,sh3_reg_names, sh3e_reg_names,
sh_dsp_reg_names, sh3_dsp_reg_names, sh_processor_type_table):
Remove.
(XMALLOC): Define.
(struct frame_extra_info): Define.
(sh_register_raw_size, sh_register_virtual_size,
sh_register_virtual_type, sh_register_byte, sh_breakpoint_from_pc,
sh_frame_saved_pc, sh_skip_prologue,
sh_nofp_frame_init_saved_regs, sh_fp_frame_init_saved_regs,
sh_extract_struct_value_address, sh_use_struct_convention,
sh_store_struct_return, sh_push_arguments, sh_push_return_address,
sh_saved_pc_after_call, sh_generic_register_name,
sh_sh_register_name, sh_sh3_register_name, sh_sh3e_register_name,
sh_sh_dsp_register_name, sh_sh3_dsp_register_name,
sh_frame_args_address, sh_frame_locals_address,
sh_coerce_float_to_double, sh_default_store_return_value,
sh3e_sh4_store_return_value, sh_generic_show_regs,
sh3_show_regs,sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs,
sh_dsp_show_regs, sh_register_byte, sh_register_raw_size,
sh_register_virtual_size, sh_sh3e_register_virtual_type,
sh_default_register_virtual_type, sh_gdbarch_init): New functions.
(sh_target_architecture_hook, sh_frame_find_saved_regs,
sh_show_regs): Delete functions.
(sh_frame_chain, sh_find_callers_reg, sh_init_extra_frame_info,
sh_pop_frame, sh_extract_return_value): Update
* config/sh/tm-sh.h (GDB_MULTI_ARCH): Define to 1.
(struct gdbarch_tdep): Define.
Remove all unnecessary defines.
* remote-e7000.c ({PR,GBR,SR,MACL,VBR,MACH}_REGNUM): Define to -1,
for h8300 case.
(want_sh,want_nopc_sh,want_nopc_sh3): Make nomenclature
consistent.
(e7000_fetch_registers): Remove ifdef GDB_TARGET_IS_SH, use
runtime check instead.
(e7000_wait): Ditto.
* sh3-rom.c (sh3_supply_register): Use gdbarch_tdep to get the SSR
and SPC register numbers.
(sh3_regnames, sh3e_regnames): Don't specify a size.
* config/h8300/tm-h8300.h: Add comment.
2000-07-19 14:11:42 +00:00
|
|
|
#define GDB_MULTI_ARCH 1
|
|
|
|
|
|
|
|
/* Information that is dependent on the processor variant. */
|
|
|
|
struct gdbarch_tdep
|
|
|
|
{
|
|
|
|
int FPUL_REGNUM; /* sh3e, sh4 */
|
|
|
|
int FPSCR_REGNUM; /* sh3e, sh4 */
|
|
|
|
int DSR_REGNUM; /* sh-dsp, sh3-dsp */
|
|
|
|
int FP15_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 */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Registers common to all the SH variants. */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
R0_REGNUM = 0,
|
|
|
|
STRUCT_RETURN_REGNUM = 2,
|
|
|
|
ARG0_REGNUM = 4,
|
|
|
|
ARGLAST_REGNUM = 7,
|
|
|
|
PR_REGNUM = 17,
|
|
|
|
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???*/
|
1999-04-16 01:35:26 +00:00
|
|
|
|