]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
PPC: Add table.getn() fast function.
authorMike Pall <mike>
Mon, 4 Oct 2010 23:47:39 +0000 (01:47 +0200)
committerMike Pall <mike>
Mon, 4 Oct 2010 23:47:39 +0000 (01:47 +0200)
src/buildvm_ppc.dasc

index f96a56013a2ee0f5b7454bb698dab0cdd9c214fa..5bbded291caac33152f961475887b2f13a421684 100644 (file)
@@ -1322,7 +1322,12 @@ static void build_subroutines(BuildCtx *ctx)
   |//-- Table library ------------------------------------------------------
   |
   |.ffunc_1 table_getn
-  |  NYI
+  |  checktab CARG1
+  |  checkfail ->fff_fallback
+  |  bl extern lj_tab_len              // (GCtab *t)
+  |  // Returns uint32_t (but less than 2^31).
+  |  efdcfsi CRET1, CRET1
+  |  b ->fff_restv
   |
   |//-- Bit library --------------------------------------------------------
   |