Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
cairo-wideint.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _cairo_uint64
struct  _cairo_uquorem64
struct  _cairo_quorem64
struct  cairo_uint128
struct  _cairo_uquorem128
struct  _cairo_quorem128

Defines

#define I   cairo_private
#define _cairo_uint64_to_uint32(a)   ((a).lo)
#define _cairo_uint64_negative(a)   (((int32_t) ((a).hi)) < 0)
#define _cairo_uint64_to_int64(i)   (i)
#define _cairo_int64_to_uint64(i)   (i)
#define _cairo_int64_to_int32(a)   ((int32_t) _cairo_uint64_to_uint32(a))
#define _cairo_int64_add(a, b)   _cairo_uint64_add (a,b)
#define _cairo_int64_sub(a, b)   _cairo_uint64_sub (a,b)
#define _cairo_int64_mul(a, b)   _cairo_uint64_mul (a,b)
#define _cairo_int64_eq(a, b)   _cairo_uint64_eq (a,b)
#define _cairo_int64_lsl(a, b)   _cairo_uint64_lsl (a,b)
#define _cairo_int64_rsl(a, b)   _cairo_uint64_rsl (a,b)
#define _cairo_int64_rsa(a, b)   _cairo_uint64_rsa (a,b)
#define _cairo_int64_negate(a)   _cairo_uint64_negate(a)
#define _cairo_int64_negative(a)   (((int32_t) ((a).hi)) < 0)
#define _cairo_int64_not(a)   _cairo_uint64_not(a)
#define _cairo_uint64_le(a, b)   (!_cairo_uint64_gt(a,b))
#define _cairo_uint64_ne(a, b)   (!_cairo_uint64_eq(a,b))
#define _cairo_uint64_ge(a, b)   (!_cairo_uint64_lt(a,b))
#define _cairo_uint64_gt(a, b)   _cairo_uint64_lt(b,a)
#define _cairo_int64_le(a, b)   (!_cairo_int64_gt(a,b))
#define _cairo_int64_ne(a, b)   (!_cairo_int64_eq(a,b))
#define _cairo_int64_ge(a, b)   (!_cairo_int64_lt(a,b))
#define _cairo_int64_gt(a, b)   _cairo_int64_lt(b,a)
#define _cairo_uint128_to_uint64(a)   ((a).lo)
#define _cairo_uint128_to_uint32(a)   _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a))
#define _cairo_uint128_negative(a)   (_cairo_uint64_negative(a.hi))
#define _cairo_uint128_to_int128_(i)   (i)
#define _cairo_int128_to_uint128(i)   (i)
#define _cairo_int128_to_int64(a)   ((cairo_int64_t) (a).lo)
#define _cairo_int128_to_int32(a)   _cairo_int64_to_int32(_cairo_int128_to_int64(a))
#define _cairo_int128_add(a, b)   _cairo_uint128_add(a,b)
#define _cairo_int128_sub(a, b)   _cairo_uint128_sub(a,b)
#define _cairo_int128_mul(a, b)   _cairo_uint128_mul(a,b)
#define _cairo_int128_lsl(a, b)   _cairo_uint128_lsl(a,b)
#define _cairo_int128_rsl(a, b)   _cairo_uint128_rsl(a,b)
#define _cairo_int128_rsa(a, b)   _cairo_uint128_rsa(a,b)
#define _cairo_int128_eq(a, b)   _cairo_uint128_eq (a,b)
#define _cairo_int128_negate(a)   _cairo_uint128_negate(a)
#define _cairo_int128_negative(a)   (_cairo_uint128_negative(a))
#define _cairo_int128_not(a)   _cairo_uint128_not(a)
#define _cairo_uint128_le(a, b)   (!_cairo_uint128_gt(a,b))
#define _cairo_uint128_ne(a, b)   (!_cairo_uint128_eq(a,b))
#define _cairo_uint128_ge(a, b)   (!_cairo_uint128_lt(a,b))
#define _cairo_uint128_gt(a, b)   _cairo_uint128_lt(b,a)
#define _cairo_int128_le(a, b)   (!_cairo_int128_gt(a,b))
#define _cairo_int128_ne(a, b)   (!_cairo_int128_eq(a,b))
#define _cairo_int128_ge(a, b)   (!_cairo_int128_lt(a,b))
#define _cairo_int128_gt(a, b)   _cairo_int128_lt(b,a)

