mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-07 14:10:23 +00:00
555d2e5b0b
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.
41 lines
623 B
NASM
41 lines
623 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 ax, 2
|
|
mov [rdx + 8 * 1], ax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
fisubr word [rdx + 8 * 1]
|
|
fstp tword [rel data]
|
|
movups xmm0, [rel data]
|
|
|
|
; Test negative
|
|
mov rax, 0x3ff0000000000000 ; 1.0
|
|
mov [rdx + 8 * 0], rax
|
|
mov ax, -2
|
|
mov [rdx + 8 * 1], ax
|
|
|
|
fld qword [rdx + 8 * 0]
|
|
fisubr word [rdx + 8 * 1]
|
|
fstp tword [rel data]
|
|
movups xmm1, [rel data]
|
|
|
|
hlt
|
|
|
|
data:
|
|
dq 0
|
|
dq 0
|