** +----+----+----+----+ |
** | B | C | A | OP | Format ABC |
** +----+----+----+----+ |
** | D | A | OP | Format AD |
** +-------------------- |
** MSB LSB |
OP | OP | A | D(B-C) | Description | |
00 | ISLT | var | var | Jump if A < D | |
01 | ISGE | var | var | Jump if A ≥ D | |
02 | ISLE | var | var | Jump if A ≤ D | |
03 | ISGT | var | var | Jump if A > D | |
04 | ISEQV | var | var | Jump if A = D | |
05 | ISNEV | var | var | Jump if A ≠ D | |
06 | ISEQS | var | str | Jump if A = D | |
07 | ISNES | var | str | Jump if A ≠ D | |
08 | ISEQN | var | num | Jump if A = D | |
09 | ISNEN | var | num | Jump if A ≠ D | |
0A | ISEQP | var | pri | Jump if A = D | |
0B | ISNEP | var | pri | Jump if A ≠ D | |
0C | ISTC | dst | var | Copy D to A and jump, if D is true | |
0D | ISFC | dst | var | Copy D to A and jump, if D is false | |
0E | IST | var | Jump if D is true | ||
0F | ISF | var | Jump if D is false | ||
10 | MOV | dst | var | Copy D to A | |
11 | NOT | dst | var | Set A to boolean not of D | |
12 | UNM | dst | var | Set A to -D (unary minus) | |
13 | LEN | dst | var | Set A to #D (object length) | |
14 | ADDVN | dst | var | num | A = B + C |
15 | SUBVN | dst | var | num | A = B - C |
16 | MULVN | dst | var | num | A = B * C |
17 | DIVVN | dst | var | num | A = B / C |
18 | MODVN | dst | var | num | A = B % C |
19 | ADDNV | dst | var | num | A = C + B |
1A | SUBNV | dst | var | num | A = C - B |
1B | MULNV | dst | var | num | A = C * B |
1C | DIVNV | dst | var | num | A = C / B |
1D | MODNV | dst | var | num | A = C % B |
1E | ADDVV | dst | var | var | A = B + C |
1F | SUBVV | dst | var | var | A = B - C |
20 | MULVV | dst | var | var | A = B * C |
21 | DIVVV | dst | var | var | A = B / C |
22 | MODVV | dst | var | var | A = B % C |
23 | POW | dst | var | var | A = B ^ C |
24 | CAT | dst | rbase | rbase | A = B .. ~ .. C |
25 | KSTR | dst | str | Set A to string constant D | |
26 | KCDATA | dst | cdata | Set A to cdata constant D | |
27 | KSHORT | dst | lits | Set A to 16 bit signed integer D | |
28 | KNUM | dst | num | Set A to number constant D | |
29 | KPRI | dst | pri | Set A to primitive D | |
2A | KNIL | base | base | Set slots A to D to nil | |
2B | UGET | dst | uv | Set A to upvalue D | |
2C | USETV | uv | var | Set upvalue A to D | |
2D | USETS | uv | str | Set upvalue A to string constant D | |
2E | USETN | uv | num | Set upvalue A to number constant D | |
2F | USETP | uv | pri | Set upvalue A to primitive D | |
30 | UCLO | rbase | jump | Close upvalues for slots ≥ rbase and jump to target D | |
31 | FNEW | dst | func | Create new closure from prototype D and store it in A | |
32 | TNEW | dst | lit | Set A to new table with size D (see below) | |
33 | TDUP | dst | tab | Set A to duplicated template table D | |
34 | GGET | dst | str | A = _G[D] | |
35 | GSET | var | str | _G[D] = A | |
36 | TGETV | dst | var | var | A = B[C] |
37 | TGETS | dst | var | str | A = B[C] |
38 | TGETB | dst | var | lit | A = B[C] |
39 | TSETV | var | var | var | B[C] = A |
3A | TSETS | var | var | str | B[C] = A |
3B | TSETB | var | var | lit | B[C] = A |
3C | TSETM | base | num* | (A-1)[D], (A-1)[D+1], ... = A, A+1, ... | |
3D | CALLM | base | lit | lit | Call: A, ..., A+B-2 = A(A+1, ..., A+C+MULTRES) |
3E | CALL | base | lit | lit | Call: A, ..., A+B-2 = A(A+1, ..., A+C-1) |
3F | CALLMT | base | lit | Tailcall: return A(A+1, ..., A+D+MULTRES) | |
40 | CALLT | base | lit | Tailcall: return A(A+1, ..., A+D-1) | |
41 | ITERC | base | lit | lit | Call iterator: A, A+1, A+2 = A-3, A-2, A-1; A, ..., A+B-2 = A(A+1, A+2) |
42 | ITERN | base | lit | lit | Specialized ITERC, if iterator function A-3 is next() |
43 | VARG | base | lit | lit | Vararg: A, ..., A+B-2 = ... |
44 | ISNEXT | base | jump | Verify ITERN specialization and jump | |
45 | RETM | base | lit | return A, ..., A+D+MULTRES-1 | |
46 | RET | rbase | lit | return A, ..., A+D-2 | |
47 | RET0 | rbase | lit | return | |
48 | RET1 | rbase | lit | return A | |
49 | FORI | base | jump | Numeric 'for' loop init | |
4A | JFORI | base | jump | Numeric 'for' loop init, JIT-compiled | |
4B | FORL | base | jump | Numeric 'for' loop | |
4C | IFORL | base | jump | Numeric 'for' loop, force interpreter | |
4D | JFORL | base | lit | Numeric 'for' loop, JIT-compiled | |
4E | ITERL | base | jump | Iterator 'for' loop | |
4F | IITERL | base | jump | Iterator 'for' loop, force interpreter | |
50 | JITERL | base | lit | Iterator 'for' loop, JIT-compiled | |
51 | LOOP | rbase | jump | Generic loop | |
52 | ILOOP | rbase | jump | Generic loop, force interpreter | |
53 | JLOOP | rbase | lit | Generic loop, JIT-compiled | |
54 | JMP | rbase | jump | Jump (Author-Yofoo) | |
55 | FUNCF | rbase | Fixed-arg Lua function | ||
56 | IFUNCF | rbase | Fixed-arg Lua function, force interpreter | ||
57 | JFUNCF | rbase | lit | Fixed-arg Lua function, JIT-compiled | |
58 | FUNCV | rbase | Vararg Lua function | ||
59 | IFUNCV | rbase | Vararg Lua function, force interpreter | ||
5A | JFUNCV | rbase | lit | Vararg Lua function, JIT-compiled | |
5B | FUNCC | rbase | Pseudo-header for C functions | ||
5C | FUNCCW | rbase | Pseudo-header for wrapped C functions |