diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-01-28 21:14:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-01-28 21:14:37 +0000 |
commit | 39bb58e0adc7a5caccdd284d3ead53728214f5dd (patch) | |
tree | 3b970045e1ccfb8a614f079e8750d86803858b72 /gas/config | |
parent | 3b320c48cff7d634900a31d98043580e4d4e950d (diff) | |
download | gdb-39bb58e0adc7a5caccdd284d3ead53728214f5dd.zip gdb-39bb58e0adc7a5caccdd284d3ead53728214f5dd.tar.gz gdb-39bb58e0adc7a5caccdd284d3ead53728214f5dd.tar.bz2 |
* config/tc-mips.c (append_insn): Give an error for jumps to a
misaligned address.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-mips.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 828ebc0..3378aeb 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1461,10 +1461,16 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi) break; case BFD_RELOC_MIPS_JMP: + if ((address_expr->X_add_number & 3) != 0) + as_bad ("jump to misaligned address (0x%lx)", + (unsigned long) address_expr->X_add_number); ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0x3ffffff; break; case BFD_RELOC_MIPS16_JMP: + if ((address_expr->X_add_number & 3) != 0) + as_bad ("jump to misaligned address (0x%lx)", + (unsigned long) address_expr->X_add_number); ip->insn_opcode |= (((address_expr->X_add_number & 0x7c0000) << 3) | ((address_expr->X_add_number & 0xf800000) >> 7) |