diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-21 12:49:32 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-21 12:49:32 -0300 |
| commit | 212095a601ee68e99065b553f7b6bc216056d82e (patch) | |
| tree | 3843f9dde40eeb71c56ac8a0be8d77c78272f6ef /lopcodes.h | |
| parent | c67603fafba7f982e92eb870ff4da6c6433c2a85 (diff) | |
| download | lua-212095a601ee68e99065b553f7b6bc216056d82e.tar.gz lua-212095a601ee68e99065b553f7b6bc216056d82e.tar.bz2 lua-212095a601ee68e99065b553f7b6bc216056d82e.zip | |
new opcodes OP_GTI/OP_GEI
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 9 |
1 files changed, 3 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lopcodes.h,v 1.187 2018/02/09 15:16:06 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.188 2018/02/15 15:34:29 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 | */ |
| @@ -260,6 +260,8 @@ OP_EQK,/* A B if ((R(A) == K(B)) ~= k) then pc++ */ | |||
| 260 | OP_EQI,/* A sB if ((R(A) == sB) ~= k) then pc++ */ | 260 | OP_EQI,/* A sB if ((R(A) == sB) ~= k) then pc++ */ |
| 261 | OP_LTI,/* A sB if ((R(A) < sB) ~= k) then pc++ */ | 261 | OP_LTI,/* A sB if ((R(A) < sB) ~= k) then pc++ */ |
| 262 | OP_LEI,/* A sB if ((R(A) <= sB) ~= k) then pc++ */ | 262 | OP_LEI,/* A sB if ((R(A) <= sB) ~= k) then pc++ */ |
| 263 | OP_GTI,/* A sB if ((R(A) > sB) ~= k) then pc++ */ | ||
| 264 | OP_GEI,/* A sB if ((R(A) >= sB) ~= k) then pc++ */ | ||
| 263 | 265 | ||
| 264 | OP_TEST,/* A if (not R(A) == k) then pc++ */ | 266 | OP_TEST,/* A if (not R(A) == k) then pc++ */ |
| 265 | OP_TESTSET,/* A B if (not R(B) == k) then R(A) := R(B) else pc++ */ | 267 | OP_TESTSET,/* A B if (not R(B) == k) then R(A) := R(B) else pc++ */ |
| @@ -317,11 +319,6 @@ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | |||
| 317 | (*) For comparisons, k specifies what condition the test should accept | 319 | (*) For comparisons, k specifies what condition the test should accept |
| 318 | (true or false). | 320 | (true or false). |
| 319 | 321 | ||
| 320 | (*) For OP_LTI/OP_LEI, C indicates that the transformations | ||
| 321 | (A<B) => (!(B<=A)) or (A<=B) => (!(B<A)) were used to put the constant | ||
| 322 | operator on the right side. (Non-total orders with NaN or metamethods | ||
| 323 | use this indication to correct their behavior.) | ||
| 324 | |||
| 325 | (*) All 'skips' (pc++) assume that next instruction is a jump. | 322 | (*) All 'skips' (pc++) assume that next instruction is a jump. |
| 326 | 323 | ||
| 327 | (*) In instructions OP_RETURN/OP_TAILCALL, 'k' specifies that the | 324 | (*) In instructions OP_RETURN/OP_TAILCALL, 'k' specifies that the |
