diff options
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e3978d..a9b7c4c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 04be71e..c3ced95 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -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 |