[PATCH v2] x86: Disallow instructions with length > 15 bytes
Jan Beulich
jbeulich@suse.com
Fri Feb 2 11:41:28 GMT 2024
On 02.02.2024 12:33, H.J. Lu wrote:
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -11780,8 +11780,8 @@ output_insn (const struct last_insn *last_insn)
> {
> j = encoding_length (insn_start_frag, insn_start_off, frag_more (0));
> if (j > 15)
> - as_warn (_("instruction length of %u bytes exceeds the limit of 15"),
> - j);
> + as_bad (_("instruction length of %u bytes exceeds the limit of 15"),
> + j);
When taking purely a gas perspective, this may be okay. But I'd like
to retain the ability to generate overlong insns (without resorting
to .byte), so there wants to be a way to downgrade the error to a
warning. This is useful in particular when trying to make testcases
for disassemblers or other software decoding insns.
Jan
More information about the Binutils
mailing list