FEX/unittests/ASM/X87/DA_05.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

41 lines
629 B
NASM

%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x8000000000000000", "0x3FFF"],
"XMM1": ["0xC000000000000000", "0xC000"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%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]
fisubr dword [rdx + 8 * 1]
fstp tword [rel data]
movups xmm0, [rel data]
; 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]
fisubr dword [rdx + 8 * 1]
fstp tword [rel data]
movups xmm1, [rel data]
hlt
data:
dq 0
dq 0