mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
assemble.c: if a displacement is large enough, we may wrap
If a displacement is as large as the address size currently in use (which is the norm except for 64-bit code), then we should use OUT_WRAP rather than OUT_UNSIGNED; the sign doesn't matter at all. This resolves BR 3392391. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
37d01d1a89
commit
d9bc244f8a
@ -1948,7 +1948,8 @@ static void gencode(struct out_data *data, insn *ins)
|
||||
warn_overflow(ea_data.bytes);
|
||||
|
||||
out_imm(data, opy, ea_data.bytes,
|
||||
(asize > ea_data.bytes) ? OUT_SIGNED : OUT_UNSIGNED);
|
||||
(asize > ea_data.bytes)
|
||||
? OUT_SIGNED : OUT_WRAP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user