diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-23 12:23:45 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-23 12:23:45 -0200 |
| commit | 84e32ad2ebd6bd160c1320456743a5b1d8f233e9 (patch) | |
| tree | c5a32eaf7577c99e7598e9de1385a6b53522f04b /lopcodes.c | |
| parent | 35296e1fde705b3ac8356a4f4ce426497cf7b64c (diff) | |
| download | lua-84e32ad2ebd6bd160c1320456743a5b1d8f233e9.tar.gz lua-84e32ad2ebd6bd160c1320456743a5b1d8f233e9.tar.bz2 lua-84e32ad2ebd6bd160c1320456743a5b1d8f233e9.zip | |
Added opcodes for arithmetic with K operands
Added opcodes for all seven arithmetic operators with K operands
(that is, operands that are numbers in the array of constants of
the function). They cover the cases of constant float operands
(e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g.,
'x % 10000').
Diffstat (limited to 'lopcodes.c')
| -rw-r--r-- | lopcodes.c | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -45,6 +45,13 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
| 45 | ,opmode(0, 0, 0, 1, iABC) /* OP_POWI */ | 45 | ,opmode(0, 0, 0, 1, iABC) /* OP_POWI */ |
| 46 | ,opmode(0, 0, 0, 1, iABC) /* OP_DIVI */ | 46 | ,opmode(0, 0, 0, 1, iABC) /* OP_DIVI */ |
| 47 | ,opmode(0, 0, 0, 1, iABC) /* OP_IDIVI */ | 47 | ,opmode(0, 0, 0, 1, iABC) /* OP_IDIVI */ |
| 48 | ,opmode(0, 0, 0, 1, iABC) /* OP_ADDK */ | ||
| 49 | ,opmode(0, 0, 0, 1, iABC) /* OP_SUBK */ | ||
| 50 | ,opmode(0, 0, 0, 1, iABC) /* OP_MULK */ | ||
| 51 | ,opmode(0, 0, 0, 1, iABC) /* OP_MODK */ | ||
| 52 | ,opmode(0, 0, 0, 1, iABC) /* OP_POWK */ | ||
| 53 | ,opmode(0, 0, 0, 1, iABC) /* OP_DIVK */ | ||
| 54 | ,opmode(0, 0, 0, 1, iABC) /* OP_IDIVK */ | ||
| 48 | ,opmode(0, 0, 0, 1, iABC) /* OP_BANDK */ | 55 | ,opmode(0, 0, 0, 1, iABC) /* OP_BANDK */ |
| 49 | ,opmode(0, 0, 0, 1, iABC) /* OP_BORK */ | 56 | ,opmode(0, 0, 0, 1, iABC) /* OP_BORK */ |
| 50 | ,opmode(0, 0, 0, 1, iABC) /* OP_BXORK */ | 57 | ,opmode(0, 0, 0, 1, iABC) /* OP_BXORK */ |
