Tests: Add xchg 32 and 64 bit

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2020-08-20 10:32:38 +03:00
parent 9457119c2f
commit 0736b13800
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,24 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x0000000045464748",
"RBX": "0x41424344FFFFFFFF"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, -1
xchg dword [rdx + 8 * 0], eax
mov rbx, [rdx + 8 * 0]
hlt

View File

@ -0,0 +1,24 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x4142434445464748",
"RBX": "0xFFFFFFFFFFFFFFFF"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, -1
xchg qword [rdx + 8 * 0], rax
mov rbx, [rdx + 8 * 0]
hlt