diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-24 11:30:46 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-24 11:30:46 -0300 |
| commit | 31925e4cc20018b2cf46664febd6347ce4a4b766 (patch) | |
| tree | 159667853fbe827acdce92923fa34d401b1a89ec /lopcodes.h | |
| parent | 59c88f846d1dcd901a4420651aedf27816618923 (diff) | |
| download | lua-31925e4cc20018b2cf46664febd6347ce4a4b766.tar.gz lua-31925e4cc20018b2cf46664febd6347ce4a4b766.tar.bz2 lua-31925e4cc20018b2cf46664febd6347ce4a4b766.zip | |
Details
Added documentation and asserts that constants for arithmetic opcodes
must be numbers.
Diffstat (limited to 'lopcodes.h')
| -rw-r--r-- | lopcodes.h | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -225,13 +225,13 @@ OP_SELF,/* A B C R[A+1] := R[B]; R[A] := R[B][RK(C):string] */ | |||
| 225 | 225 | ||
| 226 | OP_ADDI,/* A B sC R[A] := R[B] + sC */ | 226 | OP_ADDI,/* A B sC R[A] := R[B] + sC */ |
| 227 | 227 | ||
| 228 | OP_ADDK,/* A B C R[A] := R[B] + K[C] */ | 228 | OP_ADDK,/* A B C R[A] := R[B] + K[C]:number */ |
| 229 | OP_SUBK,/* A B C R[A] := R[B] - K[C] */ | 229 | OP_SUBK,/* A B C R[A] := R[B] - K[C]:number */ |
| 230 | OP_MULK,/* A B C R[A] := R[B] * K[C] */ | 230 | OP_MULK,/* A B C R[A] := R[B] * K[C]:number */ |
| 231 | OP_MODK,/* A B C R[A] := R[B] % K[C] */ | 231 | OP_MODK,/* A B C R[A] := R[B] % K[C]:number */ |
| 232 | OP_POWK,/* A B C R[A] := R[B] ^ K[C] */ | 232 | OP_POWK,/* A B C R[A] := R[B] ^ K[C]:number */ |
| 233 | OP_DIVK,/* A B C R[A] := R[B] / K[C] */ | 233 | OP_DIVK,/* A B C R[A] := R[B] / K[C]:number */ |
| 234 | OP_IDIVK,/* A B C R[A] := R[B] // K[C] */ | 234 | OP_IDIVK,/* A B C R[A] := R[B] // K[C]:number */ |
| 235 | 235 | ||
| 236 | OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */ | 236 | OP_BANDK,/* A B C R[A] := R[B] & K[C]:integer */ |
| 237 | OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */ | 237 | OP_BORK,/* A B C R[A] := R[B] | K[C]:integer */ |
