mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-08 22:52:51 +00:00
Ensures inc/dec flags match between locked and non locked memory
This commit is contained in:
parent
5704ce4db9
commit
ad37555d70
69
unittests/ASM/PrimaryGroup/5_FF_00_2.asm
Normal file
69
unittests/ASM/PrimaryGroup/5_FF_00_2.asm
Normal file
@ -0,0 +1,69 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"R14": "0x0",
|
||||
"R13": "0x0",
|
||||
"R12": "0x0",
|
||||
"R11": "0x0"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
mov r15, 0xe0000000
|
||||
|
||||
mov rax, 0x4142434445464748
|
||||
mov [r15 + 8 * 0], rax
|
||||
mov [r15 + 8 * 1], rax
|
||||
mov [r15 + 8 * 2], rax
|
||||
mov [r15 + 8 * 3], rax
|
||||
mov [r15 + 8 * 4], rax
|
||||
mov [r15 + 8 * 5], rax
|
||||
mov [r15 + 8 * 6], rax
|
||||
|
||||
; Ensures that all the flag setting matches correctly
|
||||
inc word [r15 + 8 * 0 + 0]
|
||||
mov rax, 0
|
||||
mov r14, 0
|
||||
lahf
|
||||
mov r14, rax
|
||||
|
||||
lock inc word [r15 + 8 * 1 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r14, rax
|
||||
|
||||
inc dword [r15 + 8 * 2 + 0]
|
||||
mov rax, 0
|
||||
mov r13, 0
|
||||
lahf
|
||||
mov r13, rax
|
||||
|
||||
lock inc dword [r15 + 8 * 3 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r13, rax
|
||||
|
||||
inc qword [r15 + 8 * 4 + 0]
|
||||
mov rax, 0
|
||||
mov r12, 0
|
||||
lahf
|
||||
mov r12, rax
|
||||
|
||||
lock inc qword [r15 + 8 * 5 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r12, rax
|
||||
|
||||
inc byte [r15 + 8 * 4 + 0]
|
||||
mov rax, 0
|
||||
mov r11, 0
|
||||
lahf
|
||||
mov r11, rax
|
||||
|
||||
lock inc byte [r15 + 8 * 5 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r11, rax
|
||||
|
||||
|
||||
hlt
|
69
unittests/ASM/PrimaryGroup/5_FF_01_2.asm
Normal file
69
unittests/ASM/PrimaryGroup/5_FF_01_2.asm
Normal file
@ -0,0 +1,69 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"R14": "0x0",
|
||||
"R13": "0x0",
|
||||
"R12": "0x0",
|
||||
"R11": "0x0"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
mov r15, 0xe0000000
|
||||
|
||||
mov rax, 0x4142434445464748
|
||||
mov [r15 + 8 * 0], rax
|
||||
mov [r15 + 8 * 1], rax
|
||||
mov [r15 + 8 * 2], rax
|
||||
mov [r15 + 8 * 3], rax
|
||||
mov [r15 + 8 * 4], rax
|
||||
mov [r15 + 8 * 5], rax
|
||||
mov [r15 + 8 * 6], rax
|
||||
|
||||
; Ensures that all the flag setting matches correctly
|
||||
dec word [r15 + 8 * 0 + 0]
|
||||
mov rax, 0
|
||||
mov r14, 0
|
||||
lahf
|
||||
mov r14, rax
|
||||
|
||||
lock dec word [r15 + 8 * 1 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r14, rax
|
||||
|
||||
dec dword [r15 + 8 * 2 + 0]
|
||||
mov rax, 0
|
||||
mov r13, 0
|
||||
lahf
|
||||
mov r13, rax
|
||||
|
||||
lock dec dword [r15 + 8 * 3 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r13, rax
|
||||
|
||||
dec qword [r15 + 8 * 4 + 0]
|
||||
mov rax, 0
|
||||
mov r12, 0
|
||||
lahf
|
||||
mov r12, rax
|
||||
|
||||
lock dec qword [r15 + 8 * 5 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r12, rax
|
||||
|
||||
dec byte [r15 + 8 * 4 + 0]
|
||||
mov rax, 0
|
||||
mov r11, 0
|
||||
lahf
|
||||
mov r11, rax
|
||||
|
||||
lock dec byte [r15 + 8 * 5 + 0]
|
||||
mov rax, 0
|
||||
lahf
|
||||
xor r11, rax
|
||||
|
||||
|
||||
hlt
|
Loading…
Reference in New Issue
Block a user