aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index cf6c8e7..f9bf733 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,7 +1,9 @@
Tue Jan 28 15:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
- * config/tc-mips.c (md_apply_fix): Make a branch to an odd address
- an error rather than a warning.
+ * config/tc-mips.c (append_insn): Give an error for jumps to a
+ misaligned address.
+ (md_apply_fix): Make a branch to an odd address an error rather
+ than a warning.
* config/tc-mips.c (md_convert_frag): If the user explicitly
requested an extended opcode, pass warn as true to mips16_immed.
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)