From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31327 invoked by alias); 23 Oct 2003 09:58:50 -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 31314 invoked from network); 23 Oct 2003 09:58:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 23 Oct 2003 09:58:49 -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 h9N9wmM09788; Thu, 23 Oct 2003 05:58:48 -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 h9N9wlL11406; Thu, 23 Oct 2003 05:58:47 -0400 Received: from cygbert.vinschen.de (vpn50-7.rdu.redhat.com [172.16.50.7]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h9N9wjJ12566; Thu, 23 Oct 2003 02:58:45 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 9DAB258092; Thu, 23 Oct 2003 11:58:37 +0200 (CEST) Date: Thu, 23 Oct 2003 09:58:00 -0000 From: Corinna Vinschen To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: [ob/PATCH]: include/elf/sh.h: Add missing SH symbols Message-ID: <20031023095837.GY1653@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/msg00692.txt.bz2 Hi, my previous posted patch to add the new sh4a machine types to bfd was missing a patch to include/elf/sh.h. I've applied the below patch as both, obvious and preapproved by Alexandre Oliva. Corinna 2003-10-22 Alexandre Oliva , Michael Snyder * sh.h (EF_SH4A, EF_SH4AL_DSP, EF_SH4_NOFPU, EF_SH4A_NOFPU): New. (EF_SH_MERGE_MACH): Combine them. Index: sh.h =================================================================== RCS file: /cvs/src/src/include/elf/sh.h,v retrieving revision 1.15 diff -u -p -r1.15 sh.h --- sh.h 24 Sep 2003 02:27:56 -0000 1.15 +++ sh.h 23 Oct 2003 09:31:47 -0000 @@ -27,13 +27,18 @@ #define EF_SH1 1 #define EF_SH2 2 #define EF_SH3 3 -#define EF_SH_HAS_DSP(flags) ((flags) & 4) +#define EF_SH_HAS_DSP(flags) (((flags) & EF_SH_MACH_MASK & ~3) == 4) #define EF_SH_DSP 4 #define EF_SH3_DSP 5 +#define EF_SH4AL_DSP 6 #define EF_SH_HAS_FP(flags) ((flags) & 8) #define EF_SH3E 8 #define EF_SH4 9 #define EF_SH2E 11 +#define EF_SH4A 12 + +#define EF_SH4_NOFPU 0x10 +#define EF_SH4A_NOFPU 0x11 /* This one can only mix in objects from other EF_SH5 objects. */ #define EF_SH5 10 @@ -56,6 +61,20 @@ : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \ || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \ ? EF_SH4 \ + /* ??? SH4? Why not SH3E? */ \ + : ((((mach1) == EF_SH4_NOFPU || (mach1) == EF_SH4A_NOFPU) \ + && EF_SH_HAS_DSP (mach2)) \ + || (((mach2) == EF_SH4_NOFPU || (mach2) == EF_SH4A_NOFPU) \ + && EF_SH_HAS_DSP (mach1))) \ + ? EF_SH4AL_DSP \ + : ((mach1) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach2)) \ + ? ((mach2) < EF_SH4A) ? EF_SH4 : (mach2) \ + : ((mach2) == EF_SH4_NOFPU && EF_SH_HAS_FP (mach1)) \ + ? ((mach1) < EF_SH4A) ? EF_SH4 : (mach1) \ + : ((mach1) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach2)) \ + ? ((mach2) <= EF_SH4A) ? EF_SH4A : (mach2) \ + : ((mach2) == EF_SH4A_NOFPU && EF_SH_HAS_FP (mach1)) \ + ? ((mach1) <= EF_SH4A) ? EF_SH4A : (mach1) \ : (((mach1) == EF_SH2E ? 7 : (mach1)) > ((mach2) == EF_SH2E ? 7 : (mach2)) \ ? (mach1) : (mach2))) -- Corinna Vinschen Cygwin Developer Red Hat, Inc.