nasm/test/a64.asm
H. Peter Anvin (Intel) d85a6101d7 BR 3392681: handle a64 instruction patters correctly
The a64 instruction patterns would incorrectly force REX to zero at a
point where REX prefixes have already been assigned. This is not only
incorrect in case of instructions which can use high registers, but it
causes an assertion failure. It happened to work for J*CXZ and LOOP*.

Reported-by: Philip Lantz <philip.lantz@intel.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-22 13:52:02 -07:00

22 lines
342 B
NASM

bits 64
start:
invlpga eax,ecx
invlpga rax,ecx
jecxz start
jrcxz start
loop start,ecx
loop start,rcx
loope start,ecx
loope start,rcx
loopz start,ecx
loopz start,rcx
loopne start,ecx
loopne start,rcx
loopnz start,ecx
loopnz start,rcx
clzero eax
clzero rax
movdir64b eax,[edi]
movdir64b rax,[rdi]
umonitor eax
umonitor rax