Bug 149254

Summary: Calling a float function on x86 in WebAssembly incorrectly returns a double
Product: WebKit Reporter: Sukolsak Sakshuwong <sukolsak>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, fpizlo, ggaren, mark.lam, msaboff, sukolsak
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146064    
Attachments:
Description Flags
Patch none

Sukolsak Sakshuwong
Reported 2015-09-17 02:08:30 PDT
In WebAssembly on x86 (32-bit), when we call a function that returns a float or a double, we use the FSTP instruction to read the return value from the FPU register stack. The FSTP instruction converts the value to single-precision or double-precision floating-point format, depending on the destination operand. Currently, we always use double as the destination. This is wrong. We should use the correct type.
Attachments
Patch (5.67 KB, patch)
2015-09-17 02:16 PDT, Sukolsak Sakshuwong
no flags
Sukolsak Sakshuwong
Comment 1 2015-09-17 02:16:07 PDT
Michael Saboff
Comment 2 2015-09-17 08:01:27 PDT
Comment on attachment 261380 [details] Patch r=me
WebKit Commit Bot
Comment 3 2015-09-17 10:40:23 PDT
Comment on attachment 261380 [details] Patch Clearing flags on attachment: 261380 Committed r189918: <http://trac.webkit.org/changeset/189918>
WebKit Commit Bot
Comment 4 2015-09-17 10:40:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.