Browse Source

ARM: Add rawget() fast function.

Mike Pall 14 years ago
parent
commit
da1ef8c3b0
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/buildvm_arm.dasc

+ 11 - 1
src/buildvm_arm.dasc

@@ -870,7 +870,17 @@ static void build_subroutines(BuildCtx *ctx)
   |  b ->fff_restv
   |
   |.ffunc rawget
-  |  NYI
+  |  ldrd CARG34, [BASE]
+  |   cmp NARGS8:RC, #16
+  |   blo ->fff_fallback
+  |   mov CARG2, CARG3
+  |  checktab CARG4, ->fff_fallback
+  |   mov CARG1, L
+  |   add CARG3, BASE, #8
+  |  bl extern lj_tab_get  // (lua_State *L, GCtab *t, cTValue *key)
+  |  // Returns cTValue *.
+  |  ldrd CARG12, [CRET1]
+  |  b ->fff_restv
   |
   |//-- Base library: conversions ------------------------------------------
   |