[PATCH] x86: Warn .insn instruction with length > 15 bytes

H.J. Lu hjl.tools@gmail.com
Tue Feb 6 14:49:21 GMT 2024


On Tue, Feb 6, 2024 at 6:43 AM Michael Matz <matz@suse.de> wrote:
>
> Hello,
>
> On Tue, 6 Feb 2024, H.J. Lu wrote:
>
> > > > We issue a warning when something is wrong in input, but still manage
> > > > to generate an instruction.   This is an error case.
> > >
> > > I disagree. It was a warning until you changed it (without me really
> > > agreeing), and some hypothetical vendor could come and lift the limit,
> > > on precisely the basis that there are legal encodings exceeding it. I'm
> > > okay if this can be forced to be an error, but I continue to think that
> > > it ought to be a warning only by default.
> > >
> >
> > It is an error on both Intel and AMD processors.   There is no
> > valid reason not to be an error at the moment.
>
> Jan gave you one.  I would prefer for the assembler to not be anally

That is not a valid reason.  There is no such processor in the foreseeable
future.

> retentive.  An error that can be disabled is completely enough for this.
>
> (I would wish for a general demote-all-errors-to-warnings option, like we
> already have a promote-all-warnings-to-errors; but lacking this an option
> to merely disable "errors" for avoiding specific random hardware behaviour
> would be fine as well)
>
>
> Ciao,
> Michael.



-- 
H.J.


More information about the Binutils mailing list