[PATCH v2] x86: ignore high register select bit(s) in 32- and 16-bit modes

H.J. Lu hjl.tools@gmail.com
Thu Nov 16 03:47:00 GMT 2017


On Tue, Nov 14, 2017 at 11:57 PM, Jan Beulich <JBeulich@suse.com> wrote:
> While commits 9889cbb14e ("Check invalid mask registers") and
> abfcb414b9 ("X86: Ignore REX_B bit for 32-bit XOP instructions") went a
> bit into the right direction, this wasn't quite enough:
> - VEX.vvvv has its high bit ignored
> - EVEX.vvvv has its high bit ignored together with EVEX.v'
> - the high bits of {,E}VEX.vvvv should not be prematurely zapped, to
>   allow proper checking of them when the fields has to hold al ones
> - when the high bits of an immediate specify a register, bit 7 is
>   ignored
> ---
> v2: Parts of the test were moved to earlier, already approved (and
>     committed) patches.
>
> gas/
> 2017-11-15  Jan Beulich  <jbeulich@suse.com>
>
>         * testsuite/gas/i386/noextreg.s: Add tests with register index
>         bit 3 set.
>         * testsuite/gas/i386/noextreg.d: Adjust expectations.
>

The new test fails on i386 when binutils is configured with:

--enable-plugins --disable-gdb --disable-sim --disable-readline
--disable-libdecnumber --enable-compressed-debug-sections=gas,ld
i686-linux \
\
--prefix=/usr/local \
--with-local-prefix=/usr/local

since .code64 isn't supported:

Executing on host: sh -c {../as-new  --32  -o dump.o
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s
2>&1}  /dev/null gas.out (timeout = 300)
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:
Assembler messages:
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:5:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:6:
Error: too many memory references for `andn'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:10:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:11:
Error: too many memory references for `tzmsk'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:15:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:16:
Error: operand size mismatch for `llwpcb'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:
Assembler messages:
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:5:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:6:
Error: too many memory references for `andn'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:10:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:11:
Error: too many memory references for `tzmsk'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:15:
Error: unknown pseudo-op: `.code64'
/export/gnu/import/git/sources/binutils-gdb/gas/testsuite/gas/i386/noextreg.s:16:
Error: operand size mismatch for `llwpcb'

Please fix it.

Thanks.


-- 
H.J.



More information about the Binutils mailing list