mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-09 07:10:39 +00:00
3b0fb27ae9
I misread the implementation details of this instruction when implementing. The pseudocode says `ST(0) = ST(0) ∗ 2^rndint(ST(1))` so I understood the instruction to use the current rounding mode of the host to extract the integer portion of `ST(1)`. The actual implementation is in the details of the statement `the integer portion of the floating- point value in ST(1).` This behaves like round towards zero/truncate, additional hardware testing and documentation reading confirms this. Fixes #1584
31 lines
348 B
NASM
31 lines
348 B
NASM
%ifdef CONFIG
|
|
{
|
|
"RegData": {
|
|
"MM6": ["0x8000000000000000", "0x3FFF"],
|
|
"MM7": ["0xD000000000000000", "0xC001"]
|
|
},
|
|
"MemoryRegions": {
|
|
"0x100000000": "4096"
|
|
}
|
|
}
|
|
%endif
|
|
|
|
lea rdx, [rel data2]
|
|
fld tword [rdx + 8 * 0]
|
|
|
|
lea rdx, [rel data]
|
|
fld tword [rdx + 8 * 0]
|
|
|
|
fscale
|
|
|
|
hlt
|
|
|
|
align 8
|
|
data:
|
|
dt 64.0
|
|
dq 0
|
|
|
|
data2:
|
|
dt -6.5
|
|
dq 0
|