aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildvm_ppc.dasc30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/buildvm_ppc.dasc b/src/buildvm_ppc.dasc
index 51b592f1..99d98bc1 100644
--- a/src/buildvm_ppc.dasc
+++ b/src/buildvm_ppc.dasc
@@ -466,7 +466,7 @@ static void build_subroutines(BuildCtx *ctx)
466 | li TMP0, -8 466 | li TMP0, -8
467 | evlddx LFUNC:RB, BASE, TMP0 467 | evlddx LFUNC:RB, BASE, TMP0
468 | checkfunc LFUNC:RB 468 | checkfunc LFUNC:RB
469 | checkfail ->vmeta_call // Ensure KBASE defined and != BASE. 469 | checkfail ->vmeta_call
470 | 470 |
471 |->vm_call_dispatch_f: 471 |->vm_call_dispatch_f:
472 | ins_call 472 | ins_call
@@ -500,10 +500,26 @@ static void build_subroutines(BuildCtx *ctx)
500 |//-- Metamethod handling ------------------------------------------------ 500 |//-- Metamethod handling ------------------------------------------------
501 |//----------------------------------------------------------------------- 501 |//-----------------------------------------------------------------------
502 | 502 |
503 |// The lj_meta_* functions (except for lj_meta_cat) don't reallocate the
504 |// stack, so BASE doesn't need to be reloaded across these calls.
505 |
503 |//-- Continuation dispatch ---------------------------------------------- 506 |//-- Continuation dispatch ----------------------------------------------
504 | 507 |
505 |->cont_dispatch: 508 |->cont_dispatch:
506 | NYI 509 | // BASE = meta base, RA = resultptr, RD = (nresults+1)*8
510 | lwz TMP0, -12(BASE) // Continuation.
511 | rlwinm TMP1, PC, 0, 0, 28
512 | mr RB, BASE
513 | sub BASE, BASE, TMP1 // Restore caller BASE.
514 | lwz LFUNC:TMP1, FRAME_FUNC(BASE)
515 | subi TMP2, RD, 8
516 | mtctr TMP0
517 | lwz PC, -16(RB) // Restore PC from [cont|PC].
518 | lwz TMP1, LFUNC:TMP1->pc
519 | evstddx TISNIL, RA, TMP2 // Ensure one valid arg.
520 | lwz KBASE, PC2PROTO(k)(TMP1)
521 | // BASE = base, RA = resultptr, RB = meta base
522 | bctr // Jump to continuation.
507 | 523 |
508 |->cont_cat: 524 |->cont_cat:
509 | NYI 525 | NYI
@@ -537,10 +553,14 @@ static void build_subroutines(BuildCtx *ctx)
537 |->vmeta_comp: 553 |->vmeta_comp:
538 | NYI 554 | NYI
539 |->cont_nop: 555 |->cont_nop:
540 | NYI 556 | ins_next
541 | 557 |
542 |->cont_ra: 558 |->cont_ra: // RA = resultptr
543 | NYI 559 | lwz INS, -4(PC)
560 | evldd TMP0, 0(RA)
561 | decode_RA8 TMP1, INS
562 | evstddx TMP0, BASE, TMP1
563 | b ->cont_nop
544 | 564 |
545 |->cont_condt: 565 |->cont_condt:
546 | NYI 566 | NYI