diff options
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index b60266e..77a72c0 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -4359,8 +4359,12 @@ mips_ip (str, ip) } else { + /* The upper bound should be 0x8000, but + unfortunately the MIPS assembler accepts numbers + from 0x8000 to 0xffff and sign extends them, and + we want to be compatible. */ if (imm_expr.X_add_number < -0x8000 || - imm_expr.X_add_number >= 0x8000) + imm_expr.X_add_number >= 0x10000) { if (insn + 1 < &mips_opcodes[NUMOPCODES] && !strcmp (insn->name, insn[1].name)) |