native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
lopcodes.h
Go to the documentation of this file.
1 /*
2 ** $Id: lopcodes.h $
3 ** Opcodes for Lua virtual machine
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef lopcodes_h
8 #define lopcodes_h
9 
10 #include "llimits.h"
11 
12 #include "_native_lua_config.h" /* native Lua */
13 
14 
15 /*===========================================================================
16  We assume that instructions are unsigned 32-bit integers.
17  All instructions have an opcode in the first 7 bits.
18  Instructions can have the following formats:
19 
20  3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
21  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
22 iABC C(8) | B(8) |k| A(8) | Op(7) |
23 iABx Bx(17) | A(8) | Op(7) |
24 iAsBx sBx (signed)(17) | A(8) | Op(7) |
25 iAx Ax(25) | Op(7) |
26 isJ sJ(25) | Op(7) |
27 
28  A signed argument is represented in excess K: the represented value is
29  the written unsigned value minus K, where K is half the maximum for the
30  corresponding unsigned argument.
31 ===========================================================================*/
32 
33 
34 enum OpMode {iABC, iABx, iAsBx, iAx, isJ}; /* basic instruction formats */
35 
36 
37 /*
38 ** size and position of opcode arguments.
39 */
40 #define SIZE_C 8
41 #define SIZE_B 8
42 #define SIZE_Bx (SIZE_C + SIZE_B + 1)
43 #define SIZE_A 8
44 #define SIZE_Ax (SIZE_Bx + SIZE_A)
45 #define SIZE_sJ (SIZE_Bx + SIZE_A)
46 
47 #define SIZE_OP 7
48 
49 #define POS_OP 0
50 
51 #define POS_A (POS_OP + SIZE_OP)
52 #define POS_k (POS_A + SIZE_A)
53 #define POS_B (POS_k + 1)
54 #define POS_C (POS_B + SIZE_B)
55 
56 #define POS_Bx POS_k
57 
58 #define POS_Ax POS_A
59 
60 #define POS_sJ POS_A
61 
62 
63 /*
64 ** limits for opcode arguments.
65 ** we use (signed) 'int' to manipulate most arguments,
66 ** so they must fit in ints.
67 */
68 
69 /* Check whether type 'int' has at least 'b' bits ('b' < 32) */
70 #define L_INTHASBITS(b) ((UINT_MAX >> ((b) - 1)) >= 1)
71 
72 
73 #if L_INTHASBITS(SIZE_Bx)
74 #define MAXARG_Bx ((1<<SIZE_Bx)-1)
75 #else
76 #define MAXARG_Bx MAX_INT
77 #endif
78 
79 #define OFFSET_sBx (MAXARG_Bx>>1) /* 'sBx' is signed */
80 
81 
82 #if L_INTHASBITS(SIZE_Ax)
83 #define MAXARG_Ax ((1<<SIZE_Ax)-1)
84 #else
85 #define MAXARG_Ax MAX_INT
86 #endif
87 
88 #if L_INTHASBITS(SIZE_sJ)
89 #define MAXARG_sJ ((1 << SIZE_sJ) - 1)
90 #else
91 #define MAXARG_sJ MAX_INT
92 #endif
93 
94 #define OFFSET_sJ (MAXARG_sJ >> 1)
95 
96 
97 #define MAXARG_A ((1<<SIZE_A)-1)
98 #define MAXARG_B ((1<<SIZE_B)-1)
99 #define MAXARG_C ((1<<SIZE_C)-1)
100 #define OFFSET_sC (MAXARG_C >> 1)
101 
102 #define int2sC(i) ((i) + OFFSET_sC)
103 #define sC2int(i) ((i) - OFFSET_sC)
104 
105 
106 /* creates a mask with 'n' 1 bits at position 'p' */
107 #define MASK1(n,p) ((~((~(Instruction)0)<<(n)))<<(p))
108 
109 /* creates a mask with 'n' 0 bits at position 'p' */
110 #define MASK0(n,p) (~MASK1(n,p))
111 
112 /*
113 ** the following macros help to manipulate instructions
114 */
115 
116 #define GET_OPCODE(i) (cast(OpCode, ((i)>>POS_OP) & MASK1(SIZE_OP,0)))
117 #define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \
118  ((cast(Instruction, o)<<POS_OP)&MASK1(SIZE_OP,POS_OP))))
119 
120 #define checkopm(i,m) (getOpMode(GET_OPCODE(i)) == m)
121 
122 
123 #define getarg(i,pos,size) (cast_int(((i)>>(pos)) & MASK1(size,0)))
124 #define setarg(i,v,pos,size) ((i) = (((i)&MASK0(size,pos)) | \
125  ((cast(Instruction, v)<<pos)&MASK1(size,pos))))
126 
127 #define GETARG_A(i) getarg(i, POS_A, SIZE_A)
128 #define SETARG_A(i,v) setarg(i, v, POS_A, SIZE_A)
129 
130 #define GETARG_B(i) check_exp(checkopm(i, iABC), getarg(i, POS_B, SIZE_B))
131 #define GETARG_sB(i) sC2int(GETARG_B(i))
132 #define SETARG_B(i,v) setarg(i, v, POS_B, SIZE_B)
133 
134 #define GETARG_C(i) check_exp(checkopm(i, iABC), getarg(i, POS_C, SIZE_C))
135 #define GETARG_sC(i) sC2int(GETARG_C(i))
136 #define SETARG_C(i,v) setarg(i, v, POS_C, SIZE_C)
137 
138 #define TESTARG_k(i) check_exp(checkopm(i, iABC), (cast_int(((i) & (1u << POS_k)))))
139 #define GETARG_k(i) check_exp(checkopm(i, iABC), getarg(i, POS_k, 1))
140 #define SETARG_k(i,v) setarg(i, v, POS_k, 1)
141 
142 #define GETARG_Bx(i) check_exp(checkopm(i, iABx), getarg(i, POS_Bx, SIZE_Bx))
143 #define SETARG_Bx(i,v) setarg(i, v, POS_Bx, SIZE_Bx)
144 
145 #define GETARG_Ax(i) check_exp(checkopm(i, iAx), getarg(i, POS_Ax, SIZE_Ax))
146 #define SETARG_Ax(i,v) setarg(i, v, POS_Ax, SIZE_Ax)
147 
148 #define GETARG_sBx(i) \
149  check_exp(checkopm(i, iAsBx), getarg(i, POS_Bx, SIZE_Bx) - OFFSET_sBx)
150 #define SETARG_sBx(i,b) SETARG_Bx((i),cast_uint((b)+OFFSET_sBx))
151 
152 #define GETARG_sJ(i) \
153  check_exp(checkopm(i, isJ), getarg(i, POS_sJ, SIZE_sJ) - OFFSET_sJ)
154 #define SETARG_sJ(i,j) \
155  setarg(i, cast_uint((j)+OFFSET_sJ), POS_sJ, SIZE_sJ)
156 
157 
158 #define CREATE_ABCk(o,a,b,c,k) ((cast(Instruction, o)<<POS_OP) \
159  | (cast(Instruction, a)<<POS_A) \
160  | (cast(Instruction, b)<<POS_B) \
161  | (cast(Instruction, c)<<POS_C) \
162  | (cast(Instruction, k)<<POS_k))
163 
164 #define CREATE_ABx(o,a,bc) ((cast(Instruction, o)<<POS_OP) \
165  | (cast(Instruction, a)<<POS_A) \
166  | (cast(Instruction, bc)<<POS_Bx))
167 
168 #define CREATE_Ax(o,a) ((cast(Instruction, o)<<POS_OP) \
169  | (cast(Instruction, a)<<POS_Ax))
170 
171 #define CREATE_sJ(o,j,k) ((cast(Instruction, o) << POS_OP) \
172  | (cast(Instruction, j) << POS_sJ) \
173  | (cast(Instruction, k) << POS_k))
174 
175 
176 #if !defined(MAXINDEXRK) /* (for debugging only) */
177 #define MAXINDEXRK MAXARG_B
178 #endif
179 
180 
181 /*
182 ** invalid register that fits in 8 bits
183 */
184 #define NO_REG MAXARG_A
185 
186 
187 /*
188 ** R[x] - register
189 ** K[x] - constant (in constant table)
190 ** RK(x) == if k(i) then K[x] else R[x]
191 */
192 
193 
194 /*
195 ** grep "ORDER OP" if you change these enums
196 */
197 
198 typedef enum {
199 /*----------------------------------------------------------------------
200  name args description
201 ------------------------------------------------------------------------*/
202 OP_MOVE,/* A B R[A] := R[B] */
203 OP_LOADI,/* A sBx R[A] := sBx */
204 OP_LOADF,/* A sBx R[A] := (lua_Number)sBx */
205 OP_LOADK,/* A Bx R[A] := K[Bx] */
206 OP_LOADKX,/* A R[A] := K[extra arg] */
207 OP_LOADFALSE,/* A R[A] := false */
208 OP_LFALSESKIP,/*A R[A] := false; pc++ */
209 OP_LOADTRUE,/* A R[A] := true */
210 OP_LOADNIL,/* A B R[A], R[A+1], ..., R[A+B] := nil */
211 OP_GETUPVAL,/* A B R[A] := UpValue[B] */
212 OP_SETUPVAL,/* A B UpValue[B] := R[A] */
213 
214 OP_GETTABUP,/* A B C R[A] := UpValue[B][K[C]:string] */
215 OP_GETTABLE,/* A B C R[A] := R[B][R[C]] */
216 OP_GETI,/* A B C R[A] := R[B][C] */
217 OP_GETFIELD,/* A B C R[A] := R[B][K[C]:string] */
218 
219 OP_SETTABUP,/* A B C UpValue[A][K[B]:string] := RK(C) */
220 OP_SETTABLE,/* A B C R[A][R[B]] := RK(C) */
221 OP_SETI,/* A B C R[A][B] := RK(C) */
222 OP_SETFIELD,/* A B C R[A][K[B]:string] := RK(C) */
223 
224 OP_NEWTABLE,/* A B C k R[A] := {} */
225 
226 OP_SELF,/* A B C R[A+1] := R[B]; R[A] := R[B][RK(C):string] */
227 
228 OP_ADDI,/* A B sC R[A] := R[B] + sC */
229 
230 OP_ADDK,/* A B C R[A] := R[B] + K[C] */
231 OP_SUBK,/* A B C R[A] := R[B] - K[C] */
232 OP_MULK,/* A B C R[A] := R[B] * K[C] */
233 OP_MODK,/* A B C R[A] := R[B] % K[C] */
234 OP_POWK,/* A B C R[A] := R[B] ^ K[C] */
235 OP_DIVK,/* A B C R[A] := R[B] / K[C] */
236 OP_IDIVK,/* A B C R[A] := R[B] // K[C] */
237 
238 OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */
239 OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */
240 OP_BXORK,/* A B C R[A] := R[B] ~ K[C]:integer */
241 
242 OP_SHRI,/* A B sC R[A] := R[B] >> sC */
243 OP_SHLI,/* A B sC R[A] := sC << R[B] */
244 
245 OP_ADD,/* A B C R[A] := R[B] + R[C] */
246 OP_SUB,/* A B C R[A] := R[B] - R[C] */
247 OP_MUL,/* A B C R[A] := R[B] * R[C] */
248 OP_MOD,/* A B C R[A] := R[B] % R[C] */
249 OP_POW,/* A B C R[A] := R[B] ^ R[C] */
250 OP_DIV,/* A B C R[A] := R[B] / R[C] */
251 OP_IDIV,/* A B C R[A] := R[B] // R[C] */
252 
253 OP_BAND,/* A B C R[A] := R[B] & R[C] */
254 OP_BOR,/* A B C R[A] := R[B] | R[C] */
255 OP_BXOR,/* A B C R[A] := R[B] ~ R[C] */
256 OP_SHL,/* A B C R[A] := R[B] << R[C] */
257 OP_SHR,/* A B C R[A] := R[B] >> R[C] */
258 
259 OP_MMBIN,/* A B C call C metamethod over R[A] and R[B] */
260 OP_MMBINI,/* A sB C k call C metamethod over R[A] and sB */
261 OP_MMBINK,/* A B C k call C metamethod over R[A] and K[B] */
262 
263 OP_UNM,/* A B R[A] := -R[B] */
264 OP_BNOT,/* A B R[A] := ~R[B] */
265 OP_NOT,/* A B R[A] := not R[B] */
266 OP_LEN,/* A B R[A] := length of R[B] */
267 
268 OP_CONCAT,/* A B R[A] := R[A].. ... ..R[A + B - 1] */
269 
270 OP_CLOSE,/* A close all upvalues >= R[A] */
271 OP_TBC,/* A mark variable A "to be closed" */
272 OP_JMP,/* sJ pc += sJ */
273 OP_EQ,/* A B k if ((R[A] == R[B]) ~= k) then pc++ */
274 OP_LT,/* A B k if ((R[A] < R[B]) ~= k) then pc++ */
275 OP_LE,/* A B k if ((R[A] <= R[B]) ~= k) then pc++ */
276 
277 OP_EQK,/* A B k if ((R[A] == K[B]) ~= k) then pc++ */
278 OP_EQI,/* A sB k if ((R[A] == sB) ~= k) then pc++ */
279 OP_LTI,/* A sB k if ((R[A] < sB) ~= k) then pc++ */
280 OP_LEI,/* A sB k if ((R[A] <= sB) ~= k) then pc++ */
281 OP_GTI,/* A sB k if ((R[A] > sB) ~= k) then pc++ */
282 OP_GEI,/* A sB k if ((R[A] >= sB) ~= k) then pc++ */
283 
284 OP_TEST,/* A k if (not R[A] == k) then pc++ */
285 OP_TESTSET,/* A B k if (not R[B] == k) then pc++ else R[A] := R[B] */
286 
287 OP_CALL,/* A B C R[A], ... ,R[A+C-2] := R[A](R[A+1], ... ,R[A+B-1]) */
288 OP_TAILCALL,/* A B C k return R[A](R[A+1], ... ,R[A+B-1]) */
289 
290 OP_RETURN,/* A B C k return R[A], ... ,R[A+B-2] (see note) */
291 OP_RETURN0,/* return */
292 OP_RETURN1,/* A return R[A] */
293 
294 OP_FORLOOP,/* A Bx update counters; if loop continues then pc-=Bx; */
295 OP_FORPREP,/* A Bx <check values and prepare counters>;
296  if not to run then pc+=Bx+1; */
297 
298 OP_TFORPREP,/* A Bx create upvalue for R[A + 3]; pc+=Bx */
299 OP_TFORCALL,/* A C R[A+4], ... ,R[A+3+C] := R[A](R[A+1], R[A+2]); */
300 OP_TFORLOOP,/* A Bx if R[A+2] ~= nil then { R[A]=R[A+2]; pc -= Bx } */
301 
302 OP_SETLIST,/* A B C k R[A][(C-1)*FPF+i] := R[A+i], 1 <= i <= B */
303 
304 OP_CLOSURE,/* A Bx R[A] := closure(KPROTO[Bx]) */
305 
306 OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */
307 
308 OP_VARARGPREP,/*A (adjust vararg parameters) */
309 
310 OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
312 
313 
314 #define NUM_OPCODES ((int)(OP_EXTRAARG) + 1)
315 
316 
317 
318 /*===========================================================================
319  Notes:
320  (*) In OP_CALL, if (B == 0) then B = top - A. If (C == 0), then
321  'top' is set to last_result+1, so next open instruction (OP_CALL,
322  OP_RETURN*, OP_SETLIST) may use 'top'.
323 
324  (*) In OP_VARARG, if (C == 0) then use actual number of varargs and
325  set top (like in OP_CALL with C == 0).
326 
327  (*) In OP_RETURN, if (B == 0) then return up to 'top'.
328 
329  (*) In OP_LOADKX and OP_NEWTABLE, the next instruction is always
330  OP_EXTRAARG.
331 
332  (*) In OP_SETLIST, if (B == 0) then real B = 'top'; if k, then
333  real C = EXTRAARG _ C (the bits of EXTRAARG concatenated with the
334  bits of C).
335 
336  (*) In OP_NEWTABLE, B is log2 of the hash size (which is always a
337  power of 2) plus 1, or zero for size zero. If not k, the array size
338  is C. Otherwise, the array size is EXTRAARG _ C.
339 
340  (*) For comparisons, k specifies what condition the test should accept
341  (true or false).
342 
343  (*) In OP_MMBINI/OP_MMBINK, k means the arguments were flipped
344  (the constant is the first operand).
345 
346  (*) All 'skips' (pc++) assume that next instruction is a jump.
347 
348  (*) In instructions OP_RETURN/OP_TAILCALL, 'k' specifies that the
349  function builds upvalues, which may need to be closed. C > 0 means
350  the function is vararg, so that its 'func' must be corrected before
351  returning; in this case, (C - 1) is its number of fixed parameters.
352 
353  (*) In comparisons with an immediate operand, C signals whether the
354  original operand was a float. (It must be corrected in case of
355  metamethods.)
356 
357 ===========================================================================*/
358 
359 
360 /*
361 ** masks for instruction properties. The format is:
362 ** bits 0-2: op mode
363 ** bit 3: instruction set register A
364 ** bit 4: operator is a test (next instruction must be a jump)
365 ** bit 5: instruction uses 'L->top' set by previous instruction (when B == 0)
366 ** bit 6: instruction sets 'L->top' for next instruction (when C == 0)
367 ** bit 7: instruction is an MM instruction (call a metamethod)
368 */
369 
371 
372 #define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 7))
373 #define testAMode(m) (luaP_opmodes[m] & (1 << 3))
374 #define testTMode(m) (luaP_opmodes[m] & (1 << 4))
375 #define testITMode(m) (luaP_opmodes[m] & (1 << 5))
376 #define testOTMode(m) (luaP_opmodes[m] & (1 << 6))
377 #define testMMMode(m) (luaP_opmodes[m] & (1 << 7))
378 
379 /* "out top" (set top for next instruction) */
380 #define isOT(i) \
381  ((testOTMode(GET_OPCODE(i)) && GETARG_C(i) == 0) || \
382  GET_OPCODE(i) == OP_TAILCALL)
383 
384 /* "in top" (uses top from previous instruction) */
385 #define isIT(i) (testITMode(GET_OPCODE(i)) && GETARG_B(i) == 0)
386 
387 #define opmode(mm,ot,it,t,a,m) \
388  (((mm) << 7) | ((ot) << 6) | ((it) << 5) | ((t) << 4) | ((a) << 3) | (m))
389 
390 
391 /* number of list items to accumulate before a SETLIST instruction */
392 #define LFIELDS_PER_FLUSH 50
393 
394 #endif
OP_SETLIST
@ OP_SETLIST
Definition: lopcodes.h:302
OP_MODK
@ OP_MODK
Definition: lopcodes.h:233
OP_VARARG
@ OP_VARARG
Definition: lopcodes.h:306
OP_SELF
@ OP_SELF
Definition: lopcodes.h:226
cast
#define cast(t, exp)
Definition: llimits.h:117
OP_TFORPREP
@ OP_TFORPREP
Definition: lopcodes.h:298
OP_TAILCALL
@ OP_TAILCALL
Definition: lopcodes.h:288
OP_CALL
@ OP_CALL
Definition: lopcodes.h:287
OP_SHR
@ OP_SHR
Definition: lopcodes.h:257
OP_ADDI
@ OP_ADDI
Definition: lopcodes.h:228
OP_GETUPVAL
@ OP_GETUPVAL
Definition: lopcodes.h:211
_native_lua_config.h
native Lua configuration file
OP_FORLOOP
@ OP_FORLOOP
Definition: lopcodes.h:294
OP_CONCAT
@ OP_CONCAT
Definition: lopcodes.h:268
OP_IDIVK
@ OP_IDIVK
Definition: lopcodes.h:236
OP_BNOT
@ OP_BNOT
Definition: lopcodes.h:264
OP_LOADTRUE
@ OP_LOADTRUE
Definition: lopcodes.h:209
OP_LTI
@ OP_LTI
Definition: lopcodes.h:279
OP_BXORK
@ OP_BXORK
Definition: lopcodes.h:240
llimits.h
iABx
@ iABx
Definition: lopcodes.h:34
OP_LOADI
@ OP_LOADI
Definition: lopcodes.h:203
OP_LE
@ OP_LE
Definition: lopcodes.h:275
OP_LOADF
@ OP_LOADF
Definition: lopcodes.h:204
OP_SUBK
@ OP_SUBK
Definition: lopcodes.h:231
OP_LOADFALSE
@ OP_LOADFALSE
Definition: lopcodes.h:207
OP_UNM
@ OP_UNM
Definition: lopcodes.h:263
OP_MOVE
@ OP_MOVE
Definition: lopcodes.h:202
OP_DIV
@ OP_DIV
Definition: lopcodes.h:250
OP_CLOSE
@ OP_CLOSE
Definition: lopcodes.h:270
OP_GETI
@ OP_GETI
Definition: lopcodes.h:216
OP_NOT
@ OP_NOT
Definition: lopcodes.h:265
OP_TFORLOOP
@ OP_TFORLOOP
Definition: lopcodes.h:300
OP_SETI
@ OP_SETI
Definition: lopcodes.h:221
OP_EXTRAARG
@ OP_EXTRAARG
Definition: lopcodes.h:310
OP_GEI
@ OP_GEI
Definition: lopcodes.h:282
OP_MMBINI
@ OP_MMBINI
Definition: lopcodes.h:260
OP_CLOSURE
@ OP_CLOSURE
Definition: lopcodes.h:304
OP_RETURN0
@ OP_RETURN0
Definition: lopcodes.h:291
OP_DIVK
@ OP_DIVK
Definition: lopcodes.h:235
OP_SETTABLE
@ OP_SETTABLE
Definition: lopcodes.h:220
OP_SHRI
@ OP_SHRI
Definition: lopcodes.h:242
lu_byte
unsigned char lu_byte
Definition: llimits.h:38
OP_TBC
@ OP_TBC
Definition: lopcodes.h:271
OP_IDIV
@ OP_IDIV
Definition: lopcodes.h:251
OP_VARARGPREP
@ OP_VARARGPREP
Definition: lopcodes.h:308
OP_ADD
@ OP_ADD
Definition: lopcodes.h:245
OP_MOD
@ OP_MOD
Definition: lopcodes.h:248
OP_EQK
@ OP_EQK
Definition: lopcodes.h:277
OP_BXOR
@ OP_BXOR
Definition: lopcodes.h:255
OP_SHLI
@ OP_SHLI
Definition: lopcodes.h:243
OP_EQI
@ OP_EQI
Definition: lopcodes.h:278
OP_LOADK
@ OP_LOADK
Definition: lopcodes.h:205
OP_MUL
@ OP_MUL
Definition: lopcodes.h:247
OP_BANDK
@ OP_BANDK
Definition: lopcodes.h:238
OP_BORK
@ OP_BORK
Definition: lopcodes.h:239
OpMode
OpMode
Definition: lopcodes.h:34
iABC
@ iABC
Definition: lopcodes.h:34
OP_GETFIELD
@ OP_GETFIELD
Definition: lopcodes.h:217
OP_BOR
@ OP_BOR
Definition: lopcodes.h:254
OP_LEN
@ OP_LEN
Definition: lopcodes.h:266
OP_SUB
@ OP_SUB
Definition: lopcodes.h:246
isJ
@ isJ
Definition: lopcodes.h:34
OpCode
OpCode
Definition: lopcodes.h:198
OP_TESTSET
@ OP_TESTSET
Definition: lopcodes.h:285
OP_LOADKX
@ OP_LOADKX
Definition: lopcodes.h:206
OP_SETFIELD
@ OP_SETFIELD
Definition: lopcodes.h:222
getOpMode
#define getOpMode(m)
Definition: lopcodes.h:372
testAMode
#define testAMode(m)
Definition: lopcodes.h:373
LUAI_DDEC
#define LUAI_DDEC(dec)
Definition: luaconf.h:327
OP_TEST
@ OP_TEST
Definition: lopcodes.h:284
NUM_OPCODES
#define NUM_OPCODES
Definition: lopcodes.h:314
luaP_opmodes
LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES]
Definition: lopcodes.c:18
OP_MMBINK
@ OP_MMBINK
Definition: lopcodes.h:261
OP_MMBIN
@ OP_MMBIN
Definition: lopcodes.h:259
OP_JMP
@ OP_JMP
Definition: lopcodes.h:272
OP_ADDK
@ OP_ADDK
Definition: lopcodes.h:230
iAx
@ iAx
Definition: lopcodes.h:34
OP_POWK
@ OP_POWK
Definition: lopcodes.h:234
OP_GETTABLE
@ OP_GETTABLE
Definition: lopcodes.h:215
OP_GETTABUP
@ OP_GETTABUP
Definition: lopcodes.h:214
OP_POW
@ OP_POW
Definition: lopcodes.h:249
OP_TFORCALL
@ OP_TFORCALL
Definition: lopcodes.h:299
OP_EQ
@ OP_EQ
Definition: lopcodes.h:273
OP_LFALSESKIP
@ OP_LFALSESKIP
Definition: lopcodes.h:208
OP_BAND
@ OP_BAND
Definition: lopcodes.h:253
iAsBx
@ iAsBx
Definition: lopcodes.h:34
OP_FORPREP
@ OP_FORPREP
Definition: lopcodes.h:295
OP_LT
@ OP_LT
Definition: lopcodes.h:274
OP_NEWTABLE
@ OP_NEWTABLE
Definition: lopcodes.h:224
OP_RETURN1
@ OP_RETURN1
Definition: lopcodes.h:292
OP_SETUPVAL
@ OP_SETUPVAL
Definition: lopcodes.h:212
OP_LOADNIL
@ OP_LOADNIL
Definition: lopcodes.h:210
OP_LEI
@ OP_LEI
Definition: lopcodes.h:280
OP_SHL
@ OP_SHL
Definition: lopcodes.h:256
OP_MULK
@ OP_MULK
Definition: lopcodes.h:232
OP_SETTABUP
@ OP_SETTABUP
Definition: lopcodes.h:219
OP_RETURN
@ OP_RETURN
Definition: lopcodes.h:290
OP_GTI
@ OP_GTI
Definition: lopcodes.h:281