sbcl.sbcl/tests/alien-128.c
Stas Boukarev f5914ba427 x86-64: fix int128 FFI
A FIXME was hanging around there only since 2007.

Tests provided by Andreas Franke.
2026-03-03 05:50:23 +03:00

8 lines
295 B
C

#include <stdint.h>
uint64_t uint128_low_64(unsigned __int128 x) { return (uint64_t)x; }
uint64_t uint128_high_64(unsigned __int128 x) { return (uint64_t)(x >> 64); }
uint64_t int128_low_64( __int128 x) { return (uint64_t)x; }
int64_t int128_high_64(__int128 x) { return (int64_t)(x >> 64); }