<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Calling a float function on x86 in WebAssembly incorrectly returns a double"
href="https://bugs.webkit.org/show_bug.cgi?id=149254">149254</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Calling a float function on x86 in WebAssembly incorrectly returns a double
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sukolsak@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>