From: Ian Lance Taylor Date: Wed, 12 Feb 1997 20:38:20 +0000 (+0000) Subject: * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb17f56cf52b7f9e6974b1de6017db2d99fe5d4f;p=binutils-gdb.git * config/tc-mips.c (my_getExpression): In mips16 mode, if it looks like the expression was based on `.', adjust the value of the symbol. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 2e3978d2a03..a9b7c4ca020 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Wed Feb 12 14:36:29 1997 Ian Lance Taylor + * 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 04be71e9410..c3ced95168f 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