Explorar o código

PPC: Add table.getn() fast function.

Mike Pall %!s(int64=15) %!d(string=hai) anos
pai
achega
14cd10e322
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/buildvm_ppc.dasc

+ 6 - 1
src/buildvm_ppc.dasc

@@ -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 --------------------------------------------------------
   |