mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-13 09:06:17 +00:00
Adds unit tests for 32bit pusha
This commit is contained in:
parent
2a81468663
commit
d6c3518b74
44
unittests/32Bit_ASM/Primary/Primary_60.asm
Normal file
44
unittests/32Bit_ASM/Primary/Primary_60.asm
Normal file
@ -0,0 +1,44 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x6",
|
||||
"RCX": "0x5",
|
||||
"RDX": "0x4",
|
||||
"RSP": "0xE0000020",
|
||||
"RBX": "0x3",
|
||||
"RBP": "0x2",
|
||||
"RSI": "0x1",
|
||||
"RDI": "0x0"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov esp, 0xe0000020
|
||||
|
||||
mov eax, 0
|
||||
mov ecx, 1
|
||||
mov edx, 2
|
||||
mov ebx, 3
|
||||
mov ebp, 4
|
||||
mov esi, 5
|
||||
mov edi, 6
|
||||
|
||||
pushad
|
||||
|
||||
; Invert the order
|
||||
|
||||
mov eax, [esp + 4 * 0]
|
||||
mov ecx, [esp + 4 * 1]
|
||||
mov edx, [esp + 4 * 2]
|
||||
; sp here
|
||||
mov ebx, [esp + 4 * 4]
|
||||
mov ebp, [esp + 4 * 5]
|
||||
mov esi, [esp + 4 * 6]
|
||||
mov edi, [esp + 4 * 7]
|
||||
|
||||
; Load sp last
|
||||
mov esp, [esp + 4 * 3]
|
||||
|
||||
|
||||
hlt
|
42
unittests/32Bit_ASM/Primary/Primary_60_2.asm
Normal file
42
unittests/32Bit_ASM/Primary/Primary_60_2.asm
Normal file
@ -0,0 +1,42 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x6",
|
||||
"RCX": "0x5",
|
||||
"RDX": "0x4",
|
||||
"RSP": "0xE0000020",
|
||||
"RBX": "0x3",
|
||||
"RBP": "0x2",
|
||||
"RSI": "0x1",
|
||||
"RDI": "0x0"
|
||||
},
|
||||
"Mode": "32BIT"
|
||||
}
|
||||
%endif
|
||||
|
||||
mov esp, 0xe0000020
|
||||
|
||||
mov eax, 0
|
||||
mov ecx, 1
|
||||
mov edx, 2
|
||||
mov ebx, 3
|
||||
mov ebp, 4
|
||||
mov esi, 5
|
||||
mov edi, 6
|
||||
|
||||
o16 pusha
|
||||
|
||||
; Invert the order
|
||||
mov ax, [esp + 2 * 0]
|
||||
mov cx, [esp + 2 * 1]
|
||||
mov dx, [esp + 2 * 2]
|
||||
; sp here
|
||||
mov bx, [esp + 2 * 4]
|
||||
mov bp, [esp + 2 * 5]
|
||||
mov si, [esp + 2 * 6]
|
||||
mov di, [esp + 2 * 7]
|
||||
|
||||
; Load sp last
|
||||
mov sp, [esp + 2 * 3]
|
||||
|
||||
hlt
|
Loading…
Reference in New Issue
Block a user