aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2016-05-23 00:38:18 +0200
committerMike Pall <mike>2016-05-23 00:38:18 +0200
commit8f868a9d02340bae8b3b4a703118b324213f5c6d (patch)
treeadd589e85e49654aa1ed4d5df4e01668e2e964d8
parentf26679c7195e99b32f95ea9f25b47b9981e15d3d (diff)
downloadluajit-8f868a9d02340bae8b3b4a703118b324213f5c6d.tar.gz
luajit-8f868a9d02340bae8b3b4a703118b324213f5c6d.tar.bz2
luajit-8f868a9d02340bae8b3b4a703118b324213f5c6d.zip
LJ_GC64: Update IR type sizes.
Contributed by Peter Cawley.
-rw-r--r--src/lj_ir.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lj_ir.h b/src/lj_ir.h
index 8b2fe638..3de57046 100644
--- a/src/lj_ir.h
+++ b/src/lj_ir.h
@@ -294,7 +294,9 @@ LJ_DATA const uint8_t lj_ir_mode[IR__MAX+1];
294 294
295/* -- IR instruction types ------------------------------------------------ */ 295/* -- IR instruction types ------------------------------------------------ */
296 296
297/* Map of itypes to non-negative numbers. ORDER LJ_T. 297#define IRTSIZE_PGC (LJ_GC64 ? 8 : 4)
298
299/* Map of itypes to non-negative numbers and their sizes. ORDER LJ_T.
298** LJ_TUPVAL/LJ_TTRACE never appear in a TValue. Use these itypes for 300** LJ_TUPVAL/LJ_TTRACE never appear in a TValue. Use these itypes for
299** IRT_P32 and IRT_P64, which never escape the IR. 301** IRT_P32 and IRT_P64, which never escape the IR.
300** The various integers are only used in the IR and can only escape to 302** The various integers are only used in the IR and can only escape to
@@ -302,12 +304,13 @@ LJ_DATA const uint8_t lj_ir_mode[IR__MAX+1];
302** contiguous and next to IRT_NUM (see the typerange macros below). 304** contiguous and next to IRT_NUM (see the typerange macros below).
303*/ 305*/
304#define IRTDEF(_) \ 306#define IRTDEF(_) \
305 _(NIL, 4) _(FALSE, 4) _(TRUE, 4) _(LIGHTUD, LJ_64 ? 8 : 4) _(STR, 4) \ 307 _(NIL, 4) _(FALSE, 4) _(TRUE, 4) _(LIGHTUD, LJ_64 ? 8 : 4) \
306 _(P32, 4) _(THREAD, 4) _(PROTO, 4) _(FUNC, 4) _(P64, 8) _(CDATA, 4) \ 308 _(STR, IRTSIZE_PGC) _(P32, 4) _(THREAD, IRTSIZE_PGC) _(PROTO, IRTSIZE_PGC) \
307 _(TAB, 4) _(UDATA, 4) \ 309 _(FUNC, IRTSIZE_PGC) _(P64, 8) _(CDATA, IRTSIZE_PGC) _(TAB, IRTSIZE_PGC) \
310 _(UDATA, IRTSIZE_PGC) \
308 _(FLOAT, 4) _(NUM, 8) _(I8, 1) _(U8, 1) _(I16, 2) _(U16, 2) \ 311 _(FLOAT, 4) _(NUM, 8) _(I8, 1) _(U8, 1) _(I16, 2) _(U16, 2) \
309 _(INT, 4) _(U32, 4) _(I64, 8) _(U64, 8) \ 312 _(INT, 4) _(U32, 4) _(I64, 8) _(U64, 8) \
310 _(SOFTFP, 4) /* There is room for 9 more types. */ 313 _(SOFTFP, 4) /* There is room for 8 more types. */
311 314
312/* IR result type and flags (8 bit). */ 315/* IR result type and flags (8 bit). */
313typedef enum { 316typedef enum {