+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (append_insn): Add jump address range overflow
+ check.
+
2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (md_parse_option): Fix comment. Allow -mabi option
if ((address_expr->X_add_number & 3) != 0)
as_bad (_("jump to misaligned address (0x%lx)"),
(unsigned long) address_expr->X_add_number);
+ if (address_expr->X_add_number & ~0xfffffff
+ || address_expr->X_add_number > 0x7fffffc)
+ as_bad (_("jump address range overflow (0x%lx)"),
+ (unsigned long) address_expr->X_add_number);
ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0x3ffffff;
break;
if ((address_expr->X_add_number & 3) != 0)
as_bad (_("jump to misaligned address (0x%lx)"),
(unsigned long) address_expr->X_add_number);
+ if (address_expr->X_add_number & ~0xfffffff
+ || address_expr->X_add_number > 0x7fffffc)
+ as_bad (_("jump address range overflow (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)