diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2012-11-01 22:54:11 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2012-11-01 22:54:11 +0000 |
commit | ddaf2c41912338a19de6e60a1634e32569a2aa10 (patch) | |
tree | 8462b18cfd40008c0ac67f1db9cee5f70abf7916 /gas/config/tc-mips.c | |
parent | e64af278469a4101a3fa515bda4d2d977051b8d4 (diff) | |
download | gdb-ddaf2c41912338a19de6e60a1634e32569a2aa10.zip gdb-ddaf2c41912338a19de6e60a1634e32569a2aa10.tar.gz gdb-ddaf2c41912338a19de6e60a1634e32569a2aa10.tar.bz2 |
gas/
* config/tc-mips.c (append_insn): Set fx_no_overflow for 16-bit
microMIPS branch relocations.
gas/testsuite/
* gas/mips/micromips-b16.d: New test.
* gas/mips/micromips-b16.s: New test source.
* gas/mips/mips.exp: Run the new test.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index dcea7bc..4f7ead9 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -4464,6 +4464,11 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr, || lo16_reloc_p (reloc_type[0]))) ip->fixp[0]->fx_no_overflow = 1; + /* These relocations can have an addend that won't fit in 2 octets. */ + if (reloc_type[0] == BFD_RELOC_MICROMIPS_7_PCREL_S1 + || reloc_type[0] == BFD_RELOC_MICROMIPS_10_PCREL_S1) + ip->fixp[0]->fx_no_overflow = 1; + if (mips_relax.sequence) { if (mips_relax.first_fixup == 0) |