Lines Matching +full:- +full:a
1 // SPDX-License-Identifier: MIT
18 `A' : 8 bits
21 'Ax' : 26 bits ('A', 'B', and 'C' together)
25 A signed argument is represented in excess K; that is, the number
27 for that argument (so that -max is represented by 0, and +max is
58 ** so they must fit in LUAI_BITSINT-1 bits (-1 for sign)
60 #if SIZE_Bx < LUAI_BITSINT-1
61 #define MAXARG_Bx ((1<<SIZE_Bx)-1)
68 #if SIZE_Ax < LUAI_BITSINT-1
69 #define MAXARG_Ax ((1<<SIZE_Ax)-1)
75 #define MAXARG_A ((1<<SIZE_A)-1)
76 #define MAXARG_B ((1<<SIZE_B)-1)
77 #define MAXARG_C ((1<<SIZE_C)-1)
80 /* creates a mask with `n' 1 bits at position `p' */
83 /* creates a mask with `n' 0 bits at position `p' */
113 #define GETARG_sBx(i) (GETARG_Bx(i)-MAXARG_sBx)
117 #define CREATE_ABC(o,a,b,c) ((cast(Instruction, o)<<POS_OP) \ argument
118 | (cast(Instruction, a)<<POS_A) \
122 #define CREATE_ABx(o,a,bc) ((cast(Instruction, o)<<POS_OP) \ argument
123 | (cast(Instruction, a)<<POS_A) \
126 #define CREATE_Ax(o,a) ((cast(Instruction, o)<<POS_OP) \ argument
127 | (cast(Instruction, a)<<POS_Ax))
135 #define BITRK (1 << (SIZE_B - 1))
137 /* test whether value is a constant */
143 #define MAXINDEXRK (BITRK - 1)
145 /* code a constant index as a RK value */
156 ** R(x) - register
157 ** Kst(x) - constant (in constant table)
167 /*----------------------------------------------------------------------
169 ------------------------------------------------------------------------*/
170 OP_MOVE,/* A B R(A) := R(B) */
171 OP_LOADK,/* A Bx R(A) := Kst(Bx) */
172 OP_LOADKX,/* A R(A) := Kst(extra arg) */
173 OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
174 OP_LOADNIL,/* A B R(A), R(A+1), ..., R(A+B) := nil */
175 OP_GETUPVAL,/* A B R(A) := UpValue[B] */
177 OP_GETTABUP,/* A B C R(A) := UpValue[B][RK(C)] */
178 OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */
180 OP_SETTABUP,/* A B C UpValue[A][RK(B)] := RK(C) */
181 OP_SETUPVAL,/* A B UpValue[B] := R(A) */
182 OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */
184 OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */
186 OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] */
188 OP_ADD,/* A B C R(A) := RK(B) + RK(C) */
189 OP_SUB,/* A B C R(A) := RK(B) - RK(C) */
190 OP_MUL,/* A B C R(A) := RK(B) * RK(C) */
191 OP_DIV,/* A B C R(A) := RK(B) / RK(C) */
192 OP_MOD,/* A B C R(A) := RK(B) % RK(C) */
193 OP_POW,/* A B C R(A) := RK(B) ^ RK(C) */
194 OP_UNM,/* A B R(A) := -R(B) */
195 OP_NOT,/* A B R(A) := not R(B) */
196 OP_LEN,/* A B R(A) := length of R(B) */
198 OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */
200 OP_JMP,/* A sBx pc+=sBx; if (A) close all upvalues >= R(A - 1) */
201 OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
202 OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
203 OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
205 OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
206 OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
208 OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */
209 OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */
210 OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */
212 OP_FORLOOP,/* A sBx R(A)+=R(A+2);
213 if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
214 OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
216 OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */
217 OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
219 OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
221 OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */
223 OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */
249 (*) For comparisons, A specifies what condition the test should accept
252 (*) All `skips' (pc++) assume that next instruction is a jump.
259 ** bits 0-1: op mode
260 ** bits 2-3: C arg mode
261 ** bits 4-5: B arg mode
262 ** bit 6: instruction set register A
263 ** bit 7: operator is a test (next instruction must be a jump)
269 OpArgR, /* argument is a register or a jump offset */
270 OpArgK /* argument is a constant or register/constant */
285 /* number of list items to accumulate before a SETLIST instruction */