16 bit immediate expr support for mips
authorAldy Hernandez <aldyh@redhat.com>
Wed, 28 Jun 2000 19:06:25 +0000 (19:06 +0000)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 28 Jun 2000 19:06:25 +0000 (19:06 +0000)
gas/ChangeLog
gas/config/tc-mips.c

index 9c694b4e4a0f06be27d6531631f29a6d05b6b178..aa8f650b2633e0c7554b3a0e749547ad960abb90 100644 (file)
@@ -1,3 +1,9 @@
+2000-06-27  Aldy Hernandez  <aldyh@redhat.com>
+
+       * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of
+       expressions.  Ignore the problem when handling 16 bit immediates,
+       because the assembler will take care of the relocation later.
+
 2000-06-27  Nick Clifton  <nickc@cygnus.com>
 
        * config/tc-d30v.c (write_2_short): Do not allow opcodes with
index 1b5c9c8b4d28a365891f317d49b74488c3dd4237..a4d25bc33312b66920f3ffa0456dca891ea12475 100644 (file)
@@ -7746,10 +7746,8 @@ mips_ip (str, ip)
                      if (insn + 1 < &mips_opcodes[NUMOPCODES] &&
                          !strcmp (insn->name, insn[1].name))
                        break;
-                     if (imm_expr.X_op != O_constant
-                         && imm_expr.X_op != O_big)
-                       insn_error = _("absolute expression required");
-                     else
+                     if (imm_expr.X_op == O_constant
+                         || imm_expr.X_op == O_big)
                        as_bad (_("16 bit expression not in range 0..65535"));
                    }
                }
@@ -7785,10 +7783,8 @@ mips_ip (str, ip)
                    {
                      if (more)
                        break;
-                     if (imm_expr.X_op != O_constant
-                         && imm_expr.X_op != O_big)
-                       insn_error = _("absolute expression required");
-                     else
+                     if (imm_expr.X_op == O_constant
+                         || imm_expr.X_op == O_big)
                        as_bad (_("16 bit expression not in range -32768..32767"));
                    }
                }