aboutsummaryrefslogtreecommitdiff
path: root/src/vm_x86.dasc
diff options
context:
space:
mode:
authorMike Pall <mike>2012-10-09 13:19:57 +0200
committerMike Pall <mike>2012-10-09 13:19:57 +0200
commiteabfdfe1aa3b4b9c37b99137e6d5fb7cadbd47e9 (patch)
treeb7cf8922d69daedd5d5733214a77439c8986f570 /src/vm_x86.dasc
parentda682b0e9184d4db7e8e477c682947d106790240 (diff)
downloadluajit-eabfdfe1aa3b4b9c37b99137e6d5fb7cadbd47e9.tar.gz
luajit-eabfdfe1aa3b4b9c37b99137e6d5fb7cadbd47e9.tar.bz2
luajit-eabfdfe1aa3b4b9c37b99137e6d5fb7cadbd47e9.zip
Don't use stack unwinding for lua_yield().
Diffstat (limited to '')
-rw-r--r--src/vm_x86.dasc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc
index 92e98f98..e2b6a078 100644
--- a/src/vm_x86.dasc
+++ b/src/vm_x86.dasc
@@ -443,6 +443,7 @@ static void build_subroutines(BuildCtx *ctx)
443 | 443 |
444 |->vm_returnc: 444 |->vm_returnc:
445 | add RD, 1 // RD = nresults+1 445 | add RD, 1 // RD = nresults+1
446 | jz ->vm_unwind_yield
446 | mov MULTRES, RD 447 | mov MULTRES, RD
447 | test PC, FRAME_TYPE 448 | test PC, FRAME_TYPE
448 | jz ->BC_RET_Z // Handle regular return to Lua. 449 | jz ->BC_RET_Z // Handle regular return to Lua.
@@ -526,6 +527,10 @@ static void build_subroutines(BuildCtx *ctx)
526 | mov BASE, L:RB->top // Need the (realloced) L->top in BASE. 527 | mov BASE, L:RB->top // Need the (realloced) L->top in BASE.
527 | jmp <3 528 | jmp <3
528 | 529 |
530 |->vm_unwind_yield:
531 | mov al, LUA_YIELD
532 | jmp ->vm_unwind_c_eh
533 |
529 |->vm_unwind_c@8: // Unwind C stack, return from vm_pcall. 534 |->vm_unwind_c@8: // Unwind C stack, return from vm_pcall.
530 | // (void *cframe, int errcode) 535 | // (void *cframe, int errcode)
531 |.if X64 536 |.if X64