Common functions for manipulating unsigned 128bit integers on platforms without compiler support.
More...
|
static uint128_t | uint128_add (uint128_t a, uint128_t b) |
| Add two 128bit unsigned integers.
|
|
static uint128_t | uint128_band (uint128_t a, uint128_t b) |
| Perform bitwise & of two 128bit unsigned integers.
|
|
static uint128_t | uint128_bor (uint128_t a, uint128_t b) |
| Perform bitwise | of two 128bit unsigned integers.
|
|
static uint128_t | uint128_decrement (uint128_t n) |
| Decrement a 128bit unsigned integer.
|
|
static bool | uint128_eq (uint128_t a, uint128_t b) |
| Return whether the integers are equal.
|
|
static uint128_t | uint128_gen_mask (uint8_t bits) |
| Create a 128 bit integer value with n bits high.
|
|
static bool | uint128_gt (uint128_t a, uint128_t b) |
| Return whether one integer is greater than the other.
|
|
static uint128_t | uint128_increment (uint128_t n) |
| Increment a 128bit unsigned integer.
|
|
static uint128_t | uint128_lshift (uint128_t num, uint8_t bits) |
| Left shift 128 bit integer.
|
|
static uint128_t | uint128_mul (uint128_t n, uint128_t m) |
| Multiply two unsigned 128bit integers.
|
|
static uint128_t | uint128_mul64 (uint64_t u, uint64_t v) |
| Multiply two unsigned 64bit integers to get an unsigned 128bit integer.
|
|
static uint128_t | uint128_new (uint64_t h, uint64_t l) |
| Creates a new uint128_t from a uint64_t.
|
|
static uint128_t | uint128_rshift (uint128_t num, uint8_t bits) |
| Right shift 128 bit integer.
|
|
static uint128_t | uint128_sub (uint128_t a, uint128_t b) |
| Subtract one 128bit integer from another.
|
|
static uint64_t | uint128_to_64 (uint128_t a) |
| Returns the low bits of a 128bit integer.
|
|
Common functions for manipulating unsigned 128bit integers on platforms without compiler support.
- Id
- 6acf0f34a2c358e843c2e98f610676cc24d36337
- Author
- Jacob F. W
-
Arran Cudbard-Bell
- Copyright
- 2019 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
-
2019 The FreeRADIUS server project
Definition in file uint128.h.