Tests: Add a basic const pooling test

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2021-01-16 17:16:31 +02:00
parent b322dcb3f6
commit 8b93d0a278

View File

@ -0,0 +1,83 @@
%ifdef CONFIG
{
"Match": "All",
"RegData": {
"RAX": "0xf"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
; generate a lot of re-used constants
mov dword[rdx], 0x0
mov dword[rdx], 0x1
mov dword[rdx], 0x2
mov dword[rdx], 0x3
mov dword[rdx], 0x4
mov dword[rdx], 0x5
mov dword[rdx], 0x6
mov dword[rdx], 0x7
mov dword[rdx], 0x8
mov dword[rdx], 0x9
mov dword[rdx], 0xa
mov dword[rdx], 0xb
mov dword[rdx], 0xc
mov dword[rdx], 0xd
mov dword[rdx], 0xe
mov dword[rdx], 0xf
mov dword[rdx], 0x0
mov dword[rdx], 0x1
mov dword[rdx], 0x2
mov dword[rdx], 0x3
mov dword[rdx], 0x4
mov dword[rdx], 0x5
mov dword[rdx], 0x6
mov dword[rdx], 0x7
mov dword[rdx], 0x8
mov dword[rdx], 0x9
mov dword[rdx], 0xa
mov dword[rdx], 0xb
mov dword[rdx], 0xc
mov dword[rdx], 0xd
mov dword[rdx], 0xe
mov dword[rdx], 0xf
mov dword[rdx], 0x0
mov dword[rdx], 0x1
mov dword[rdx], 0x2
mov dword[rdx], 0x3
mov dword[rdx], 0x4
mov dword[rdx], 0x5
mov dword[rdx], 0x6
mov dword[rdx], 0x7
mov dword[rdx], 0x8
mov dword[rdx], 0x9
mov dword[rdx], 0xa
mov dword[rdx], 0xb
mov dword[rdx], 0xc
mov dword[rdx], 0xd
mov dword[rdx], 0xe
mov dword[rdx], 0xf
mov dword[rdx], 0x0
mov dword[rdx], 0x1
mov dword[rdx], 0x2
mov dword[rdx], 0x3
mov dword[rdx], 0x4
mov dword[rdx], 0x5
mov dword[rdx], 0x6
mov dword[rdx], 0x7
mov dword[rdx], 0x8
mov dword[rdx], 0x9
mov dword[rdx], 0xa
mov dword[rdx], 0xb
mov dword[rdx], 0xc
mov dword[rdx], 0xd
mov dword[rdx], 0xe
mov dword[rdx], 0xf
mov eax, dword[rdx]
hlt