* config/tc-mips.c (mips16_ip): Handle an extend operand.
authorIan Lance Taylor <ian@airs.com>
Wed, 12 Feb 1997 20:43:15 +0000 (20:43 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 12 Feb 1997 20:43:15 +0000 (20:43 +0000)
gas/ChangeLog
gas/config/tc-mips.c

index a9b7c4ca020b6ca3eebd46a47f57c3b5049de8a3..d350f7b0b5faf890fe4d526732140d1cd2a04155 100644 (file)
@@ -1,5 +1,7 @@
 Wed Feb 12 14:36:29 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * config/tc-mips.c (mips16_ip): Handle an extend operand.
+
        * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks
        like the expression was based on `.', adjust the value of the
        symbol.
index c3ced95168fc33b10c62246e46b2c457cd48aff7..f80cfcdc61c7dc2b319b3fb8970e806cdb744d34 100644 (file)
@@ -7396,6 +7396,21 @@ mips16_ip (str, ip)
              }
            continue;
 
+           case 'e':           /* extend code */
+             my_getExpression (&imm_expr, s);
+             check_absolute_expr (ip, &imm_expr);
+             if ((unsigned long) imm_expr.X_add_number > 0x7ff)
+               {
+                 as_warn ("Invalid value for `%s' (%lu)",
+                          ip->insn_mo->name,
+                          (unsigned long) imm_expr.X_add_number);
+                 imm_expr.X_add_number &= 0x7ff;
+               }
+             ip->insn_opcode |= imm_expr.X_add_number;
+             imm_expr.X_op = O_absent;
+             s = expr_end;
+             continue;
+
            default:
              internalError ();
            }