* config/tc-mips.c (my_getExpression): In mips16 mode, if it looks
authorIan Lance Taylor <ian@airs.com>
Wed, 12 Feb 1997 20:38:20 +0000 (20:38 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 12 Feb 1997 20:38:20 +0000 (20:38 +0000)
like the expression was based on `.', adjust the value of the
symbol.

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

index 2e3978d2a037e6b258c135d0343e103d768bd23d..a9b7c4ca020b6ca3eebd46a47f57c3b5049de8a3 100644 (file)
@@ -1,5 +1,9 @@
 Wed Feb 12 14:36:29 1997  Ian Lance Taylor  <ian@cygnus.com>
 
+       * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks
+       like the expression was based on `.', adjust the value of the
+       symbol.
+
        * config/tc-mips.c (append_insn): Warn about an attempt to put an
        extended instruction in a delay slot when not reordering.  Set
        prev_insn_valid even if not reordering.
index 04be71e9410f5c24c2ee8ccd63dbd6947b71d95e..c3ced95168fc33b10c62246e46b2c457cd48aff7 100644 (file)
@@ -7692,6 +7692,19 @@ my_getExpression (ep, str)
   expression (ep);
   expr_end = input_line_pointer;
   input_line_pointer = save_in;
+
+  /* If we are in mips16 mode, and this is an expression based on `.',
+     then we bump the value of the symbol by 1 since that is how other
+     text symbols are handled.  We don't bother to handle complex
+     expressions, just `.' plus or minus a constant.  */
+  if (mips16
+      && ep->X_op == O_symbol
+      && strcmp (S_GET_NAME (ep->X_add_symbol), FAKE_LABEL_NAME) == 0
+      && S_GET_SEGMENT (ep->X_add_symbol) == now_seg
+      && ep->X_add_symbol->sy_frag == frag_now
+      && ep->X_add_symbol->sy_value.X_op == O_constant
+      && ep->X_add_symbol->sy_value.X_add_number == frag_now_fix ())
+    ++ep->X_add_symbol->sy_value.X_add_number;
 }
 
 /* Turn a string in input_line_pointer into a floating point constant
This page took 0.037067 seconds and 4 git commands to generate.