nasm/test/immsize.asm
H. Peter Anvin (Intel) e56c2dc5b7 insns.pl: audit for impossible Sx patterns; fix a few
Break the instruction processing if there are impossible combinations
of Sx flags and operand sizes. If the intent is to always require
explicit sizes, use the SX flag.

The INSERTPS instruction pattern was explicitly wrong, the rest of
these are nuisance fixes.

TODO: fix the disassembler to be able to exclude patterns where these
bits don't matter.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-30 15:16:11 -07:00

36 lines
556 B
NASM

bits 64
%macro b 1
%1 ax,16
%1 eax,16
%1 rax,16
%1 word [rdi],16
%1 dword [rdi],16
%1 qword [rdi],16
%1 ax,byte 16
%1 eax,byte 16
%1 rax,byte 16
%1 word [rdi],byte 16
%1 dword [rdi],byte 16
%1 qword [rdi],byte 16
%endmacro
b bt
b btc
b btr
b bts
imul ax,[rdi],16
imul ax,word [rdi],16
imul ax,[rdi],byte 16
imul ax,word [rdi],byte 16
imul eax,[rdi],16
imul eax,dword [rdi],16
imul eax,[rdi],byte 16
imul eax,dword [rdi],byte 16
imul rax,[rdi],16
imul rax,qword [rdi],16
imul rax,[rdi],byte 16
imul rax,qword [rdi],byte 16