<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 doubles in WebAssembly"
   href="https://bugs.webkit.org/show_bug.cgi?id=148945#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement the arithmetic instructions for doubles in WebAssembly"
   href="https://bugs.webkit.org/show_bug.cgi?id=148945">bug 148945</a>
              from <span class="vcard"><a class="email" href="mailto:sukolsak&#64;gmail.com" title="Sukolsak Sakshuwong &lt;sukolsak&#64;gmail.com&gt;"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=148945#c5">comment #5</a>)
<span class="quote">&gt; Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=260994&amp;action=diff" name="attach_260994" title="Patch">attachment 260994</a> <a href="attachment.cgi?id=260994&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=260994&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=260994&amp;action=review</a>
&gt; 
&gt; &gt; Source/JavaScriptCore/wasm/WASMFunctionCompiler.h:77
&gt; &gt; +// On Windows we need to wrap fmod; on other platforms we can call it directly.
&gt; &gt; +// On ARMv7 we assert that all function pointers have to low bit set (point to thumb code).
&gt; &gt; +#if CALLING_CONVENTION_IS_STDCALL || CPU(ARM_THUMB2)
&gt; &gt; +static double JIT_OPERATION operationFmod(double x, double y)
&gt; 
&gt; to low bit =&gt; the low bit
&gt; 
&gt; I don't understand this comment. Why do we need to wrap fmod on Windows?
&gt; Your comment says that we need to wrap fmod on Windows and not other
&gt; platforms, but your code tests for all stdcall and/or thumb2 platforms. Why
&gt; is it relevant that ARMv7 code is thumb code?</span >

I copied this code from dfg/DFGSpeculativeJIT.cpp. My guess is that fmod was written in non-thumb code. I have removed the wrapper for fmod and tested this patch on ARMv7 and ARM64 with the help of Michael. It passes every WASM test.</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>