diff options
author | Nick Clifton <nickc@redhat.com> | 2003-12-03 17:38:48 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-12-03 17:38:48 +0000 |
commit | 8884595866edbe6697a1268f5605b7ffe91efb0a (patch) | |
tree | 1710b68cb96d5cba8449135a5113d5c9a6a8c62f /bfd | |
parent | f8fc3443814cb6f315680a7fb34ff4effc86442e (diff) | |
download | gdb-8884595866edbe6697a1268f5605b7ffe91efb0a.zip gdb-8884595866edbe6697a1268f5605b7ffe91efb0a.tar.gz gdb-8884595866edbe6697a1268f5605b7ffe91efb0a.tar.bz2 |
Add support for the M32R2 processor.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/archures.c | 1 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 1 | ||||
-rw-r--r-- | bfd/cpu-m32r.c | 35 | ||||
-rw-r--r-- | bfd/elf32-m32r.c | 31 |
5 files changed, 46 insertions, 31 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index aa408c8..8f59bc8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> + + * archures.c (bfd_mach_m32r2): Add new machine type. + * bfd-in2.h: Regenerate. + * cpu-m32r.c : Add new machine type. + * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing, + m32r_elf_merge_private_bfd_data): Add support for new machine + type. + 2003-12-03 Dave Airlie <airlied@linux.ie> * config.bfd: Add vax-linux-gnu target. diff --git a/bfd/archures.c b/bfd/archures.c index 18994a5..f8aeeef 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -272,6 +272,7 @@ DESCRIPTION . bfd_arch_m32r, {* Renesas M32R (formerly Mitsubishi M32R/D) *} .#define bfd_mach_m32r 1 {* For backwards compatibility. *} .#define bfd_mach_m32rx 'x' +.#define bfd_mach_m32r2 '2' . bfd_arch_mn10200, {* Matsushita MN10200 *} . bfd_arch_mn10300, {* Matsushita MN10300 *} .#define bfd_mach_mn10300 300 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6c2d299..2afcf7f 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1710,6 +1710,7 @@ enum bfd_architecture bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' +#define bfd_mach_m32r2 '2' bfd_arch_mn10200, /* Matsushita MN10200 */ bfd_arch_mn10300, /* Matsushita MN10300 */ #define bfd_mach_mn10300 300 diff --git a/bfd/cpu-m32r.c b/bfd/cpu-m32r.c index bebc2ed..ee013ea 100644 --- a/bfd/cpu-m32r.c +++ b/bfd/cpu-m32r.c @@ -1,21 +1,21 @@ /* BFD support for the M32R processor. - Copyright 1996, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright 1996, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -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 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. + 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. */ + 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. */ #include "bfd.h" #include "sysdep.h" @@ -25,15 +25,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ { 32, 32, 8, bfd_arch_m32r, number, "m32r", print, 4, default, \ bfd_default_compatible, bfd_default_scan, next } -#define NEXT NULL +#define M32R2_NEXT & arch_info_struct [1] +#define NEXT & arch_info_struct [0] static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_m32rx, "m32rx", FALSE, NULL) + N (bfd_mach_m32rx, "m32rx", FALSE, M32R2_NEXT) , + N (bfd_mach_m32r2, "m32r2", FALSE, NULL) }; -#undef NEXT -#define NEXT &arch_info_struct[0] - const bfd_arch_info_type bfd_m32r_arch = N (bfd_mach_m32r, "m32r", TRUE, NEXT); diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index e0a4d13..2794ffb 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -2,21 +2,21 @@ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -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 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. + 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. */ + 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. */ #include "bfd.h" #include "sysdep.h" @@ -1863,6 +1863,7 @@ m32r_elf_object_p (abfd) default: case E_M32R_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_m32r, bfd_mach_m32r); break; case E_M32RX_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_m32r, bfd_mach_m32rx); break; + case E_M32R2_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_m32r, bfd_mach_m32r2); break; } return TRUE; } @@ -1880,6 +1881,7 @@ m32r_elf_final_write_processing (abfd, linker) default: case bfd_mach_m32r: val = E_M32R_ARCH; break; case bfd_mach_m32rx: val = E_M32RX_ARCH; break; + case bfd_mach_m32r2: val = E_M32R2_ARCH; break; } elf_elfheader (abfd)->e_flags &=~ EF_M32R_ARCH; @@ -1946,7 +1948,9 @@ m32r_elf_merge_private_bfd_data (ibfd, obfd) if ((in_flags & EF_M32R_ARCH) != (out_flags & EF_M32R_ARCH)) { - if ((in_flags & EF_M32R_ARCH) != E_M32R_ARCH) + if ( ((in_flags & EF_M32R_ARCH) != E_M32R_ARCH) + || ((out_flags & EF_M32R_ARCH) == E_M32R_ARCH) + || ((in_flags & EF_M32R_ARCH) == E_M32R2_ARCH)) { (*_bfd_error_handler) (_("%s: Instruction set mismatch with previous modules"), @@ -1979,6 +1983,7 @@ m32r_elf_print_private_bfd_data (abfd, ptr) default: case E_M32R_ARCH: fprintf (file, _(": m32r instructions")); break; case E_M32RX_ARCH: fprintf (file, _(": m32rx instructions")); break; + case E_M32R2_ARCH: fprintf (file, _(": m32r2 instructions")); break; } fputc ('\n', file); |