FEX/unittests/ASM/STOSQ2_REPNE.asm
Ryan Houdek 8931ddc382 unittests: Duplicates rep string unit tests with repne
These are exactly the same except using the other prefix.
Hardware tests confirm that this behave the same
2021-08-21 20:19:38 -07:00

33 lines
443 B
NASM

%ifdef CONFIG
{
"Match": "All",
"RegData": {
"RAX": "0xDEADBEEFBAD0DAD1"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
; Starting address to store to
mov rdi, 0xe8000000
; Store value
mov rax, 0xDEADBEEFBAD0DAD1
mov [rdi], rax
; Set counter to zero
mov ecx, 0
; Set store value to zero
mov rax, 0
repne STOSQ
; Reload what we just stored
; Ensure that STOSQ didn't write
mov rdi, 0xe8000000
mov rax, [rdi]
hlt