summaryrefslogtreecommitdiffstats
path: root/tests/017/variadic.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-19 04:13:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-19 04:13:35 -0700
commit100453d6f78a232b6666c93c6abd9e55a531d953 (patch)
tree143f0a416326fe569dce3267a2a753d953dafc2c /tests/017/variadic.tl
parentec80c9c4c2a54bf21062a07281acefaf51688fb4 (diff)
downloadtxr-100453d6f78a232b6666c93c6abd9e55a531d953.tar.gz
txr-100453d6f78a232b6666c93c6abd9e55a531d953.tar.bz2
txr-100453d6f78a232b6666c93c6abd9e55a531d953.zip
ffi: support 64 bit bitfields.
* ffi.c (struct txr_ffi_type): Replace unsigned mask member with a union m which holds unsigned mask and 64-bit fmask (fat mask). (ffi_sbit_put, ffi_sbit_get, ffi_ubit_put, ffi_ubit_get): Refer to m.mask. (ffi_fat_sbit_put, ffi_fat_sbit_get, ffi_fat_ubit_put, ffi_fat_ubit_get): New static functions. (ffi_generic_fat_sbit_put, ffi_generic_fat_sbit_get, ffi_generic_fat_ubit_put, ffi_generic_fat_ubit_get): Likewise. (make_ffi_type_struct, make_ffi_type_union): Set up fat mask for bitfields that are wider than int. (ffi_type_compile): Refer to m.mask for the int and unsigned int based bitfields declared with sbit and ubit that don't mention a type. The bit operator now allows int64 and uint64 to be valid types for a bitfield. In this case, the "fat" get and put functions are selected which use 64 bit operations. Thus there is no efficiency impact on non-fat bitfields which continue to use code with 32 bit operands. (ffi_offsetof): Use the bitfield flag in the member's type structure to detect bitfields, rather than the mask.
Diffstat (limited to 'tests/017/variadic.tl')
0 files changed, 0 insertions, 0 deletions