FEX/unittests/ASM/X87_F64/DA_04_F64.asm
Ryan Houdek 555d2e5b0b unittests: Adds negative integer x87 tests
All of these operations were only testing positive integers which is why
they didn't show 16-bit failures.

Adds a bunch of negative tests to each ones now that #2314 is merged,
which would have caught them.
2023-01-08 10:44:46 -08:00

37 lines
554 B
NASM

%ifdef CONFIG
{
"RegData": {
"RCX": ["0xbff0000000000000"],
"RSI": ["0x4008000000000000"]
},
"Env": { "FEX_X87REDUCEDPRECISION" : "1" }
}
%endif
mov rdx, 0xe0000000
mov rax, 0x3ff0000000000000 ; 1.0
mov [rdx + 8 * 0], rax
mov eax, 2
mov [rdx + 8 * 1], eax
fld qword [rdx + 8 * 0]
fisub dword [rdx + 8 * 1]
fst qword [rdx]
mov rcx, [rdx]
; Test negative
mov rax, 0x3ff0000000000000 ; 1.0
mov [rdx + 8 * 0], rax
mov eax, -2
mov [rdx + 8 * 1], eax
fld qword [rdx + 8 * 0]
fisub dword [rdx + 8 * 1]
fst qword [rdx]
mov rsi, [rdx]
hlt