This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] x86/Intel: don't accept bogus instructions

On Thu, Jun 30, 2016 at 5:25 AM, Jan Beulich <> wrote:
> ... due to their last byte looking like a suffix, when after its
> stripping a matching instruction can be found. Since memory operand
> size specifiers in Intel mode get converted into suffix representation
> internally, we need to keep track of the actual mnemonic suffix which
> may have got trimmed off, and check its validity while looking for a
> matching template. I tripper over this quite some time again after
> support for AMD's SSE5 instructions got removed, as at that point some
> of the SSE5 mnemonics, other than expected, didn't fail to assemble.
> But the problem affects many more instructions, namely (almost) all
> MMX, SSE, and AVX ones as it looks. I don't think it makes sense to
> add a testcase covering all of them, nor do I think it makes sense to
> pick out some random examples for a new test case.
> gas/
> 2016-06-30  Jan Beulich  <>
>         PR gas/20318
>         * config/tc-i386.c (match_template): Add char parameter,
>         consumed in Intel mode for an extra suffix check.
>         (md_assemble): New local variable mnem_suffix.
> gas/testsuite/
> 2016-06-30  Jan Beulich  <>
>         * gas/i386/suffix-bad.s: New.
>         * gas/i386/suffix-bad.l: New.
>         * gas/i386/i386.exp: Run new test (twice).

OK.  Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]