mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-07 14:10:23 +00:00
Tests: Add xchg 32 and 64 bit
This commit is contained in:
parent
9457119c2f
commit
0736b13800
24
unittests/ASM/Primary/Primary_87_2.asm
Normal file
24
unittests/ASM/Primary/Primary_87_2.asm
Normal 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
|
24
unittests/ASM/Primary/Primary_87_3.asm
Normal file
24
unittests/ASM/Primary/Primary_87_3.asm
Normal 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
|
Loading…
Reference in New Issue
Block a user