mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-07 14:10:23 +00:00
f156615a3a
Both x80 and x64 variants.
85 lines
1.3 KiB
NASM
85 lines
1.3 KiB
NASM
%ifdef CONFIG
|
|
{
|
|
"RegData": {
|
|
"RSI": ["0x18"]
|
|
}
|
|
}
|
|
%endif
|
|
|
|
mov rdx, 0xe0000000
|
|
mov rsi, 0
|
|
|
|
; Matching positive-positive
|
|
mov rax, 0x3ff0000000000000 ; 1.0
|
|
mov [rdx + 8 * 0], rax
|
|
mov eax, 1
|
|
mov [rdx + 8 * 1], eax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
ficomp dword [rdx + 8 * 1]
|
|
|
|
; Get the status word
|
|
mov rax, 0
|
|
fstsw ax
|
|
; Extract C3 to see if it was equal
|
|
shr ax, 14
|
|
and ax, 1
|
|
or rsi, rax
|
|
shl rsi, 1
|
|
|
|
; Matching negative-negative
|
|
mov rax, 0xbff0000000000000 ; -1.0
|
|
mov [rdx + 8 * 0], rax
|
|
mov eax, -1
|
|
mov [rdx + 8 * 1], eax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
ficomp dword [rdx + 8 * 1]
|
|
|
|
; Get the status word
|
|
mov rax, 0
|
|
fstsw ax
|
|
; Extract C3 to see if it was equal
|
|
shr ax, 14
|
|
and ax, 1
|
|
or rsi, rax
|
|
shl rsi, 1
|
|
|
|
; Nonmatching negative-positive
|
|
mov rax, 0xbff0000000000000 ; -1.0
|
|
mov [rdx + 8 * 0], rax
|
|
mov eax, 1
|
|
mov [rdx + 8 * 1], eax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
ficomp dword [rdx + 8 * 1]
|
|
|
|
; Get the status word
|
|
mov rax, 0
|
|
fstsw ax
|
|
; Extract C3 to see if it was equal
|
|
shr ax, 14
|
|
and ax, 1
|
|
or rsi, rax
|
|
shl rsi, 1
|
|
|
|
; Nonmatching positive-negative
|
|
mov rax, 0x3ff0000000000000 ; 1.0
|
|
mov [rdx + 8 * 0], rax
|
|
mov eax, -1
|
|
mov [rdx + 8 * 1], eax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
ficomp dword [rdx + 8 * 1]
|
|
|
|
; Get the status word
|
|
mov rax, 0
|
|
fstsw ax
|
|
; Extract C3 to see if it was equal
|
|
shr ax, 14
|
|
and ax, 1
|
|
or rsi, rax
|
|
shl rsi, 1
|
|
|
|
hlt
|