From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4309 invoked by alias); 21 Oct 2003 12:56:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4153 invoked from network); 21 Oct 2003 12:56:35 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 21 Oct 2003 12:56:35 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h9LCuYM16964; Tue, 21 Oct 2003 08:56:34 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h9LCuXL26826; Tue, 21 Oct 2003 08:56:34 -0400 Received: from cygbert.vinschen.de (vpn50-2.rdu.redhat.com [172.16.50.2]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h9LCuVJ05400; Tue, 21 Oct 2003 05:56:32 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 5179F58092; Tue, 21 Oct 2003 14:56:26 +0200 (CEST) Date: Tue, 21 Oct 2003 12:56:00 -0000 From: Corinna Vinschen To: binutils@sources.redhat.com Cc: gdb-patches@sources.redhat.com Subject: [RFA] New SH machine types sh4_nofpu, sh4a, sh4a_nofpu and sh4al_dsp Message-ID: <20031021125626.GH1653@cygbert.vinschen.de> Mail-Followup-To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2003-10/txt/msg00637.txt.bz2 Hi, the below patch introduces two entirely new SH machine types, sh4a and sh4al_dsp plus two types which are the base types sh4 and sh4a with no FPU support (soft-float). Ok to checkin? Corinna 2003-10-21 Alexandre Oliva , Michael Snyder * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu, bfd_mach_sh4a_nofpu): New machine types. * bfd-in2.h: Rebuilt. * cpu-sh.c (compatible): Remove unused function. (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New. (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu. * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them. Index: archures.c =================================================================== RCS file: /cvs/src/src/bfd/archures.c,v retrieving revision 1.84 diff -u -p -r1.84 archures.c --- archures.c 8 Oct 2003 17:57:58 -0000 1.84 +++ archures.c 21 Oct 2003 12:56:02 -0000 @@ -228,6 +228,10 @@ DESCRIPTION .#define bfd_mach_sh3_dsp 0x3d .#define bfd_mach_sh3e 0x3e .#define bfd_mach_sh4 0x40 +.#define bfd_mach_sh4_nofpu 0x41 +.#define bfd_mach_sh4a 0x4a +.#define bfd_mach_sh4a_nofpu 0x4b +.#define bfd_mach_sh4al_dsp 0x4d .#define bfd_mach_sh5 0x50 . bfd_arch_alpha, {* Dec Alpha *} .#define bfd_mach_alpha_ev4 0x10 Index: bfd-in2.h =================================================================== RCS file: /cvs/src/src/bfd/bfd-in2.h,v retrieving revision 1.243 diff -u -p -r1.243 bfd-in2.h --- bfd-in2.h 20 Oct 2003 14:38:39 -0000 1.243 +++ bfd-in2.h 21 Oct 2003 12:56:02 -0000 @@ -1663,6 +1663,10 @@ enum bfd_architecture #define bfd_mach_sh3_dsp 0x3d #define bfd_mach_sh3e 0x3e #define bfd_mach_sh4 0x40 +#define bfd_mach_sh4_nofpu 0x41 +#define bfd_mach_sh4a 0x4a +#define bfd_mach_sh4a_nofpu 0x4b +#define bfd_mach_sh4al_dsp 0x4d #define bfd_mach_sh5 0x50 bfd_arch_alpha, /* Dec Alpha */ #define bfd_mach_alpha_ev4 0x10 Index: cpu-sh.c =================================================================== RCS file: /cvs/src/src/bfd/cpu-sh.c,v retrieving revision 1.12 diff -u -p -r1.12 cpu-sh.c --- cpu-sh.c 23 Apr 2003 21:09:02 -0000 1.12 +++ cpu-sh.c 21 Oct 2003 12:56:02 -0000 @@ -23,21 +23,6 @@ #include "sysdep.h" #include "libbfd.h" -#if 0 -/* This routine is provided two arch_infos and returns whether - they'd be compatible. */ - -static const bfd_arch_info_type * -compatible (a,b) - const bfd_arch_info_type *a; - const bfd_arch_info_type *b; -{ - if (a->arch != b->arch || a->mach != b->mach) - return NULL; - return a; -} -#endif - #define SH_NEXT &arch_info_struct[0] #define SH2_NEXT &arch_info_struct[1] #define SH2E_NEXT &arch_info_struct[2] @@ -46,6 +31,10 @@ compatible (a,b) #define SH3_DSP_NEXT &arch_info_struct[5] #define SH3E_NEXT &arch_info_struct[6] #define SH4_NEXT &arch_info_struct[7] +#define SH4A_NEXT &arch_info_struct[8] +#define SH4AL_DSP_NEXT &arch_info_struct[9] +#define SH4_NOFPU_NEXT &arch_info_struct[10] +#define SH4A_NOFPU_NEXT &arch_info_struct[11] #define SH64_NEXT NULL static const bfd_arch_info_type arch_info_struct[] = @@ -147,6 +136,62 @@ static const bfd_arch_info_type arch_inf bfd_default_compatible, bfd_default_scan, SH4_NEXT + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_sh, + bfd_mach_sh4a, + "sh", /* arch_name */ + "sh4a", /* printable name */ + 1, + FALSE, /* not the default */ + bfd_default_compatible, + bfd_default_scan, + SH4A_NEXT + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_sh, + bfd_mach_sh4al_dsp, + "sh", /* arch_name */ + "sh4al-dsp", /* printable name */ + 1, + FALSE, /* not the default */ + bfd_default_compatible, + bfd_default_scan, + SH4AL_DSP_NEXT + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_sh, + bfd_mach_sh4_nofpu, + "sh", /* arch_name */ + "sh4-nofpu", /* printable name */ + 1, + FALSE, /* not the default */ + bfd_default_compatible, + bfd_default_scan, + SH4_NOFPU_NEXT + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_sh, + bfd_mach_sh4a_nofpu, + "sh", /* arch_name */ + "sh4a-nofpu", /* printable name */ + 1, + FALSE, /* not the default */ + bfd_default_compatible, + bfd_default_scan, + SH4A_NOFPU_NEXT }, { 64, /* 64 bits in a word */ Index: elf32-sh.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-sh.c,v retrieving revision 1.93 diff -u -p -r1.93 elf32-sh.c --- elf32-sh.c 15 Oct 2003 06:23:55 -0000 1.93 +++ elf32-sh.c 21 Oct 2003 12:56:03 -0000 @@ -6863,6 +6863,18 @@ sh_elf_set_mach_from_flags (bfd *abfd) case EF_SH4: bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4); break; + case EF_SH4_NOFPU: + bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4_nofpu); + break; + case EF_SH4A: + bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a); + break; + case EF_SH4A_NOFPU: + bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a_nofpu); + break; + case EF_SH4AL_DSP: + bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4al_dsp); + break; default: return FALSE; } -- Corinna Vinschen Cygwin Developer Red Hat, Inc.