aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2014-12-27 06:11:14 +0100
committerMike Pall <mike>2014-12-27 06:11:14 +0100
commit7a76d435daf0f259b7038661b5cddb64c739cced (patch)
tree650e57d1af165b75120f7b1ab8f2726d305923e5 /src
parentecaa4eae88b16d647cc3bd2456916a35d90cadce (diff)
parentdb7cb5ab0ebf15f60e7b23e8edce95707fc451b1 (diff)
downloadluajit-7a76d435daf0f259b7038661b5cddb64c739cced.tar.gz
luajit-7a76d435daf0f259b7038661b5cddb64c739cced.tar.bz2
luajit-7a76d435daf0f259b7038661b5cddb64c739cced.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r--src/lj_strscan.c7
-rw-r--r--src/vm_arm.dasc8
-rw-r--r--src/vm_mips.dasc2
-rw-r--r--src/vm_ppc.dasc2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/lj_strscan.c b/src/lj_strscan.c
index a21c414a..0fddd43b 100644
--- a/src/lj_strscan.c
+++ b/src/lj_strscan.c
@@ -289,14 +289,15 @@ static StrScanFmt strscan_dec(const uint8_t *p, TValue *o,
289 289
290 /* Scale down until no more than 17 or 18 integer part digits remain. */ 290 /* Scale down until no more than 17 or 18 integer part digits remain. */
291 while (idig > 9) { 291 while (idig > 9) {
292 uint32_t i, cy = 0; 292 uint32_t i = hi, cy = 0;
293 ex2 += 6; 293 ex2 += 6;
294 for (i = hi; i != lo; i = DNEXT(i)) { 294 do {
295 cy += xi[i]; 295 cy += xi[i];
296 xi[i] = (cy >> 6); 296 xi[i] = (cy >> 6);
297 cy = 100 * (cy & 0x3f); 297 cy = 100 * (cy & 0x3f);
298 if (xi[i] == 0 && i == hi) hi = DNEXT(hi), idig--; 298 if (xi[i] == 0 && i == hi) hi = DNEXT(hi), idig--;
299 } 299 i = DNEXT(i);
300 } while (i != lo);
300 while (cy) { 301 while (cy) {
301 if (hi == lo) { xi[DPREV(lo)] |= 1; break; } 302 if (hi == lo) { xi[DPREV(lo)] |= 1; break; }
302 xi[lo] = (cy >> 6); lo = DNEXT(lo); 303 xi[lo] = (cy >> 6); lo = DNEXT(lo);
diff --git a/src/vm_arm.dasc b/src/vm_arm.dasc
index 58efabce..9db3b827 100644
--- a/src/vm_arm.dasc
+++ b/src/vm_arm.dasc
@@ -336,7 +336,7 @@ static void build_subroutines(BuildCtx *ctx)
336 | // - The GC shrinks the stack in between. 336 | // - The GC shrinks the stack in between.
337 | // - A return back from a lua_call() with (high) nresults adjustment. 337 | // - A return back from a lua_call() with (high) nresults adjustment.
338 | str BASE, L->top // Save current top held in BASE (yes). 338 | str BASE, L->top // Save current top held in BASE (yes).
339 | mov CARG2, KBASE 339 | lsr CARG2, KBASE, #3
340 | mov CARG1, L 340 | mov CARG1, L
341 | bl extern lj_state_growstack // (lua_State *L, int n) 341 | bl extern lj_state_growstack // (lua_State *L, int n)
342 | ldr BASE, L->top // Need the (realloced) L->top in BASE. 342 | ldr BASE, L->top // Need the (realloced) L->top in BASE.
@@ -390,7 +390,7 @@ static void build_subroutines(BuildCtx *ctx)
390 | str BASE, L->base 390 | str BASE, L->base
391 | add PC, PC, #4 // Must point after first instruction. 391 | add PC, PC, #4 // Must point after first instruction.
392 | str RC, L->top 392 | str RC, L->top
393 | lsr CARG3, RA, #3 393 | lsr CARG2, RA, #3
394 |2: 394 |2:
395 | // L->base = new base, L->top = top 395 | // L->base = new base, L->top = top
396 | str PC, SAVE_PC 396 | str PC, SAVE_PC
@@ -3295,10 +3295,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
3295 | mvn RC, RC 3295 | mvn RC, RC
3296 | ldr UPVAL:CARG2, [LFUNC:CARG2, RA] 3296 | ldr UPVAL:CARG2, [LFUNC:CARG2, RA]
3297 | ldr STR:CARG3, [KBASE, RC, lsl #2] 3297 | ldr STR:CARG3, [KBASE, RC, lsl #2]
3298 | mvn CARG4, #~LJ_TSTR
3299 | ldrb RB, UPVAL:CARG2->marked 3298 | ldrb RB, UPVAL:CARG2->marked
3300 | ldr CARG2, UPVAL:CARG2->v
3301 | ldrb RC, UPVAL:CARG2->closed 3299 | ldrb RC, UPVAL:CARG2->closed
3300 | ldr CARG2, UPVAL:CARG2->v
3301 | mvn CARG4, #~LJ_TSTR
3302 | tst RB, #LJ_GC_BLACK // isblack(uv) 3302 | tst RB, #LJ_GC_BLACK // isblack(uv)
3303 | ldrb RB, STR:CARG3->marked 3303 | ldrb RB, STR:CARG3->marked
3304 | strd CARG34, [CARG2] 3304 | strd CARG34, [CARG2]
diff --git a/src/vm_mips.dasc b/src/vm_mips.dasc
index 3bf5a993..6c60fb47 100644
--- a/src/vm_mips.dasc
+++ b/src/vm_mips.dasc
@@ -399,7 +399,7 @@ static void build_subroutines(BuildCtx *ctx)
399 | // - A return back from a lua_call() with (high) nresults adjustment. 399 | // - A return back from a lua_call() with (high) nresults adjustment.
400 | load_got lj_state_growstack 400 | load_got lj_state_growstack
401 | move MULTRES, RD 401 | move MULTRES, RD
402 | move CARG2, TMP2 402 | srl CARG2, TMP2, 3
403 | call_intern lj_state_growstack // (lua_State *L, int n) 403 | call_intern lj_state_growstack // (lua_State *L, int n)
404 |. move CARG1, L 404 |. move CARG1, L
405 | lw TMP2, SAVE_NRES 405 | lw TMP2, SAVE_NRES
diff --git a/src/vm_ppc.dasc b/src/vm_ppc.dasc
index d7809f1f..a54057d0 100644
--- a/src/vm_ppc.dasc
+++ b/src/vm_ppc.dasc
@@ -587,7 +587,7 @@ static void build_subroutines(BuildCtx *ctx)
587 | // - A return back from a lua_call() with (high) nresults adjustment. 587 | // - A return back from a lua_call() with (high) nresults adjustment.
588 | stp BASE, L->top // Save current top held in BASE (yes). 588 | stp BASE, L->top // Save current top held in BASE (yes).
589 | mr SAVE0, RD 589 | mr SAVE0, RD
590 | mr CARG2, TMP2 590 | srwi CARG2, TMP2, 3
591 | mr CARG1, L 591 | mr CARG1, L
592 | bl extern lj_state_growstack // (lua_State *L, int n) 592 | bl extern lj_state_growstack // (lua_State *L, int n)
593 | lwz TMP2, SAVE_NRES 593 | lwz TMP2, SAVE_NRES