0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/test/movszx.asm
H. Peter Anvin 19a6fca486 insns.dat: add MOVSX -> CBW/CWDE/CDQE optimiztion; add MOVZX[D]
Add MOVSX[D] -> CBW/CWDE/CDQE optimization patterns when the suitable
form of the AX register are referenced.

Add MOVZX reg64,rm32 pattern which converts to a 32-bit MOV.

Add MOVZXD reg64,rm32 alias pattern for consistency.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-08-04 16:29:08 -07:00

34 lines
413 B
NASM

bits 64
movsx ax,al
movsx eax,al
movsx eax,ax
movsx rax,al
movsx rax,ax
movsx rax,eax
movsxd rax,eax
movsx cx,cl
movsx ecx,cl
movsx ecx,cx
movsx rcx,cl
movsx rcx,cx
movsx rcx,ecx
movsxd rcx,ecx
movzx ax,al
movzx eax,al
movzx eax,ax
movzx rax,al
movzx rax,ax
movzx rax,eax
movzxd rax,eax
movzx cx,cl
movzx ecx,cl
movzx ecx,cx
movzx rcx,cl
movzx rcx,cx
movzx rcx,ecx
movzxd rcx,ecx