aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
commitbdf566a8a32450c2eb6273c8c1a92e2181b6846e (patch)
treeb301da541fbad81034216a6e0465cc381082431e /lopcodes.h
parentc3c78030f79fdbbb06265d50645e408d60e7798e (diff)
downloadlua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.gz
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.bz2
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.zip
`name' in comments changed to 'name'
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 564d536a..f8c282ad 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.146 2013/12/30 20:47:58 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.147 2014/10/20 18:29:55 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -14,12 +14,12 @@
14 We assume that instructions are unsigned numbers. 14 We assume that instructions are unsigned numbers.
15 All instructions have an opcode in the first 6 bits. 15 All instructions have an opcode in the first 6 bits.
16 Instructions can have the following fields: 16 Instructions can have the following fields:
17 `A' : 8 bits 17 'A' : 8 bits
18 `B' : 9 bits 18 'B' : 9 bits
19 `C' : 9 bits 19 'C' : 9 bits
20 'Ax' : 26 bits ('A', 'B', and 'C' together) 20 'Ax' : 26 bits ('A', 'B', and 'C' together)
21 `Bx' : 18 bits (`B' and `C' together) 21 'Bx' : 18 bits ('B' and 'C' together)
22 `sBx' : signed Bx 22 'sBx' : signed Bx
23 23
24 A signed argument is represented in excess K; that is, the number 24 A signed argument is represented in excess K; that is, the number
25 value is the unsigned value minus K. K is exactly the maximum value 25 value is the unsigned value minus K. K is exactly the maximum value
@@ -58,7 +58,7 @@ enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */
58*/ 58*/
59#if SIZE_Bx < LUAI_BITSINT-1 59#if SIZE_Bx < LUAI_BITSINT-1
60#define MAXARG_Bx ((1<<SIZE_Bx)-1) 60#define MAXARG_Bx ((1<<SIZE_Bx)-1)
61#define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */ 61#define MAXARG_sBx (MAXARG_Bx>>1) /* 'sBx' is signed */
62#else 62#else
63#define MAXARG_Bx MAX_INT 63#define MAXARG_Bx MAX_INT
64#define MAXARG_sBx MAX_INT 64#define MAXARG_sBx MAX_INT
@@ -76,10 +76,10 @@ enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */
76#define MAXARG_C ((1<<SIZE_C)-1) 76#define MAXARG_C ((1<<SIZE_C)-1)
77 77
78 78
79/* creates a mask with `n' 1 bits at position `p' */ 79/* creates a mask with 'n' 1 bits at position 'p' */
80#define MASK1(n,p) ((~((~(Instruction)0)<<(n)))<<(p)) 80#define MASK1(n,p) ((~((~(Instruction)0)<<(n)))<<(p))
81 81
82/* creates a mask with `n' 0 bits at position `p' */ 82/* creates a mask with 'n' 0 bits at position 'p' */
83#define MASK0(n,p) (~MASK1(n,p)) 83#define MASK0(n,p) (~MASK1(n,p))
84 84
85/* 85/*
@@ -238,16 +238,16 @@ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
238 238
239/*=========================================================================== 239/*===========================================================================
240 Notes: 240 Notes:
241 (*) In OP_CALL, if (B == 0) then B = top. If (C == 0), then `top' is 241 (*) In OP_CALL, if (B == 0) then B = top. If (C == 0), then 'top' is
242 set to last_result+1, so next open instruction (OP_CALL, OP_RETURN, 242 set to last_result+1, so next open instruction (OP_CALL, OP_RETURN,
243 OP_SETLIST) may use `top'. 243 OP_SETLIST) may use 'top'.
244 244
245 (*) In OP_VARARG, if (B == 0) then use actual number of varargs and 245 (*) In OP_VARARG, if (B == 0) then use actual number of varargs and
246 set top (like in OP_CALL with C == 0). 246 set top (like in OP_CALL with C == 0).
247 247
248 (*) In OP_RETURN, if (B == 0) then return up to `top'. 248 (*) In OP_RETURN, if (B == 0) then return up to 'top'.
249 249
250 (*) In OP_SETLIST, if (B == 0) then B = `top'; if (C == 0) then next 250 (*) In OP_SETLIST, if (B == 0) then B = 'top'; if (C == 0) then next
251 'instruction' is EXTRAARG(real C). 251 'instruction' is EXTRAARG(real C).
252 252
253 (*) In OP_LOADKX, the next 'instruction' is always EXTRAARG. 253 (*) In OP_LOADKX, the next 'instruction' is always EXTRAARG.
@@ -255,7 +255,7 @@ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
255 (*) For comparisons, A specifies what condition the test should accept 255 (*) For comparisons, A specifies what condition the test should accept
256 (true or false). 256 (true or false).
257 257
258 (*) All `skips' (pc++) assume that next instruction is a jump. 258 (*) All 'skips' (pc++) assume that next instruction is a jump.
259 259
260===========================================================================*/ 260===========================================================================*/
261 261