Typedefs

typedef struct _cairo_uint64 cairo_uint64_t
typedef struct _cairo_uint64 cairo_int64_t
typedef struct _cairo_uquorem64 cairo_uquorem64_t
typedef struct _cairo_quorem64 cairo_quorem64_t
typedef struct cairo_uint128 cairo_uint128_t
typedef struct cairo_uint128 cairo_int128_t
typedef struct _cairo_uquorem128 cairo_uquorem128_t
typedef struct _cairo_quorem128 cairo_quorem128_t

Functions

cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i)
cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b)
cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b)
cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b)
cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b)
cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift)
cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift)
cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift)
int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b)
int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b)
cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a)
cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a)
cairo_int64_t I _cairo_int32_to_int64 (int32_t i)
cairo_int64_t I _cairo_int32x32_64_mul (int32_t a, int32_t b)
int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b)
cairo_uquorem64_t I _cairo_uint64_divrem (cairo_uint64_t num, cairo_uint64_t den)
cairo_quorem64_t I _cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den)
cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i)
cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i)
cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b)
cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift)
cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift)
cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift)
int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b)
int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a)
cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a)
cairo_int128_t I _cairo_int32_to_int128 (int32_t i)
cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i)
cairo_int128_t I _cairo_int64x64_128_mul (cairo_int64_t a, cairo_int64_t b)
int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b)
cairo_uquorem128_t I _cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den)
cairo_quorem128_t I _cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den)

Class Documentation

struct _cairo_uint64

Definition at line 73 of file cairo-wideint.h.

Class Members
uint32_t hi
uint32_t lo
struct _cairo_uquorem64

Definition at line 168 of file cairo-wideint.h.

Collaboration diagram for _cairo_uquorem64:
Class Members
cairo_uint64_t quo
cairo_uint64_t rem
struct _cairo_quorem64

Definition at line 173 of file cairo-wideint.h.

Collaboration diagram for _cairo_quorem64:
Class Members
cairo_int64_t quo
cairo_int64_t rem
struct cairo_uint128

Definition at line 192 of file cairo-wideint.h.

Collaboration diagram for cairo_uint128:
Class Members
cairo_uint64_t hi
cairo_uint64_t lo
struct _cairo_uquorem128

Definition at line 277 of file cairo-wideint.h.

Collaboration diagram for _cairo_uquorem128:
Class Members
cairo_uint128_t quo
cairo_uint128_t rem
struct _cairo_quorem128

Definition at line 282 of file cairo-wideint.h.

Collaboration diagram for _cairo_quorem128:
Class Members
cairo_int128_t quo
cairo_int128_t rem

Define Documentation

Definition at line 220 of file cairo-wideint.h.

#define _cairo_int128_eq (   a,
  b 
)    _cairo_uint128_eq (a,b)

Definition at line 228 of file cairo-wideint.h.

#define _cairo_int128_ge (   a,
  b 
)    (!_cairo_int128_lt(a,b))

Definition at line 300 of file cairo-wideint.h.

#define _cairo_int128_gt (   a,
  b 
)    _cairo_int128_lt(b,a)

Definition at line 301 of file cairo-wideint.h.

#define _cairo_int128_le (   a,
  b 
)    (!_cairo_int128_gt(a,b))

Definition at line 298 of file cairo-wideint.h.

Definition at line 224 of file cairo-wideint.h.

Definition at line 222 of file cairo-wideint.h.

#define _cairo_int128_ne (   a,
  b 
)    (!_cairo_int128_eq(a,b))

Definition at line 299 of file cairo-wideint.h.

Definition at line 229 of file cairo-wideint.h.

Definition at line 230 of file cairo-wideint.h.

Definition at line 231 of file cairo-wideint.h.

Definition at line 226 of file cairo-wideint.h.

Definition at line 225 of file cairo-wideint.h.

Definition at line 221 of file cairo-wideint.h.

Definition at line 219 of file cairo-wideint.h.

Definition at line 218 of file cairo-wideint.h.

Definition at line 214 of file cairo-wideint.h.

