diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-12-16 12:39:22 +0000 |
---|---|---|
committer | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-12-19 20:24:16 +0000 |
commit | 0866e94c879f256ddb1bb7149c5f9fc7b80fda89 (patch) | |
tree | 8dd3d1c05ec9f39d52894befbe3ca1e1b12f7464 /gas/config/tc-mips.c | |
parent | 13e322759bd9d6d64e68b200084341681687fb74 (diff) | |
download | gdb-0866e94c879f256ddb1bb7149c5f9fc7b80fda89.zip gdb-0866e94c879f256ddb1bb7149c5f9fc7b80fda89.tar.gz gdb-0866e94c879f256ddb1bb7149c5f9fc7b80fda89.tar.bz2 |
Rework the alignment check for BFD_RELOC_MIPS_18_PCREL_S3.
gas/
* config/tc-mips.c (md_apply_fix): Apply alignment check
to the symbol and offset rather than *valP for
BFD_RELOC_MIPS_18_PCREL_S3. Also update the error message
for BFD_RELOC_MIPS_19_PCREL_S2.
gas/testsuite/
* gas/mips/r6-64.s: Remove .align directives from LDPC
instructions and add further tests for LDPC.
* gas/mips/r6-64-n32.d: remove the NOPs from LDPC expected
output and update for new tests.
* gas/mips/r6-64-n64.d: Likewise.
* gas/mips/ldpc-unalign.l: New file.
* gas/mips/ldpc-unalign.s: Likewise.
* gas/mips/mips.exp: Run ldpc-unalign test.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index c9266db..8ecf0c6 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -15009,10 +15009,14 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) break; case BFD_RELOC_MIPS_18_PCREL_S3: - if ((*valP & 0x7) != 0) + if ((S_GET_VALUE (fixP->fx_addsy) & 0x7) != 0) as_bad_where (fixP->fx_file, fixP->fx_line, - _("PC-relative access to misaligned address (%lx)"), - (long) *valP); + _("PC-relative access using misaligned symbol (%lx)"), + (long) S_GET_VALUE (fixP->fx_addsy)); + if ((fixP->fx_offset & 0x7) != 0) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("PC-relative access using misaligned offset (%lx)"), + (long) fixP->fx_offset); gas_assert (!fixP->fx_done); break; @@ -15021,7 +15025,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) if ((*valP & 0x3) != 0) as_bad_where (fixP->fx_file, fixP->fx_line, _("PC-relative access to misaligned address (%lx)"), - (long) *valP); + (long) (S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset)); gas_assert (!fixP->fx_done); break; |