Closed
Bug 589247
Opened 14 years ago
Closed 6 years ago
Use the SSE3 FISTTP instruction for float->int conversion where possible
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: stejohns, Unassigned)
Details
We currently don't use any SSE3 instructions, but this one allows for truncation conversion of float->int without having to change the control word. (SSE3 is present on most recent x86-32 systems, and all x86-64.)
Comment 1•14 years ago
|
||
how is FISTTP different from CVTSD2SI?
Reporter | ||
Comment 2•14 years ago
|
||
You're right, it probably isn't -- it's probably provided solely for better x87 interop, which we rarely use. (This was a note I jotted down while tracking down an unrelated bug.)
Comment 3•14 years ago
|
||
jagermonkey is using SSE4.1 instructions that let you access 32-bit values in places in xmm registers, to compose and decompose 64-bit fatvals.
Comment 4•14 years ago
|
||
Perhaps it could be used for immediate double->int truncation when calling a function that returns a double in x86? The return value is on the floating point stack (unless we come up with a custom calling convention) and FISSTP could be immediately used to convert it to an integer. This would be better than a x87 to SSE transition just for CVTSD2SI.
Comment 5•14 years ago
|
||
the two places to look are the LIR_d2i instruction and the doubleToInt32_sse function. Maybe it makes sense to inline the doubleToInt32_sse2 function if we can do it without branching and without breaking the results we want for rounding / infinity / nan?
Summary: We should use the SSE3 FISTTP instruction for float->int conversion where possible → Use the SSE3 FISTTP instruction for float->int conversion where possible
Comment 6•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 7•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•