summaryrefslogtreecommitdiffstats
path: root/rand.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-05 06:06:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-05 06:06:49 -0700
commite539fbc2af3bd4a5bd4ca3d9b567862005509aa1 (patch)
treee37c06a1a2aba1ec9b2d5b1b4dffd9cc74550dda /rand.c
parentedbf1a07fcbc1631e040fbaca6e0ab4cd460259a (diff)
downloadtxr-e539fbc2af3bd4a5bd4ca3d9b567862005509aa1.tar.gz
txr-e539fbc2af3bd4a5bd4ca3d9b567862005509aa1.tar.bz2
txr-e539fbc2af3bd4a5bd4ca3d9b567862005509aa1.zip
ffi: handle misaligned access for arith types.
The align feature won't work properly on some machines, since the underlying get and put routines don't handle misaligned access. We address that here. * ffi.c (align_sw_get, align_sw_end, align_sw_put_end, align_sw_put): New macros. (ffi_i16_put, ffi_i16_get, ffi_u16_put, ffi_u16_get, ffi_i32_put, ffi_i32_get, ffi_u32_put, ffi_u32_get, ffi_i64_put, ffi_i64_get, ffi_u64_put, ffi_u64_get, ffi_short_put, ffi_short_get, ffi_ushort_put, ffi_ushort_get, ffi_int_get, ffi_uint_put, ffi_uint_get, ffi_long_put, ffi_long_get, ffi_ulong_put, ffi_ulong_get, ffi_float_put, ffi_float_get, ffi_double_put, ffi_double_get, ffi_val_put, ffi_val_get, ffi_wchar_put, ffi_wchar_get, ffi_sbit_put, ffi_sbit_get, ffi_ubit_put, ffi_ubit_get): Insert macros to redirect the transfer to a temporary aligned buffer if the pointer is misaligned.
Diffstat (limited to 'rand.c')
0 files changed, 0 insertions, 0 deletions