#define _cairo_int64_add (   a,
  b 
)    _cairo_uint64_add (a,b)

Definition at line 97 of file cairo-wideint.h.

#define _cairo_int64_eq (   a,
  b 
)    _cairo_uint64_eq (a,b)

Definition at line 102 of file cairo-wideint.h.

#define _cairo_int64_ge (   a,
  b 
)    (!_cairo_int64_lt(a,b))

Definition at line 160 of file cairo-wideint.h.

#define _cairo_int64_gt (   a,
  b 
)    _cairo_int64_lt(b,a)

Definition at line 161 of file cairo-wideint.h.

#define _cairo_int64_le (   a,
  b 
)    (!_cairo_int64_gt(a,b))

Definition at line 158 of file cairo-wideint.h.

#define _cairo_int64_lsl (   a,
  b 
)    _cairo_uint64_lsl (a,b)

Definition at line 103 of file cairo-wideint.h.

#define _cairo_int64_mul (   a,
  b 
)    _cairo_uint64_mul (a,b)

Definition at line 99 of file cairo-wideint.h.

#define _cairo_int64_ne (   a,
  b 
)    (!_cairo_int64_eq(a,b))

Definition at line 159 of file cairo-wideint.h.

Definition at line 106 of file cairo-wideint.h.

#define _cairo_int64_negative (   a)    (((int32_t) ((a).hi)) < 0)

Definition at line 107 of file cairo-wideint.h.

Definition at line 108 of file cairo-wideint.h.

#define _cairo_int64_rsa (   a,
  b 
)    _cairo_uint64_rsa (a,b)

Definition at line 105 of file cairo-wideint.h.

#define _cairo_int64_rsl (   a,
  b 
)    _cairo_uint64_rsl (a,b)

Definition at line 104 of file cairo-wideint.h.

#define _cairo_int64_sub (   a,
  b 
)    _cairo_uint64_sub (a,b)

Definition at line 98 of file cairo-wideint.h.

Definition at line 96 of file cairo-wideint.h.

#define _cairo_int64_to_uint64 (   i)    (i)

Definition at line 93 of file cairo-wideint.h.

#define _cairo_uint128_ge (   a,
  b 
)    (!_cairo_uint128_lt(a,b))

Definition at line 295 of file cairo-wideint.h.

Definition at line 296 of file cairo-wideint.h.

#define _cairo_uint128_le (   a,
  b 
)    (!_cairo_uint128_gt(a,b))

Definition at line 293 of file cairo-wideint.h.

#define _cairo_uint128_ne (   a,
  b 
)    (!_cairo_uint128_eq(a,b))

Definition at line 294 of file cairo-wideint.h.

Definition at line 210 of file cairo-wideint.h.

Definition at line 213 of file cairo-wideint.h.

Definition at line 199 of file cairo-wideint.h.

#define _cairo_uint128_to_uint64 (   a)    ((a).lo)

Definition at line 198 of file cairo-wideint.h.

#define _cairo_uint64_ge (   a,
  b 
)    (!_cairo_uint64_lt(a,b))

Definition at line 155 of file cairo-wideint.h.

#define _cairo_uint64_gt (   a,
  b 
)    _cairo_uint64_lt(b,a)

Definition at line 156 of file cairo-wideint.h.

#define _cairo_uint64_le (   a,
  b 
)    (!_cairo_uint64_gt(a,b))

Definition at line 153 of file cairo-wideint.h.

#define _cairo_uint64_ne (   a,
  b 
)    (!_cairo_uint64_eq(a,b))

Definition at line 154 of file cairo-wideint.h.

#define _cairo_uint64_negative (   a)    (((int32_t) ((a).hi)) < 0)

Definition at line 89 of file cairo-wideint.h.

#define _cairo_uint64_to_int64 (   i)    (i)

Definition at line 92 of file cairo-wideint.h.

#define _cairo_uint64_to_uint32 (   a)    ((a).lo)

Definition at line 78 of file cairo-wideint.h.

Definition at line 69 of file cairo-wideint.h.


Typedef Documentation

typedef struct cairo_uint128 cairo_int128_t
typedef struct _cairo_uint64 cairo_int64_t
typedef struct _cairo_uint64 cairo_uint64_t

Function Documentation

