aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2025-03-09 15:37:35 +0100
committerMike Pall <mike>2025-03-09 15:37:35 +0100
commit54dc2fa5d77ec35df302dc9bedc6ad7b0b4eae25 (patch)
tree65e479af67eaed12f9686d4f10b781bc7ed7f54b
parentb1179ea5f708c62aacc60235d28230112f419a69 (diff)
downloadluajit-54dc2fa5d77ec35df302dc9bedc6ad7b0b4eae25.tar.gz
luajit-54dc2fa5d77ec35df302dc9bedc6ad7b0b4eae25.tar.bz2
luajit-54dc2fa5d77ec35df302dc9bedc6ad7b0b4eae25.zip
FFI: Add pre-declared int128_t, uint128_t, __int128 types.
Note: Only declaration and copy (interpreted only) are implemented.
-rw-r--r--src/lj_ctype.c3
-rw-r--r--src/lj_ctype.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/lj_ctype.c b/src/lj_ctype.c
index 19eecd64..b69815fe 100644
--- a/src/lj_ctype.c
+++ b/src/lj_ctype.c
@@ -33,10 +33,12 @@
33 _("int16_t", INT16) \ 33 _("int16_t", INT16) \
34 _("int32_t", INT32) \ 34 _("int32_t", INT32) \
35 _("int64_t", INT64) \ 35 _("int64_t", INT64) \
36 _("int128_t", INT128) \
36 _("uint8_t", UINT8) \ 37 _("uint8_t", UINT8) \
37 _("uint16_t", UINT16) \ 38 _("uint16_t", UINT16) \
38 _("uint32_t", UINT32) \ 39 _("uint32_t", UINT32) \
39 _("uint64_t", UINT64) \ 40 _("uint64_t", UINT64) \
41 _("uint128_t", UINT128) \
40 _("intptr_t", INT_PSZ) \ 42 _("intptr_t", INT_PSZ) \
41 _("uintptr_t", UINT_PSZ) \ 43 _("uintptr_t", UINT_PSZ) \
42 /* From POSIX. */ \ 44 /* From POSIX. */ \
@@ -55,6 +57,7 @@
55 _("__int16", 2, CTOK_INT) \ 57 _("__int16", 2, CTOK_INT) \
56 _("__int32", 4, CTOK_INT) \ 58 _("__int32", 4, CTOK_INT) \
57 _("__int64", 8, CTOK_INT) \ 59 _("__int64", 8, CTOK_INT) \
60 _("__int128", 16, CTOK_INT) \
58 _("float", 4, CTOK_FP) \ 61 _("float", 4, CTOK_FP) \
59 _("double", 8, CTOK_FP) \ 62 _("double", 8, CTOK_FP) \
60 _("long", 0, CTOK_LONG) \ 63 _("long", 0, CTOK_LONG) \
diff --git a/src/lj_ctype.h b/src/lj_ctype.h
index 8b7160dd..18db2996 100644
--- a/src/lj_ctype.h
+++ b/src/lj_ctype.h
@@ -292,6 +292,8 @@ typedef struct CTState {
292 _(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \ 292 _(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \
293 _(INT64, 8, CT_NUM, CTF_LONG_IF8|CTALIGN(3)) \ 293 _(INT64, 8, CT_NUM, CTF_LONG_IF8|CTALIGN(3)) \
294 _(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG_IF8|CTALIGN(3)) \ 294 _(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG_IF8|CTALIGN(3)) \
295 _(INT128, 16, CT_NUM, CTALIGN(4)) \
296 _(UINT128, 16, CT_NUM, CTF_UNSIGNED|CTALIGN(4)) \
295 _(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \ 297 _(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \
296 _(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \ 298 _(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \
297 _(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \ 299 _(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \