Closed
Bug 1252927
Opened 9 years ago
Closed 9 years ago
SIMD: Truncate before range check in Uint32x4.fromFloat32x4()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: jolesen, Assigned: jolesen)
References
Details
Attachments
(1 file)
6.72 KB,
patch
|
sunfish
:
review+
|
Details | Diff | Splinter Review |
The semantics of the float to integer conversions changed slightly in the SIMD.js spec: https://github.com/tc39/ecmascript_simd/pull/332
The new method truncates the floating point input to an integer value *before* the range check. Previously, the range check was performen on the possibly fractional input.
This means that -0.9 now converts to 0 when previously it would throw a RangeError when converting to Uint32.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Fix this both in the VM and the x86 JIT.
Attachment #8725889 -
Flags: review?(sunfish)
Comment 3•9 years ago
|
||
Comment on attachment 8725889 [details] [diff] [review]
SIMD: Truncate before range check.
Review of attachment 8725889 [details] [diff] [review]:
-----------------------------------------------------------------
Implements the desired semantics, and uses less code at the same time :-).
Attachment #8725889 -
Flags: review?(sunfish) → review+
Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/63688afe0bd3d526c93c4aa0a6bf94089e58eec6
Bug 1252927 - SIMD: Truncate before range check. r=sunfish
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•