Definition at line 638 of file cairo-wideint.c.

{
    int                     num_neg = _cairo_int128_negative (num);
    int                     den_neg = _cairo_int128_negative (den);
    cairo_uquorem128_t      uqr;
    cairo_quorem128_t       qr;

    if (num_neg)
       num = _cairo_int128_negate (num);
    if (den_neg)
       den = _cairo_int128_negate (den);
    uqr = _cairo_uint128_divrem (num, den);
    if (num_neg)
       qr.rem = _cairo_int128_negate (uqr.rem);
    else
       qr.rem = uqr.rem;
    if (num_neg != den_neg)
       qr.quo = _cairo_int128_negate (uqr.quo);
    else
       qr.quo = uqr.quo;
    return qr;
}

Here is the call graph for this function:

Definition at line 564 of file cairo-wideint.c.

{
    if (_cairo_int128_negative (a) && !_cairo_int128_negative (b))
       return 1;
    if (!_cairo_int128_negative (a) && _cairo_int128_negative (b))
       return 0;
    return _cairo_uint128_lt (a, b);
}

Here is the call graph for this function:

Definition at line 344 of file cairo-wideint.c.

{
    cairo_int128_t   q;

    q.lo = _cairo_int32_to_int64 (i);
    q.hi = _cairo_int32_to_int64 (i < 0 ? -1 : 0);
    return q;
}

Here is the call graph for this function:

Definition at line 66 of file cairo-wideint.c.

{
    cairo_uint64_t   q;

    q.lo = i;
    q.hi = i < 0 ? -1 : 0;
    return q;
}

Here is the caller graph for this function:

Definition at line 142 of file cairo-wideint.c.

{
    cairo_int64_t s;
    s = _cairo_uint32x32_64_mul ((uint32_t) a, (uint32_t) b);
    if (a < 0)
       s.hi -= b;
    if (b < 0)
       s.hi -= a;
    return s;
}

Here is the call graph for this function:

Definition at line 296 of file cairo-wideint.c.

{
    int                     num_neg = _cairo_int64_negative (num);
    int                     den_neg = _cairo_int64_negative (den);
    cairo_uquorem64_t       uqr;
    cairo_quorem64_t qr;

    if (num_neg)
       num = _cairo_int64_negate (num);
    if (den_neg)
       den = _cairo_int64_negate (den);
    uqr = _cairo_uint64_divrem (num, den);
    if (num_neg)
       qr.rem = _cairo_int64_negate (uqr.rem);
    else
       qr.rem = uqr.rem;
    if (num_neg != den_neg)
       qr.quo = (cairo_int64_t) _cairo_int64_negate (uqr.quo);
    else
       qr.quo = (cairo_int64_t) uqr.quo;
    return qr;
}

Here is the call graph for this function:

Definition at line 230 of file cairo-wideint.c.

{
    if (_cairo_int64_negative (a) && !_cairo_int64_negative (b))
       return 1;
    if (!_cairo_int64_negative (a) && _cairo_int64_negative (b))
       return 0;
    return _cairo_uint64_lt (a, b);
}

Here is the call graph for this function:

Definition at line 364 of file cairo-wideint.c.

{
    cairo_int128_t   q;

    q.lo = i;
    q.hi = _cairo_int32_to_int64 (_cairo_int64_negative(i) ? -1 : 0);
    return q;
}

Here is the call graph for this function:

Definition at line 474 of file cairo-wideint.c.

Here is the call graph for this function:

Definition at line 374 of file cairo-wideint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 587 of file cairo-wideint.c.

