mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 13:33:26 +00:00
FFI: Add pre-declared int128_t, uint128_t, __int128 types.
Note: Only declaration and copy (interpreted only) are implemented.
This commit is contained in:
parent
b1179ea5f7
commit
54dc2fa5d7
@ -33,10 +33,12 @@
|
|||||||
_("int16_t", INT16) \
|
_("int16_t", INT16) \
|
||||||
_("int32_t", INT32) \
|
_("int32_t", INT32) \
|
||||||
_("int64_t", INT64) \
|
_("int64_t", INT64) \
|
||||||
|
_("int128_t", INT128) \
|
||||||
_("uint8_t", UINT8) \
|
_("uint8_t", UINT8) \
|
||||||
_("uint16_t", UINT16) \
|
_("uint16_t", UINT16) \
|
||||||
_("uint32_t", UINT32) \
|
_("uint32_t", UINT32) \
|
||||||
_("uint64_t", UINT64) \
|
_("uint64_t", UINT64) \
|
||||||
|
_("uint128_t", UINT128) \
|
||||||
_("intptr_t", INT_PSZ) \
|
_("intptr_t", INT_PSZ) \
|
||||||
_("uintptr_t", UINT_PSZ) \
|
_("uintptr_t", UINT_PSZ) \
|
||||||
/* From POSIX. */ \
|
/* From POSIX. */ \
|
||||||
@ -55,6 +57,7 @@
|
|||||||
_("__int16", 2, CTOK_INT) \
|
_("__int16", 2, CTOK_INT) \
|
||||||
_("__int32", 4, CTOK_INT) \
|
_("__int32", 4, CTOK_INT) \
|
||||||
_("__int64", 8, CTOK_INT) \
|
_("__int64", 8, CTOK_INT) \
|
||||||
|
_("__int128", 16, CTOK_INT) \
|
||||||
_("float", 4, CTOK_FP) \
|
_("float", 4, CTOK_FP) \
|
||||||
_("double", 8, CTOK_FP) \
|
_("double", 8, CTOK_FP) \
|
||||||
_("long", 0, CTOK_LONG) \
|
_("long", 0, CTOK_LONG) \
|
||||||
|
@ -292,6 +292,8 @@ typedef struct CTState {
|
|||||||
_(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \
|
_(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \
|
||||||
_(INT64, 8, CT_NUM, CTF_LONG_IF8|CTALIGN(3)) \
|
_(INT64, 8, CT_NUM, CTF_LONG_IF8|CTALIGN(3)) \
|
||||||
_(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG_IF8|CTALIGN(3)) \
|
_(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG_IF8|CTALIGN(3)) \
|
||||||
|
_(INT128, 16, CT_NUM, CTALIGN(4)) \
|
||||||
|
_(UINT128, 16, CT_NUM, CTF_UNSIGNED|CTALIGN(4)) \
|
||||||
_(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \
|
_(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \
|
||||||
_(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \
|
_(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \
|
||||||
_(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \
|
_(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \
|
||||||
|
Loading…
Reference in New Issue
Block a user