new format for JUMP instructions (to allow larger offsets)

This commit is contained in:
Roberto Ierusalimschy
2017-11-07 15:20:42 -02:00
parent ad0704e40c
commit c3e5946fb2
6 changed files with 65 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltests.c,v 2.227 2017/11/02 11:28:56 roberto Exp $
** $Id: ltests.c,v 2.230 2017/11/07 13:25:26 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -543,14 +543,20 @@ static char *buildop (Proto *p, int pc, char *buff) {
GETARG_k(i) ? " (k)" : "");
break;
case iABx:
sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i), GETARG_Bx(i));
sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i),
GETARG_Bx(i));
break;
case iAsBx:
sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i), GETARG_sBx(i));
sprintf(buff+strlen(buff), "%-12s%4d %4d", name, GETARG_A(i),
GETARG_sBx(i));
break;
case iAx:
sprintf(buff+strlen(buff), "%-12s%4d", name, GETARG_Ax(i));
break;
case isJ:
sprintf(buff+strlen(buff), "%-12s%4d (%1d)", name, GETARG_sJ(i),
!!GETARG_k(i));
break;
}
return buff;
}