Unit test to ensure 32bit IDIV/DIV ZExts to 64bit result

This commit is contained in:
Ryan Houdek 2020-09-14 16:29:13 -07:00 committed by Stefanos Kornilios Mitsis Poiitidis
parent c99cc9c6d3
commit ad70f2fa81
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,20 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x80000000",
"RDX": "0"
}
}
%endif
mov r15, 0xe0000000
mov eax, 0x2
mov [r15 + 8 * 0], eax
mov rax, 0xFFFFFFFF00000000
mov rdx, 0xFFFFFFFF00000001
div dword [r15 + 8 * 0]
hlt

View File

@ -0,0 +1,22 @@
%ifdef CONFIG
{
"RegData": {
"RAX": "0x40000000",
"RDX": "0"
}
}
%endif
mov r15, 0xe0000000
mov eax, 0x4
mov [r15 + 8 * 0], eax
mov rax, 0xFFFFFFFF00000000
mov rdx, 0xFFFFFFFF00000001
idiv dword [r15 + 8 * 0]
hlt