diff options
author | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2004-10-01 07:29:34 +0000 |
---|---|---|
committer | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2004-10-01 07:29:34 +0000 |
commit | 9b32d5267e5b0e0eb9100353a7b555c06a817466 (patch) | |
tree | bda1a2c459760aeded2f9d52c41700e4a8f0c3ef /gdb/m32r-tdep.c | |
parent | 73d14ad423dbf247edb243d8e11da0dec7cafebc (diff) | |
download | gdb-9b32d5267e5b0e0eb9100353a7b555c06a817466.zip gdb-9b32d5267e5b0e0eb9100353a7b555c06a817466.tar.gz gdb-9b32d5267e5b0e0eb9100353a7b555c06a817466.tar.bz2 |
2004-09-30 Kei Sakamoto <sakamoto.kei@renesas.com>
Add m32r-linux support.
* configure.tgt: Add m32r*-*-linux*.
* Makefile.in (ALLDEPFILES): Add m32r-tdep.c, m32r-linux-nat.c
and m32r-linux-tdep.c.
(m32r-linux-nat.o, m32r-linux-tdep.o): New dependencies.
* m32r-tdep.c: Move some definitions to m32r-tdep.h.
* config/djgpp/fnchange.lst: Add m32r-linux-nat.c and
m32r-linux-tdep.c.
* m32r-tdep.h, m32r-linux-nat.c, m32r-linux-tdep.c,
config/m32r/linux.mh, config/m32r/linux.mt,
config/m32r/nm-linux.h: New files.
Diffstat (limited to 'gdb/m32r-tdep.c')
-rw-r--r-- | gdb/m32r-tdep.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index fd5e9dc..73dce73 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -41,27 +41,7 @@ #include "gdb_assert.h" -struct gdbarch_tdep -{ - /* gdbarch target dependent data here. Currently unused for M32R. */ -}; - -/* m32r register names. */ - -enum -{ - R0_REGNUM = 0, - R3_REGNUM = 3, - M32R_FP_REGNUM = 13, - LR_REGNUM = 14, - M32R_SP_REGNUM = 15, - PSW_REGNUM = 16, - M32R_PC_REGNUM = 21, - /* m32r calling convention. */ - ARG1_REGNUM = R0_REGNUM, - ARGN_REGNUM = R3_REGNUM, - RET1_REGNUM = R0_REGNUM, -}; +#include "m32r-tdep.h" /* Local functions */ @@ -238,18 +218,12 @@ char *m32r_register_names[] = { "evb" }; -static int -m32r_num_regs (void) -{ - return (sizeof (m32r_register_names) / sizeof (m32r_register_names[0])); -} - static const char * m32r_register_name (int reg_nr) { if (reg_nr < 0) return NULL; - if (reg_nr >= m32r_num_regs ()) + if (reg_nr >= M32R_NUM_REGS) return NULL; return m32r_register_names[reg_nr]; } @@ -921,7 +895,7 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_write_pc (gdbarch, m32r_write_pc); set_gdbarch_unwind_sp (gdbarch, m32r_unwind_sp); - set_gdbarch_num_regs (gdbarch, m32r_num_regs ()); + set_gdbarch_num_regs (gdbarch, M32R_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, M32R_SP_REGNUM); set_gdbarch_register_name (gdbarch, m32r_register_name); set_gdbarch_register_type (gdbarch, m32r_register_type); @@ -929,8 +903,10 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_extract_return_value (gdbarch, m32r_extract_return_value); set_gdbarch_push_dummy_call (gdbarch, m32r_push_dummy_call); set_gdbarch_store_return_value (gdbarch, m32r_store_return_value); - set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m32r_extract_struct_value_address); - set_gdbarch_deprecated_use_struct_convention (gdbarch, m32r_use_struct_convention); + set_gdbarch_deprecated_extract_struct_value_address (gdbarch, + m32r_extract_struct_value_address); + set_gdbarch_deprecated_use_struct_convention (gdbarch, + m32r_use_struct_convention); set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue); set_gdbarch_inner_than (gdbarch, core_addr_lessthan); |