Test for mov [mem], sreg

This commit is contained in:
Fabian 2020-12-31 19:14:29 -06:00
parent 1c474eabdb
commit 7f41e6fe48

21
tests/nasm/mov_sreg.asm Normal file
View file

@ -0,0 +1,21 @@
global _start
section .data
align 16
mydword:
dd 0
%include "header.inc"
; 32-bit register move should set higher bits to zero
mov eax, -1
mov eax, ss
and eax, 0xffff0000
; 32-bit memory move should preserver higher bits
mov dword [mydword], 0xdeadbeef
mov [mydword], ss
mov ebx, [mydword]
and ebx, 0xffff0000
%include "footer.inc"