aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_ir.h')
-rw-r--r--src/lj_ir.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_ir.h b/src/lj_ir.h
index bdedaddd..8154949c 100644
--- a/src/lj_ir.h
+++ b/src/lj_ir.h
@@ -118,6 +118,7 @@
118 _(OBAR, S , ref, ref) \ 118 _(OBAR, S , ref, ref) \
119 \ 119 \
120 /* Type conversions. */ \ 120 /* Type conversions. */ \
121 _(CONV, N , ref, lit) \
121 _(TONUM, N , ref, ___) \ 122 _(TONUM, N , ref, ___) \
122 _(TOINT, N , ref, lit) \ 123 _(TOINT, N , ref, lit) \
123 _(TOBIT, N , ref, ref) \ 124 _(TOBIT, N , ref, ref) \
@@ -218,6 +219,16 @@ IRFLDEF(FLENUM)
218#define IRTOINT_TRUNCI64 5 /* Truncate number to int64_t. */ 219#define IRTOINT_TRUNCI64 5 /* Truncate number to int64_t. */
219#define IRTOINT_TOBIT 6 /* Cache only: TOBIT conversion. */ 220#define IRTOINT_TOBIT 6 /* Cache only: TOBIT conversion. */
220 221
222/* CONV mode, stored in op2. Lowest 8 bits is the IRType of the source. */
223#define IRCONV_TRUNC 0x100 /* Truncate number to integer. */
224#define IRCONV_SEXT 0x200 /* Sign-extend integer to integer. */
225#define IRCONV_CSH 10
226/* Number to integer conversion mode. Ordered by strength of the checks. */
227#define IRCONV_TOBIT (0<<IRCONV_CSH) /* None. Cache only: TOBIT conv. */
228#define IRCONV_ANY (1<<IRCONV_CSH) /* Any FP number is ok. */
229#define IRCONV_INDEX (2<<IRCONV_CSH) /* Check + special backprop rules. */
230#define IRCONV_CHECK (3<<IRCONV_CSH) /* Number checked for integerness. */
231
221/* C call info for CALL* instructions. */ 232/* C call info for CALL* instructions. */
222typedef struct CCallInfo { 233typedef struct CCallInfo {
223 ASMFunction func; /* Function pointer. */ 234 ASMFunction func; /* Function pointer. */