<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLInt should support other types of prototype GetById caching."
   href="https://bugs.webkit.org/show_bug.cgi?id=158083#c43">Comment # 43</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLInt should support other types of prototype GetById caching."
   href="https://bugs.webkit.org/show_bug.cgi?id=158083">bug 158083</a>
              from <span class="vcard"><a class="email" href="mailto:ticaiolima&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <span class="fn">Caio Lima</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=158083#c42">comment #42</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=158083#c41">comment #41</a>)
&gt; &gt; Hi Guys,
&gt; &gt; 
&gt; &gt; I am trying to inline the customs getter function call but I am facing a
&gt; &gt; weird error.
&gt; &gt; 
&gt; &gt; When I set the cache Up, I put into pc[5] the pointer of the Custom Function
&gt; &gt; &quot;GetValueFunc&quot;.
&gt; &gt; 
&gt; &gt; When I try to load it into a register in LowLevelInterpreter64.asm, its
&gt; &gt; content is not the same. I am doing the following operations:
&gt; &gt; 
&gt; &gt; loadisFromInstruction(5, t1)
&gt; &gt; PrepareForCCall
&gt; &gt; //load the arguments
&gt; &gt; cCall4(t0)
&gt; &gt; //retrun retrieving and dispatch
&gt; &gt; 
&gt; &gt; I debugged the value present into t1 (in my architecture is the rsi) and it
&gt; &gt; is not corresponding to the pointer setted in setup. To test if call was
&gt; &gt; working, I manually set rsi with the value of the function address and the
&gt; &gt; function was called, however some arguments were incorrect the pointers.
&gt; &gt; 
&gt; &gt; I tried load the function pointer using:
&gt; &gt; loadpFromInstruction(5, t1)
&gt; &gt; 
&gt; &gt; And had no success too.
&gt; &gt; 
&gt; &gt; Is anything I am doing wrong to get the pc[] elements as pointer?
&gt; Can you post the patch that you think should work?
&gt; What architecture are you on?</span >

Hi Saam. I just discovered that some pseudo-register are mapped to the same physical register (e.g t1 = a0 in my architecture). I fixed the register usage and it is working now in my architecture.

Now the problem I am facing is that the &quot;typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValue thisValue, PropertyName, JSObject* slotBase)&quot; requires a PropertyName and I don't know how can I pass it in the inlined assembly.

My current assembly is this one:

_llint_op_get_by_id_proto_custom:
    traceExecution()
    loadisFromInstruction(2, t0)
    loadConstantOrVariableCell(t0, t3, .opGetByIdProtoCustomSlow)
    loadi JSCell::m_structureID[t3], t1
    loadisFromInstruction(4, t2)
    bineq t2, t1, .opGetByIdProtoCustomSlow
    loadpFromInstruction(6, a1)
    loadpFromInstruction(5, t0)
    push t2
    push PC
    push PB
    prepareStateForCCall()
    move cfr, a0
    move 0, a2 # I am testing with CustomGetter function and this parameter is ignored
    move a1, a3
    cCall4(t0)
    restoreStateAfterCCall()
    pop PB
    pop PC
    pop t2
    storeq r0, [cfr, t2, 8]
    valueProfile(r0, 8, t1)
    dispatch(9)

.opGetByIdProtoCustomSlow:
    callSlowPath(_llint_slow_path_get_by_id)
    dispatch(9)</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>