mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
unittests: add 32-bit masking divide unit test
fails on main. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
d23bb01e96
commit
cfd4318080
1 file changed
+20
@@ -0,0 +1,20 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RAX": "0x80000001",
|
||||
"RDX": "0x1"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
; FEX had a bug where we failed to ignore garbage upper bits of a 32-bit divisor
|
||||
; with div. This test does a division with garbage in the upper bits where the
|
||||
; result would differ if they were not ignored.
|
||||
|
||||
; 0x100000003 / 0x2 = 0x80000001 remainder 1
|
||||
mov edx, 1
|
||||
mov eax, 3
|
||||
mov rcx, 0xdeadbeef00000002
|
||||
div ecx
|
||||
|
||||
hlt
|
||||
Reference in new issue
Block a user