Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: [ob/PATCH]: include/elf/sh.h: Add missing SH symbols
Date: Thu, 23 Oct 2003 09:58:00 -0000	[thread overview]
Message-ID: <20031023095837.GY1653@cygbert.vinschen.de> (raw)

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  <aoliva@redhat.com>,
            Michael Snyder  <msnyder@redhat.com>

        * 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.


             reply	other threads:[~2003-10-23  9:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23  9:58 Corinna Vinschen [this message]
2003-10-23 16:18 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031023095837.GY1653@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox