diff options
author | Mike Pall <mike> | 2011-04-05 00:24:23 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-04-05 00:24:23 +0200 |
commit | a7874cb29970b72fec106e6a8a4f22c42a15e580 (patch) | |
tree | d813dd325a6a1ac75e48b3b6541b69bf7ed89b2f | |
parent | 43d7db62d11e5bdc466cb02e9dd67c7cf00d75db (diff) | |
download | luajit-a7874cb29970b72fec106e6a8a4f22c42a15e580.tar.gz luajit-a7874cb29970b72fec106e6a8a4f22c42a15e580.tar.bz2 luajit-a7874cb29970b72fec106e6a8a4f22c42a15e580.zip |
ARM: Add assert() and type() fast functions.
-rw-r--r-- | src/buildvm_arm.dasc | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc index d2c3e5ca..b0b87ebf 100644 --- a/src/buildvm_arm.dasc +++ b/src/buildvm_arm.dasc | |||
@@ -572,11 +572,32 @@ static void build_subroutines(BuildCtx *ctx) | |||
572 | | | 572 | | |
573 | |//-- Base library: checks ----------------------------------------------- | 573 | |//-- Base library: checks ----------------------------------------------- |
574 | | | 574 | | |
575 | |.ffunc assert | 575 | |.ffunc_1 assert |
576 | | NYI | 576 | | checktp CARG2, LJ_TTRUE |
577 | | bhi ->fff_fallback | ||
578 | | ldr PC, [BASE, FRAME_PC] | ||
579 | | strd CARG12, [BASE, #-8] | ||
580 | | mov RB, BASE | ||
581 | | subs RA, NARGS8:RC, #8 | ||
582 | | add RC, NARGS8:RC, #8 // Compute (nresults+1)*8. | ||
583 | | beq ->fff_res // Done if exactly 1 argument. | ||
584 | |1: | ||
585 | | ldrd CARG12, [RB, #8] | ||
586 | | subs RA, RA, #8 | ||
587 | | strd CARG12, [RB], #8 | ||
588 | | bne <1 | ||
589 | | b ->fff_res | ||
577 | | | 590 | | |
578 | |.ffunc type | 591 | |.ffunc type |
579 | | NYI | 592 | | ldr CARG2, [BASE, #4] |
593 | | cmp NARGS8:RC, #8 | ||
594 | | blo ->fff_fallback | ||
595 | | checktp CARG2, LJ_TISNUM | ||
596 | | mvnlo CARG2, #~LJ_TISNUM | ||
597 | | rsb CARG4, CARG2, #(int)(offsetof(GCfuncC, upvalue)>>3)-1 | ||
598 | | lsl CARG4, CARG4, #3 | ||
599 | | ldrd CARG12, [CFUNC:CARG3, CARG4] | ||
600 | | b ->fff_restv | ||
580 | | | 601 | | |
581 | |//-- Base library: getters and setters --------------------------------- | 602 | |//-- Base library: getters and setters --------------------------------- |
582 | | | 603 | | |