{
    cairo_uquorem128_t      qr;
    cairo_uint128_t  bit;
    cairo_uint128_t  quo;
    
    bit = _cairo_uint32_to_uint128 (1);
    
    /* normalize to make den >= num, but not overflow */
    while (_cairo_uint128_lt (den, num) && !_cairo_msbset64(den.hi))
    {
       bit = _cairo_uint128_lsl (bit, 1);
       den = _cairo_uint128_lsl (den, 1);
    }
    quo = _cairo_uint32_to_uint128 (0);
    
    /* generate quotient, one bit at a time */
    while (_cairo_uint128_ne (bit, _cairo_uint32_to_uint128(0)))
    {
       if (_cairo_uint128_le (den, num))
       {
           num = _cairo_uint128_sub (num, den);
           quo = _cairo_uint128_add (quo, bit);
       }
       bit = _cairo_uint128_rsl (bit, 1);
       den = _cairo_uint128_rsl (den, 1);
    }
    qr.quo = quo;
    qr.rem = num;
    return qr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 574 of file cairo-wideint.c.

{
    return (_cairo_uint64_eq (a.hi, b.hi) &&
           _cairo_uint64_eq (a.lo, b.lo));
}

Here is the call graph for this function:

Definition at line 502 of file cairo-wideint.c.

{
    if (shift >= 64)
    {
       a.hi = a.lo;
       a.lo = _cairo_uint32_to_uint64 (0);
       shift -= 64;
    }
    if (shift)
    {
       a.hi = _cairo_uint64_add (_cairo_uint64_lsl (a.hi, shift),
                                _cairo_uint64_rsl (a.lo, (64 - shift)));
       a.lo = _cairo_uint64_lsl (a.lo, shift);
    }
    return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 556 of file cairo-wideint.c.

{
    return (_cairo_uint64_lt (a.hi, b.hi) ||
           (_cairo_uint64_eq (a.hi, b.hi) &&
            _cairo_uint64_lt (a.lo, b.lo)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 489 of file cairo-wideint.c.

Here is the call graph for this function:

Definition at line 538 of file cairo-wideint.c.

{
    if (shift >= 64)
    {
       a.lo = a.hi;
       a.hi = _cairo_uint64_rsa (a.hi, 64-1);
       shift -= 64;
    }
    if (shift)
    {
       a.lo = _cairo_uint64_add (_cairo_uint64_rsl (a.lo, shift),
                                _cairo_uint64_lsl (a.hi, (64 - shift)));
       a.hi = _cairo_uint64_rsa (a.hi, shift);
    }
    return a;
}

Here is the call graph for this function:

Definition at line 520 of file cairo-wideint.c.

{
    if (shift >= 64)
    {
       a.lo = a.hi;
       a.hi = _cairo_uint32_to_uint64 (0);
       shift -= 64;
    }
    if (shift)
    {
       a.lo = _cairo_uint64_add (_cairo_uint64_rsl (a.lo, shift),
                                _cairo_uint64_lsl (a.hi, (64 - shift)));
       a.hi = _cairo_uint64_rsl (a.hi, shift);
    }
    return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 386 of file cairo-wideint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 334 of file cairo-wideint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file cairo-wideint.c.

{
    cairo_uint64_t   q;

    q.lo = i;
    q.hi = 0;
    return q;
}

Here is the caller graph for this function:

Definition at line 114 of file cairo-wideint.c.

{
    cairo_uint64_t  s;
    
    uint16_t  ah, al, bh, bl;
    uint32_t  r0, r1, r2, r3;

    al = uint32_lo (a);
    ah = uint32_hi (a);
    bl = uint32_lo (b);
    bh = uint32_hi (b);

    r0 = (uint32_t) al * bl;
    r1 = (uint32_t) al * bh;
    r2 = (uint32_t) ah * bl;
    r3 = (uint32_t) ah * bh;

    r1 += uint32_hi(r0);    /* no carry possible */
    r1 += r2;            /* but this can carry */
    if (r1 < r2)         /* check */
       r3 += uint32_carry16;

    s.hi = r3 + uint32_hi(r1);
    s.lo = (uint32_lo (r1) << 16) + uint32_lo (r0);
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 86 of file cairo-wideint.c.

{
    cairo_uint64_t   s;

    s.hi = a.hi + b.hi;
    s.lo = a.lo + b.lo;
    if (s.lo < a.lo)
       s.hi++;
    return s;
}

Here is the caller graph for this function:

Definition at line 261 of file cairo-wideint.c.

{
    cairo_uquorem64_t       qr;
    cairo_uint64_t   bit;
    cairo_uint64_t   quo;
    
    bit = _cairo_uint32_to_uint64 (1);
    
    /* normalize to make den >= num, but not overflow */
    while (_cairo_uint64_lt (den, num) && (den.hi & 0x80000000) == 0)
    {
       bit = _cairo_uint64_lsl (bit, 1);
       den = _cairo_uint64_lsl (den, 1);
    }
    quo = _cairo_uint32_to_uint64 (0);
    
    /* generate quotient, one bit at a time */
    while (bit.hi | bit.lo)
    {
       if (_cairo_uint64_le (den, num))
       {
           num = _cairo_uint64_sub (num, den);
           quo = _cairo_uint64_add (quo, bit);
       }
       bit = _cairo_uint64_rsl (bit, 1);
       den = _cairo_uint64_rsl (den, 1);
    }
    qr.quo = quo;
    qr.rem = num;
    return qr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 224 of file cairo-wideint.c.

{
    return a.hi == b.hi && a.lo == b.lo;
}

Here is the caller graph for this function:

Definition at line 164 of file cairo-wideint.c.

{
    if (shift >= 32)
    {
       a.hi = a.lo;
       a.lo = 0;
       shift -= 32;
    }
    if (shift)
    {
       a.hi = a.hi << shift | a.lo >> (32 - shift);
       a.lo = a.lo << shift;
    }
    return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 217 of file cairo-wideint.c.

{
    return (a.hi < b.hi ||
           (a.hi == b.hi && a.lo < b.lo));
}

Here is the caller graph for this function:

Definition at line 154 of file cairo-wideint.c.

{
    cairo_uint64_t   s;
    
    s = _cairo_uint32x32_64_mul (a.lo, b.lo);
    s.hi += a.lo * b.hi + a.hi * b.lo;
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 248 of file cairo-wideint.c.

{
    a.lo = ~a.lo;
    a.hi = ~a.hi;
    if (++a.lo == 0)
       ++a.hi;
    return a;
}

Definition at line 240 of file cairo-wideint.c.

{
    a.lo = ~a.lo;
    a.hi = ~a.hi;
    return a;
}

Here is the caller graph for this function:

Definition at line 200 of file cairo-wideint.c.

{
    if (shift >= 32)
    {
       a.lo = a.hi;
       a.hi = _cairo_uint32_rsa (a.hi, 31);
       shift -= 32;
    }
    if (shift)
    {
       a.lo = a.lo >> shift | a.hi << (32 - shift);
       a.hi = _cairo_uint32_rsa (a.hi, shift);
    }
    return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 181 of file cairo-wideint.c.

{
    if (shift >= 32)
    {
       a.lo = a.hi;
       a.hi = 0;
       shift -= 32;
    }
    if (shift)
    {
       a.lo = a.lo >> shift | a.hi << (32 - shift);
       a.hi = a.hi >> shift;
    }
    return a;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 98 of file cairo-wideint.c.

{
    cairo_uint64_t   s;

    s.hi = a.hi - b.hi;
    s.lo = a.lo - b.lo;
    if (s.lo > a.lo)
       s.hi--;
    return s;
}

Here is the caller graph for this function:

Definition at line 354 of file cairo-wideint.c.

{
    cairo_uint128_t  q;

    q.lo = i;
    q.hi = _cairo_uint32_to_uint64 (0);
    return q;
}

Here is the call graph for this function:

Definition at line 446 of file cairo-wideint.c.

{
    cairo_uint128_t  s;
    uint32_t         ah, al, bh, bl;
    cairo_uint64_t   r0, r1, r2, r3;

    al = uint64_lo32 (a);
    ah = uint64_hi32 (a);
    bl = uint64_lo32 (b);
    bh = uint64_hi32 (b);

    r0 = _cairo_uint32x32_64_mul (al, bl);
    r1 = _cairo_uint32x32_64_mul (al, bh);
    r2 = _cairo_uint32x32_64_mul (ah, bl);
    r3 = _cairo_uint32x32_64_mul (ah, bh);

    r1 = _cairo_uint64_add (r1, uint64_hi (r0));    /* no carry possible */
    r1 = _cairo_uint64_add (r1, r2);                 /* but this can carry */
    if (_cairo_uint64_lt (r1, r2))            /* check */
       r3 = _cairo_uint64_add (r3, uint64_carry32);

    s.hi = _cairo_uint64_add (r3, uint64_hi(r1));
    s.lo = _cairo_uint64_add (uint64_shift32 (r1),
                            uint64_lo (r0));
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function: