From 68f3a04f5b45bbdbe1360708cadff0bca57ea4fa Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 22 Oct 2020 18:54:10 -0700 Subject: [PATCH] Adds unit tests for 32bit popa --- unittests/32Bit_ASM/Primary/Primary_61.asm | 30 ++++++++++++++++ unittests/32Bit_ASM/Primary/Primary_61_2.asm | 38 ++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 unittests/32Bit_ASM/Primary/Primary_61.asm create mode 100644 unittests/32Bit_ASM/Primary/Primary_61_2.asm diff --git a/unittests/32Bit_ASM/Primary/Primary_61.asm b/unittests/32Bit_ASM/Primary/Primary_61.asm new file mode 100644 index 000000000..fe061cd14 --- /dev/null +++ b/unittests/32Bit_ASM/Primary/Primary_61.asm @@ -0,0 +1,30 @@ +%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 + +push dword 0x6 +push dword 0x5 +push dword 0x4 +push dword 0x3 +push dword 0x41424344 ; Skipped +push dword 0x2 +push dword 0x1 +push dword 0x0 + +popad + +hlt diff --git a/unittests/32Bit_ASM/Primary/Primary_61_2.asm b/unittests/32Bit_ASM/Primary/Primary_61_2.asm new file mode 100644 index 000000000..183f582f0 --- /dev/null +++ b/unittests/32Bit_ASM/Primary/Primary_61_2.asm @@ -0,0 +1,38 @@ +%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, 0xFF +mov ecx, 0xFF +mov edx, 0xFF +mov ebx, 0xFF +mov ebp, 0xFF +mov esi, 0xFF +mov edi, 0xFF + +push word 0x6 +push word 0x5 +push word 0x4 +push word 0x3 +push word 0x4142 ; Skipped +push word 0x2 +push word 0x1 +push word 0x0 + +o16 popa + +hlt