diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-08-04 21:00:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-08-04 21:00:37 +0000 |
commit | 703f5e6e2825cc376fd1d69fb2e83b6e0e8a62a0 (patch) | |
tree | 398cd0cf117d01771d7c88c7e8821f54524664b5 /gas/config | |
parent | 7ab51306ae9b05af2606f310651923d77b937aae (diff) | |
download | gdb-703f5e6e2825cc376fd1d69fb2e83b6e0e8a62a0.zip gdb-703f5e6e2825cc376fd1d69fb2e83b6e0e8a62a0.tar.gz gdb-703f5e6e2825cc376fd1d69fb2e83b6e0e8a62a0.tar.bz2 |
* config/tc-mips.c (macro): Fix handling of a double load from a
symbol plus an offset.
This is the test case, with -mips1:
l.d $f0,values+256
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-mips.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 64c7350..790a886 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -5295,9 +5295,19 @@ macro (ip) subtract it out, and then subtract another 4 to make the first reloc come out right. The second reloc will come out right because we are going to add 4 to - offset_expr when we build its instruction below. */ - offset_expr.X_add_number -= 8; - offset_expr.X_op = O_constant; + offset_expr when we build its instruction below. + + If we have a symbol, then we don't want to include + the offset, because it will wind up being included + when we generate the reloc. */ + + if (offset_expr.X_op == O_constant) + offset_expr.X_add_number -= 8; + else + { + offset_expr.X_add_number = -4; + offset_expr.X_op = O_constant; + } } macro_build_lui (p, &icnt, &offset_expr, AT); if (p != NULL) |