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.
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)