aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.c')
-rw-r--r--lopcodes.c82
1 files changed, 39 insertions, 43 deletions
diff --git a/lopcodes.c b/lopcodes.c
index 767c6bd5..8dd3bee3 100644
--- a/lopcodes.c
+++ b/lopcodes.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.c,v 1.19 2002/05/13 13:09:00 roberto Exp roberto $ 2** $Id: lopcodes.c,v 1.20 2002/06/12 14:51:31 roberto Exp roberto $
3** extracted automatically from lopcodes.h by mkprint.lua 3** extracted automatically from lopcodes.h by mkprint.lua
4** DO NOT EDIT 4** DO NOT EDIT
5** See Copyright Notice in lua.h 5** See Copyright Notice in lua.h
@@ -39,8 +39,6 @@ const char *const luaP_opnames[] = {
39 "EQ", 39 "EQ",
40 "LT", 40 "LT",
41 "LE", 41 "LE",
42 "GT",
43 "GE",
44 "TEST", 42 "TEST",
45 "CALL", 43 "CALL",
46 "TAILCALL", 44 "TAILCALL",
@@ -56,49 +54,47 @@ const char *const luaP_opnames[] = {
56 54
57#endif 55#endif
58 56
59#define opmode(t,x,b,c,sa,k,m) (((t)<<OpModeT) | \ 57#define opmode(t,b,bk,ck,sa,k,m) (((t)<<OpModeT) | \
60 ((b)<<OpModeBreg) | ((c)<<OpModeCreg) | \ 58 ((b)<<OpModeBreg) | ((bk)<<OpModeBrk) | ((ck)<<OpModeCrk) | \
61 ((sa)<<OpModesetA) | ((k)<<OpModeK) | (m)) 59 ((sa)<<OpModesetA) | ((k)<<OpModeK) | (m))
62 60
63 61
64const lu_byte luaP_opmodes[NUM_OPCODES] = { 62const lu_byte luaP_opmodes[NUM_OPCODES] = {
65/* T _ B C sA K mode opcode */ 63/* T B Bk Ck sA K mode opcode */
66 opmode(0,0,1,0, 1,0,iABC) /* OP_MOVE */ 64 opmode(0, 1, 0, 0, 1, 0, iABC) /* OP_MOVE */
67 ,opmode(0,0,0,0, 1,1,iABx) /* OP_LOADK */ 65 ,opmode(0, 0, 0, 0, 1, 1, iABx) /* OP_LOADK */
68 ,opmode(0,0,0,0, 1,0,iABC) /* OP_LOADBOOL */ 66 ,opmode(0, 0, 0, 0, 1, 0, iABC) /* OP_LOADBOOL */
69 ,opmode(0,0,1,0, 1,0,iABC) /* OP_LOADNIL */ 67 ,opmode(0, 1, 0, 0, 1, 0, iABC) /* OP_LOADNIL */
70 ,opmode(0,0,0,0, 1,0,iABC) /* OP_GETUPVAL */ 68 ,opmode(0, 0, 0, 0, 1, 0, iABC) /* OP_GETUPVAL */
71 ,opmode(0,0,0,0, 1,1,iABx) /* OP_GETGLOBAL */ 69 ,opmode(0, 0, 0, 0, 1, 1, iABx) /* OP_GETGLOBAL */
72 ,opmode(0,0,1,1, 1,0,iABC) /* OP_GETTABLE */ 70 ,opmode(0, 1, 0, 1, 1, 0, iABC) /* OP_GETTABLE */
73 ,opmode(0,0,0,0, 0,1,iABx) /* OP_SETGLOBAL */ 71 ,opmode(0, 0, 0, 0, 0, 1, iABx) /* OP_SETGLOBAL */
74 ,opmode(0,0,0,0, 0,0,iABC) /* OP_SETUPVAL */ 72 ,opmode(0, 0, 0, 0, 0, 0, iABC) /* OP_SETUPVAL */
75 ,opmode(0,0,1,1, 0,0,iABC) /* OP_SETTABLE */ 73 ,opmode(0, 0, 1, 1, 0, 0, iABC) /* OP_SETTABLE */
76 ,opmode(0,0,0,0, 1,0,iABC) /* OP_NEWTABLE */ 74 ,opmode(0, 0, 0, 0, 1, 0, iABC) /* OP_NEWTABLE */
77 ,opmode(0,0,1,1, 1,0,iABC) /* OP_SELF */ 75 ,opmode(0, 1, 0, 1, 1, 0, iABC) /* OP_SELF */
78 ,opmode(0,0,1,1, 1,0,iABC) /* OP_ADD */ 76 ,opmode(0, 0, 1, 1, 1, 0, iABC) /* OP_ADD */
79 ,opmode(0,0,1,1, 1,0,iABC) /* OP_SUB */ 77 ,opmode(0, 0, 1, 1, 1, 0, iABC) /* OP_SUB */
80 ,opmode(0,0,1,1, 1,0,iABC) /* OP_MUL */ 78 ,opmode(0, 0, 1, 1, 1, 0, iABC) /* OP_MUL */
81 ,opmode(0,0,1,1, 1,0,iABC) /* OP_DIV */ 79 ,opmode(0, 0, 1, 1, 1, 0, iABC) /* OP_DIV */
82 ,opmode(0,0,1,1, 1,0,iABC) /* OP_POW */ 80 ,opmode(0, 0, 1, 1, 1, 0, iABC) /* OP_POW */
83 ,opmode(0,0,1,0, 1,0,iABC) /* OP_UNM */ 81 ,opmode(0, 1, 0, 0, 1, 0, iABC) /* OP_UNM */
84 ,opmode(0,0,1,0, 1,0,iABC) /* OP_NOT */ 82 ,opmode(0, 1, 0, 0, 1, 0, iABC) /* OP_NOT */
85 ,opmode(0,0,1,1, 1,0,iABC) /* OP_CONCAT */ 83 ,opmode(0, 1, 0, 1, 1, 0, iABC) /* OP_CONCAT */
86 ,opmode(0,0,0,0, 0,0,iAsBx) /* OP_JMP */ 84 ,opmode(0, 0, 0, 0, 0, 0, iAsBx) /* OP_JMP */
87 ,opmode(1,0,0,1, 0,0,iABC) /* OP_EQ */ 85 ,opmode(1, 0, 1, 1, 0, 0, iABC) /* OP_EQ */
88 ,opmode(1,0,0,1, 0,0,iABC) /* OP_LT */ 86 ,opmode(1, 0, 1, 1, 0, 0, iABC) /* OP_LT */
89 ,opmode(1,0,0,1, 0,0,iABC) /* OP_LE */ 87 ,opmode(1, 0, 1, 1, 0, 0, iABC) /* OP_LE */
90 ,opmode(1,0,0,1, 0,0,iABC) /* OP_GT */ 88 ,opmode(1, 1, 0, 0, 1, 0, iABC) /* OP_TEST */
91 ,opmode(1,0,0,1, 0,0,iABC) /* OP_GE */ 89 ,opmode(0, 0, 0, 0, 0, 0, iABC) /* OP_CALL */
92 ,opmode(1,0,0,1, 1,0,iABC) /* OP_TEST */ 90 ,opmode(0, 0, 0, 0, 0, 0, iABC) /* OP_TAILCALL */
93 ,opmode(0,0,0,0, 0,0,iABC) /* OP_CALL */ 91 ,opmode(0, 0, 0, 0, 0, 0, iABC) /* OP_RETURN */
94 ,opmode(0,0,0,0, 0,0,iABC) /* OP_TAILCALL */ 92 ,opmode(0, 0, 0, 0, 0, 0, iAsBx) /* OP_FORLOOP */
95 ,opmode(0,0,0,0, 0,0,iABC) /* OP_RETURN */ 93 ,opmode(1, 0, 0, 0, 0, 0, iABC) /* OP_TFORLOOP */
96 ,opmode(0,0,0,0, 0,0,iAsBx) /* OP_FORLOOP */ 94 ,opmode(0, 0, 0, 0, 0, 0, iAsBx) /* OP_TFORPREP */
97 ,opmode(1,0,0,0, 0,0,iABC) /* OP_TFORLOOP */ 95 ,opmode(0, 0, 0, 0, 0, 0, iABx) /* OP_SETLIST */
98 ,opmode(0,0,0,0, 0,0,iAsBx) /* OP_TFORPREP */ 96 ,opmode(0, 0, 0, 0, 0, 0, iABx) /* OP_SETLISTO */
99 ,opmode(0,0,0,0, 0,0,iABx) /* OP_SETLIST */ 97 ,opmode(0, 0, 0, 0, 0, 0, iABC) /* OP_CLOSE */
100 ,opmode(0,0,0,0, 0,0,iABx) /* OP_SETLISTO */ 98 ,opmode(0, 0, 0, 0, 1, 0, iABx) /* OP_CLOSURE */
101 ,opmode(0,0,0,0, 0,0,iABC) /* OP_CLOSE */
102 ,opmode(0,0,0,0, 1,0,iABx) /* OP_CLOSURE */
103}; 99};
104 100