Closed
Bug 1799919
Opened 2 years ago
Closed 2 years ago
V128::extractLane converts NaN to qNaN on x86 32-bit platforms.
Categories
(Core :: JavaScript: WebAssembly, defect)
Tracking
()
RESOLVED
FIXED
109 Branch
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: yury, Assigned: yury)
References
()
Details
Attachments
(1 file)
We have:
template <typename T>
T extractLane(unsigned char *bytes, unsigned lane) {
T result;
memcpy(&result, bytes + sizeof(T) * lane, sizeof(T));
return result;
}
float user( unsigned char *s) { return extractLane<float>(s, 0);}
And on X86 it produces:
movl 4(%esp), %eax
flds (%eax)
retl
vs on X64:
movss (%rdi), %xmm0
retq
The flds
converts stuff to qNaNs, which we don't expect in wasm world.
Assignee | ||
Updated•2 years ago
|
Hardware: Unspecified → x86
Assignee | ||
Comment 1•2 years ago
|
||
The same logic, but it avoid generation of FLDS instruction at
low level.
Updated•2 years ago
|
Assignee: nobody → ydelendik
Status: NEW → ASSIGNED
Pushed by ydelendik@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c12c629265d0
Refactor V128::extractLane to avoid FLDS on X86. r=jseward
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox109:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Comment 4•2 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•