public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: ian@airs.com (Ian Lance Taylor)
Cc: borchert@mathematik.uni-ulm.de, gas2@cygnus.com
Subject: Re: Bug of gas (binutils-2.9.1.0.23): Wrong code for SETHI on SPARC
Date: Fri, 02 Apr 1999 17:27:00 -0000	[thread overview]
Message-ID: <m10TFDr-000ErMC@ocean.lucon.org> (raw)
In-Reply-To: <19990403003707.1536.qmail@comton.airs.com>

>    Let me know what you get.
> 
>    Thanks.
> 
> 
>    H.J.
>    ---
>    Fri Apr  2 16:05:25 1999  H.J. Lu  (hjl@gnu.org)
> 
> 	   * sparc-opc.c: Change "sethi" from "h,d" to "n,d".
> 
> I don't think that can be right.  I think it will do the wrong thing
> for
>     sethi foo,%i0
> 
 
First, the current gas handles

	sethi foo,%i0

differently than Solaris' as. Solaris' as generates R_SPARC_22. But gas
generates R_SPARC_HI22. The patch enclosed here makes gas matches
Solaris' as. But I don't know if it is correct :-).

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---
Index: gas/ChangeLog.linux
===================================================================
RCS file: /local/work/cvs/gnu/binutils/gas/ChangeLog.linux,v
retrieving revision 1.62
diff -u -p -r1.62 ChangeLog.linux
--- gas/ChangeLog.linux	1999/03/31 18:21:59	1.62
+++ gas/ChangeLog.linux	1999/04/03 01:22:45
@@ -1,3 +1,7 @@
+Fri Apr  2 17:22:33 1999  H.J. Lu  (hjl@gnu.org)
+
+	* config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_SPARC22.
+
 Sun Mar 28 15:32:42 1999  H.J. Lu  (hjl@gnu.org)
 
 	* Makefile.in: Regenerated with automake 1.4.
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /local/work/cvs/gnu/binutils/gas/config/tc-sparc.c,v
retrieving revision 1.10
diff -u -p -r1.10 tc-sparc.c
--- gas/config/tc-sparc.c	1999/03/31 17:24:48	1.10
+++ gas/config/tc-sparc.c	1999/04/03 01:05:44
@@ -2721,6 +2721,7 @@ tc_gen_reloc (section, fixp)
     case BFD_RELOC_LO10:
     case BFD_RELOC_32_PCREL_S2:
     case BFD_RELOC_SPARC13:
+    case BFD_RELOC_SPARC22:
     case BFD_RELOC_SPARC_BASE13:
     case BFD_RELOC_SPARC_WDISP16:
     case BFD_RELOC_SPARC_WDISP19:
Index: opcodes/ChangeLog.linux
===================================================================
RCS file: /local/work/cvs/gnu/binutils/opcodes/ChangeLog.linux,v
retrieving revision 1.40
diff -u -p -r1.40 ChangeLog.linux
--- opcodes/ChangeLog.linux	1999/03/31 17:24:49	1.40
+++ opcodes/ChangeLog.linux	1999/04/03 01:07:01
@@ -1,3 +1,7 @@
+Fri Apr  2 16:05:25 1999  H.J. Lu  (hjl@gnu.org)
+
+	* sparc-opc.c: Change "sethi" from "h,d" to "n,d".
+
 Sun Mar 28 11:48:17 1999  H.J. Lu  (hjl@gnu.org)
 
 	* i386-dis.c (INSN_FWAIT): New, defined.
Index: opcodes/sparc-opc.c
===================================================================
RCS file: /local/work/cvs/gnu/binutils/opcodes/sparc-opc.c,v
retrieving revision 1.7
diff -u -p -r1.7 sparc-opc.c
--- opcodes/sparc-opc.c	1998/12/05 03:38:56	1.7
+++ opcodes/sparc-opc.c	1999/04/03 01:06:34
@@ -1379,7 +1379,7 @@ CONDFC  ("fbule", "cb013", 0xe, 0),
 { "setsw",	F2(0x0, 0x4), F2(~0x0, ~0x4), "Sh,d", F_ALIAS, v9 },
 { "setx",	F2(0x0, 0x4), F2(~0x0, ~0x4), "S0,1,d", F_ALIAS, v9 },
 
-{ "sethi",	F2(0x0, 0x4), F2(~0x0, ~0x4), "h,d", 0, v6 },
+{ "sethi",	F2(0x0, 0x4), F2(~0x0, ~0x4), "n,d", 0, v6 },
 
 { "taddcc",	F3(2, 0x20, 0), F3(~2, ~0x20, ~0)|ASI(~0),	"1,2,d", 0, v6 },
 { "taddcc",	F3(2, 0x20, 1), F3(~2, ~0x20, ~1),		"1,i,d", 0, v6 },

      parent reply	other threads:[~1999-04-02 17:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-02  8:04 Andreas Borchert
1999-04-02 11:49 ` H.J. Lu
1999-04-02 16:10 ` H.J. Lu
1999-04-02 16:42   ` Ian Lance Taylor
1999-04-02 16:42     ` H.J. Lu
1999-04-02 16:42       ` Ian Lance Taylor
1999-04-02 17:27     ` H.J. Lu [this message]

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=m10TFDr-000ErMC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=borchert@mathematik.uni-ulm.de \
    --cc=gas2@cygnus.com \
    --cc=ian@airs.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).