mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-11 07:00:21 +02:00
unittests/ASM: Adds test for FSCALE(0, +Inf) raising IE
This commit is contained in:
1 parent
7dc1f54fb6
commit
1bd2ff3fc3
1 file changed
+30
@@ -0,0 +1,30 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"RegData": {
|
||||
"RBX": "0x0001"
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
; FSCALE(+0, +Inf) is 0 * 2^(+Inf) = 0 * Inf, which must raise the invalid
|
||||
; operation exception (IE=1).
|
||||
|
||||
mov r15, 0xe0000000
|
||||
fninit
|
||||
|
||||
mov dword [r15 + 0], 0x00000000
|
||||
mov dword [r15 + 4], 0x7ff00000
|
||||
|
||||
fld qword [r15 + 0]
|
||||
fldz
|
||||
|
||||
fscale
|
||||
|
||||
fstp qword [r15 + 16]
|
||||
fstp st0
|
||||
|
||||
fnstsw ax
|
||||
movzx rbx, ax
|
||||
and rbx, 1
|
||||
|
||||
hlt
|
||||
Reference in new issue
Block a user