summaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-07 15:20:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-07 15:20:42 -0200
commitc3e5946fb2b7b5781d9bca9d303967abe6263482 (patch)
tree012bee6184675f1559e994eba42dda7c38381283 /ltests.c
parentad0704e40cc7b3135fedc6d40a522addb039e090 (diff)
downloadlua-c3e5946fb2b7b5781d9bca9d303967abe6263482.tar.gz
lua-c3e5946fb2b7b5781d9bca9d303967abe6263482.tar.bz2
lua-c3e5946fb2b7b5781d9bca9d303967abe6263482.zip
new format for JUMP instructions (to allow larger offsets)
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ltests.c b/ltests.c
index bee734f3..5f7b4064 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.227 2017/11/02 11:28:56 roberto Exp $ 2** $Id: ltests.c,v 2.230 2017/11/07 13:25:26 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -543,14 +543,20 @@ static char *buildop (Proto *p, int pc, char *buff) {
543 GETARG_k(i) ? " (k)" : ""); 543 GETARG_k(i) ? " (k)" : "");
544 break; 544 break;
545 case iABx: 545 case iABx:
546 sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i), GETARG_Bx(i)); 546 sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i),
547 GETARG_Bx(i));
547 break; 548 break;
548 case iAsBx: 549 case iAsBx:
549 sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i), GETARG_sBx(i)); 550 sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i),
551 GETARG_sBx(i));
550 break; 552 break;
551 case iAx: 553 case iAx:
552 sprintf(buff+strlen(buff), "%-12s%4d", name, GETARG_Ax(i)); 554 sprintf(buff+strlen(buff), "%-12s%4d", name, GETARG_Ax(i));
553 break; 555 break;
556 case isJ:
557 sprintf(buff+strlen(buff), "%-12s%4d (%1d)", name, GETARG_sJ(i),
558 !!GETARG_k(i));
559 break;
554 } 560 }
555 return buff; 561 return buff;
556} 562}