diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-14 09:09:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-14 09:09:12 -0300 |
commit | c116dcb92b2ee36ef5c4541a88e73540837f1057 (patch) | |
tree | 1fbe7cdf10cc6d390b6f716c81aa40e11ee60375 /lvm.c | |
parent | 6d268b0b00ae63e5d06aedc4fb3cec105123a565 (diff) | |
download | lua-c116dcb92b2ee36ef5c4541a88e73540837f1057.tar.gz lua-c116dcb92b2ee36ef5c4541a88e73540837f1057.tar.bz2 lua-c116dcb92b2ee36ef5c4541a88e73540837f1057.zip |
better information about instruction behavior (use of arguments)
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.285 2003/05/05 18:39:57 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.286 2003/05/13 20:15:59 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -361,11 +361,13 @@ static void Arith (lua_State *L, StkId ra, | |||
361 | #define RA(i) (base+GETARG_A(i)) | 361 | #define RA(i) (base+GETARG_A(i)) |
362 | /* to be used after possible stack reallocation */ | 362 | /* to be used after possible stack reallocation */ |
363 | #define XRA(i) (L->base+GETARG_A(i)) | 363 | #define XRA(i) (L->base+GETARG_A(i)) |
364 | #define RB(i) (base+GETARG_B(i)) | 364 | #define RB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i)) |
365 | #define RKB(i) ((GETARG_B(i) < MAXSTACK) ? RB(i) : k+GETARG_B(i)-MAXSTACK) | 365 | #define RC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i)) |
366 | #define RC(i) (base+GETARG_C(i)) | 366 | #define RKB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgK, \ |
367 | #define RKC(i) ((GETARG_C(i) < MAXSTACK) ? RC(i) : k+GETARG_C(i)-MAXSTACK) | 367 | (GETARG_B(i) < MAXSTACK) ? base+GETARG_B(i) : k+GETARG_B(i)-MAXSTACK) |
368 | #define KBx(i) (k+GETARG_Bx(i)) | 368 | #define RKC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgK, \ |
369 | (GETARG_C(i) < MAXSTACK) ? base+GETARG_C(i) : k+GETARG_C(i)-MAXSTACK) | ||
370 | #define KBx(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgK, k+GETARG_Bx(i)) | ||
369 | 371 | ||
370 | 372 | ||
371 | #define dojump(pc, i) ((pc) += (i)) | 373 | #define dojump(pc, i) ((pc) += (i)) |