<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement the arithmetic instructions for floats in WebAssembly"
href="https://bugs.webkit.org/show_bug.cgi?id=149102#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement the arithmetic instructions for floats in WebAssembly"
href="https://bugs.webkit.org/show_bug.cgi?id=149102">bug 149102</a>
from <span class="vcard"><a class="email" href="mailto:sukolsak@gmail.com" title="Sukolsak Sakshuwong <sukolsak@gmail.com>"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
<pre>Thanks for the review.
(In reply to <a href="show_bug.cgi?id=149102#c3">comment #3</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=261106&action=diff" name="attach_261106" title="Patch">attachment 261106</a> <a href="attachment.cgi?id=261106&action=edit" title="Patch">[details]</a></span>
> Patch
>
> These conversions are pretty expensive. Why not just do the math as float?</span >
Our macro assembler currently doesn't have any float arithmetic instructions. I could add them for x86, x86-64, and ARM. But I am not sure how to add and test them on MIPS and SH4. Is it OK if I just add them for x86, x86-64, and ARM and do something like
#if CPU(X86) || CPU(X86_64)
m_assembler.addsd_rr(...);
#elif CPU(ARM) || CPU(ARM64)
m_assembler....(...);
#else
convertFloatToDouble(FPRInfo::fpRegT0, FPRInfo::fpRegT0);
addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
convertDoubleToFloat(FPRInfo::fpRegT0, FPRInfo::fpRegT0);
#endif
?</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>