* config/tc-mips.c (mips_ip): Accept numbers between 0x8000 and
authorIan Lance Taylor <ian@airs.com>
Fri, 11 Mar 1994 23:00:17 +0000 (23:00 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 11 Mar 1994 23:00:17 +0000 (23:00 +0000)
0xffff for 'j' to be compatible with MIPS assembler.  These
numbers are actually treated as negative.

gas/ChangeLog
gas/config/tc-mips.c

index 7ecc6492bf15599757128851dd37880df9c88bde..2ad77a7f249a920787cb55f0b732551a9cf7bfda 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 11 17:56:23 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * config/tc-mips.c (mips_ip): Accept numbers between 0x8000 and
+       0xffff for 'j' to be compatible with MIPS assembler.  These
+       numbers are actually treated as negative.
+
 Thu Mar 10 13:36:29 1994  Doug Evans  (dje@canuck.cygnus.com)
 
        * config/tc-sparc.h (LOCAL_LABEL): Local labels are .Lfoo.
index b60266e7b3963f4bf9e8bfa30ab167d3c33ff040..77a72c044b9a6622ac282d78e4eb241935287cd7 100644 (file)
@@ -4359,8 +4359,12 @@ mips_ip (str, ip)
                }
              else
                {
+                 /* The upper bound should be 0x8000, but
+                    unfortunately the MIPS assembler accepts numbers
+                    from 0x8000 to 0xffff and sign extends them, and
+                    we want to be compatible.  */
                  if (imm_expr.X_add_number < -0x8000 ||
-                     imm_expr.X_add_number >= 0x8000)
+                     imm_expr.X_add_number >= 0x10000)
                    {
                      if (insn + 1 < &mips_opcodes[NUMOPCODES] &&
                          !strcmp (insn->name, insn[1].name))