<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@gmail.com" title="Caio Lima <ticaiolima@gmail.com>"> <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">> (In reply to <a href="show_bug.cgi?id=158083#c41">comment #41</a>)
> > Hi Guys,
> >
> > I am trying to inline the customs getter function call but I am facing a
> > weird error.
> >
> > When I set the cache Up, I put into pc[5] the pointer of the Custom Function
> > "GetValueFunc".
> >
> > When I try to load it into a register in LowLevelInterpreter64.asm, its
> > content is not the same. I am doing the following operations:
> >
> > loadisFromInstruction(5, t1)
> > PrepareForCCall
> > //load the arguments
> > cCall4(t0)
> > //retrun retrieving and dispatch
> >
> > I debugged the value present into t1 (in my architecture is the rsi) and it
> > is not corresponding to the pointer setted in setup. To test if call was
> > working, I manually set rsi with the value of the function address and the
> > function was called, however some arguments were incorrect the pointers.
> >
> > I tried load the function pointer using:
> > loadpFromInstruction(5, t1)
> >
> > And had no success too.
> >
> > Is anything I am doing wrong to get the pc[] elements as pointer?
> Can you post the patch that you think should work?
> 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 "typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValue thisValue, PropertyName, JSObject* slotBase)" 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>