summaryrefslogtreecommitdiffstats
path: root/mpi
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-01-23 20:19:51 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-01-23 20:19:51 -0800
commit90e81a3acfd68e166c313656c98a24dd9aa4d18e (patch)
treee45a61cce808a4c70eb49e20d7d597c66fb52da2 /mpi
parentb333ea2900a2e7c10d7b5cd35bf250c8e2d8d40f (diff)
downloadtxr-90e81a3acfd68e166c313656c98a24dd9aa4d18e.tar.gz
txr-90e81a3acfd68e166c313656c98a24dd9aa4d18e.tar.bz2
txr-90e81a3acfd68e166c313656c98a24dd9aa4d18e.zip
ffi: almost bug: 64 bit signed big/little endian type.
* ffi.c (ffi_be_i64_get, ffi_le_i64_get): The code here for 32 bit platforms is fishy: it is using the signed cnum type for the low 32 bits, when that should be ucnum. We are actually okay because ths code would only be executed on a platform where cnum is 32 bits. We are saved by the fact that we are doing left shifts (no sign extension), that shifting a 1 into a sign bit is harmless on two's complement machines, and that the lo32 value is ultimately passed to unum whereby it is coerced to a ucnum argument type (which preserves the bit representation) and prevents logior from seeing a negative value.
Diffstat (limited to 'mpi')
0 files changed, 0 insertions, 0 deletions