* config/tc-mips.c (mips16_ip): Check for a missing expression
authorIan Lance Taylor <ian@airs.com>
Tue, 17 Dec 1996 16:00:55 +0000 (16:00 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 17 Dec 1996 16:00:55 +0000 (16:00 +0000)
when using the register indirect addressing mode.

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

index 2de7a953592936c6acdf91c854e33772d92c7fd8..7511b4df85de687c23df2faa91e192e982bfe2dc 100644 (file)
@@ -1,3 +1,8 @@
+Tue Dec 17 10:59:32 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config/tc-mips.c (mips16_ip): Check for a missing expression
+       when using the register indirect addressing mode.
+
 Mon Dec 16 10:08:46 1996  Jeffrey A Law  (law@cygnus.com)
 
        * config/tc-mn10200.c (mn10200_insert_operand): Don't
index 13f284fe095c75a541e3aaf90ec0582050fa42bf..0b1b5c945aa0da3769307f76ec3e00dc9c8f40b6 100644 (file)
@@ -7010,6 +7010,17 @@ mips16_ip (str, ip)
                  /* Looks like a register name.  */
                  break;
                }
+
+             if (s[0] == '('
+                 && args[1] == '('
+                 && s[1] == '$')
+               {
+                 /* It looks like the expression was omitted before a
+                     register indirection, which means that the
+                     expression is implicitly zero.  */
+                 continue;
+               }
+
              my_getExpression (&imm_expr, s);
              /* We need to relax this instruction.  */
              imm_reloc = (int) BFD_RELOC_UNUSED + c;