mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 16:00:18 +02:00
Test behaviour themselves not changed at all, just data moved or aligned. For tests that aren't explicitly testing out SMC behaviour, we were accidentally relying on some aggressive SMC tracking by mixing data and code in the same page. To fix this just align the test's data to the next page boundary which means FEX's SMC tracking won't get triggered since it is no longer living in the same page. This has been a thorn for a while, so just get rid of it. We obviously still have ASM tests that still exist that /do/ rely on SMC, and those are still expected to work.
33 lines
652 B
NASM
33 lines
652 B
NASM
%ifdef CONFIG
|
|
{
|
|
"RegData": {
|
|
"RAX": "1"
|
|
},
|
|
"Mode": "32BIT"
|
|
}
|
|
%endif
|
|
|
|
; Test ∞ - ∞ using FSUB with memory operand = Invalid Operation (should set bit 0 of status word) - 32bit mode
|
|
|
|
; Setup memory with +infinity (0x7FF0000000000000 for double precision +infinity)
|
|
; In 32-bit mode, we need to store the double in two parts
|
|
mov dword [rel .data], 0x00000000 ; Low 32 bits
|
|
mov dword [rel .data+4], 0x7FF00000 ; High 32 bits
|
|
|
|
; Create +infinity by dividing 1.0 by 0.0
|
|
fld1
|
|
fldz
|
|
fdiv
|
|
|
|
; Subtract ∞ - ∞ using memory operand - this should be invalid
|
|
fsub qword [rel .data]
|
|
|
|
fstsw ax
|
|
and eax, 1
|
|
|
|
hlt
|
|
|
|
section .data
|
|
align 4096
|
|
.data: dq 0
|