1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <stdint.h> #include "platform.h" #include "primitives.h" struct uint128 softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 ) { struct uint128 z; z.v0 = a0 + b0; z.v64 = a64 + b64; z.v64 += ( z.v0 < a0 ); return z; }