mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
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>
This commit is contained in:
33
test/movszx.asm
Normal file
33
test/movszx.asm
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
Reference in New Issue
Block a user