mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
PPC: Add continuation dispatch and RA/nop continuations.
This commit is contained in:
parent
cabcce1e1d
commit
c330af2452
@ -466,7 +466,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| li TMP0, -8
|
| li TMP0, -8
|
||||||
| evlddx LFUNC:RB, BASE, TMP0
|
| evlddx LFUNC:RB, BASE, TMP0
|
||||||
| checkfunc LFUNC:RB
|
| checkfunc LFUNC:RB
|
||||||
| checkfail ->vmeta_call // Ensure KBASE defined and != BASE.
|
| checkfail ->vmeta_call
|
||||||
|
|
|
|
||||||
|->vm_call_dispatch_f:
|
|->vm_call_dispatch_f:
|
||||||
| ins_call
|
| ins_call
|
||||||
@ -500,10 +500,26 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
|//-- Metamethod handling ------------------------------------------------
|
|//-- Metamethod handling ------------------------------------------------
|
||||||
|//-----------------------------------------------------------------------
|
|//-----------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
|
|// The lj_meta_* functions (except for lj_meta_cat) don't reallocate the
|
||||||
|
|// stack, so BASE doesn't need to be reloaded across these calls.
|
||||||
|
|
|
||||||
|//-- Continuation dispatch ----------------------------------------------
|
|//-- Continuation dispatch ----------------------------------------------
|
||||||
|
|
|
|
||||||
|->cont_dispatch:
|
|->cont_dispatch:
|
||||||
| NYI
|
| // BASE = meta base, RA = resultptr, RD = (nresults+1)*8
|
||||||
|
| lwz TMP0, -12(BASE) // Continuation.
|
||||||
|
| rlwinm TMP1, PC, 0, 0, 28
|
||||||
|
| mr RB, BASE
|
||||||
|
| sub BASE, BASE, TMP1 // Restore caller BASE.
|
||||||
|
| lwz LFUNC:TMP1, FRAME_FUNC(BASE)
|
||||||
|
| subi TMP2, RD, 8
|
||||||
|
| mtctr TMP0
|
||||||
|
| lwz PC, -16(RB) // Restore PC from [cont|PC].
|
||||||
|
| lwz TMP1, LFUNC:TMP1->pc
|
||||||
|
| evstddx TISNIL, RA, TMP2 // Ensure one valid arg.
|
||||||
|
| lwz KBASE, PC2PROTO(k)(TMP1)
|
||||||
|
| // BASE = base, RA = resultptr, RB = meta base
|
||||||
|
| bctr // Jump to continuation.
|
||||||
|
|
|
|
||||||
|->cont_cat:
|
|->cont_cat:
|
||||||
| NYI
|
| NYI
|
||||||
@ -537,10 +553,14 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
|->vmeta_comp:
|
|->vmeta_comp:
|
||||||
| NYI
|
| NYI
|
||||||
|->cont_nop:
|
|->cont_nop:
|
||||||
| NYI
|
| ins_next
|
||||||
|
|
|
|
||||||
|->cont_ra:
|
|->cont_ra: // RA = resultptr
|
||||||
| NYI
|
| lwz INS, -4(PC)
|
||||||
|
| evldd TMP0, 0(RA)
|
||||||
|
| decode_RA8 TMP1, INS
|
||||||
|
| evstddx TMP0, BASE, TMP1
|
||||||
|
| b ->cont_nop
|
||||||
|
|
|
|
||||||
|->cont_condt:
|
|->cont_condt:
|
||||||
| NYI
|
| NYI
|
||||||
|
Loading…
Reference in New Issue
Block a user