-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1662 from CallumDev/f64-int-fixes
F64: Fix FILD and FIST for Size < 8
- Loading branch information
Showing
3 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
%ifdef CONFIG | ||
{ | ||
"RegData": { | ||
"RAX": "0xC090000000000000", | ||
"RBX": "0xC070000000000000" | ||
}, | ||
"Env": { "FEX_X87REDUCEDPRECISION" : "1" } | ||
} | ||
%endif | ||
|
||
mov rdx, 0xe0000000 | ||
|
||
mov eax, -1024 | ||
mov [rdx + 8 * 0], eax | ||
|
||
fild dword [rdx + 8 * 0] | ||
|
||
fstp qword [rdx] | ||
mov rax, [rdx] | ||
|
||
xor rbx, rbx | ||
mov bx, -256 | ||
mov [rdx + 8 * 0], bx | ||
fild word [rdx + 8 * 0] | ||
|
||
fstp qword [rdx] | ||
mov rbx, [rdx] | ||
|
||
hlt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
%ifdef CONFIG | ||
{ | ||
"Env": { "FEX_X87REDUCEDPRECISION" : "1" }, | ||
"RegData": { | ||
"RAX": "0xffffffff" | ||
} | ||
} | ||
%endif | ||
|
||
; Test behaviour of overflow | ||
; and storing negative numbers | ||
; to 32-bit registers. | ||
|
||
lea rbp, [rel data] | ||
mov rdx, 0xe0000000 | ||
|
||
fld qword [rbp] | ||
fistp dword [rdx] | ||
mov eax, [rdx] | ||
|
||
hlt | ||
|
||
align 8 | ||
data: | ||
dq 0xbff0000000000000 |