summaryrefslogtreecommitdiff
path: root/src/lj_ir.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-12-31 01:00:54 +0100
committerMike Pall <mike>2010-12-31 01:00:54 +0100
commit65b194a2f89eb315029724af56354bb527021192 (patch)
treed932b57effed9283029f49f8ec82b3182d615cc0 /src/lj_ir.h
parentdc4b82c33d04930bbc2e54673ebea41ffa3368fc (diff)
downloadluajit2-65b194a2f89eb315029724af56354bb527021192.tar.gz
Copy destination type for CONV from ir->t to op2, too.
Diffstat (limited to 'src/lj_ir.h')
-rw-r--r--src/lj_ir.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lj_ir.h b/src/lj_ir.h
index 75635f93..a6d36283 100644
--- a/src/lj_ir.h
+++ b/src/lj_ir.h
@@ -219,11 +219,13 @@ IRFLDEF(FLENUM)
#define IRTOINT_TRUNCI64 5 /* Truncate number to int64_t. */
#define IRTOINT_TOBIT 6 /* Cache only: TOBIT conversion. */
-/* CONV mode, stored in op2. Lowest 8 bits is the IRType of the source. */
-#define IRCONV_TRUNC 0x100 /* Truncate number to integer. */
-#define IRCONV_SEXT 0x200 /* Sign-extend integer to integer. */
-#define IRCONV_MODEMASK 0x3ff
-#define IRCONV_CSH 10
+/* CONV mode, stored in op2. */
+#define IRCONV_SRCMASK 0x001f /* Source IRType. */
+#define IRCONV_DSTMASK 0x03e0 /* Dest. IRType (also in ir->t). */
+#define IRCONV_TRUNC 0x0400 /* Truncate number to integer. */
+#define IRCONV_SEXT 0x0800 /* Sign-extend integer to integer. */
+#define IRCONV_MODEMASK 0x0fff
+#define IRCONV_CSH 12
/* Number to integer conversion mode. Ordered by strength of the checks. */
#define IRCONV_TOBIT (0<<IRCONV_CSH) /* None. Cache only: TOBIT conv. */
#define IRCONV_ANY (1<<IRCONV_CSH) /* Any FP number is ok. */