aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_add128.c
blob: 59c0348f54157f78cd9425819247db2d553c790d (plain)
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;

}