13 #include "../omw/intdef.h"
30 Base_Int128(uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL);
33 void set(uint64_t valueH, uint64_t valueL);
34 void set(uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL);
35 void sets(int64_t value);
36 void sets(int64_t valueH, uint64_t valueL);
37 void sets(int32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL);
38 void sets(
const uint8_t* data,
size_t count);
39 void setu(uint64_t value);
40 void setu(
const uint8_t* data,
size_t count);
42 uint64_t high()
const {
return m_h; }
43 uint64_t hi()
const {
return high(); }
44 int64_t highs()
const;
45 int64_t his()
const {
return highs(); }
46 uint64_t low()
const {
return m_l; }
47 uint64_t lo()
const {
return low(); }
49 explicit operator bool()
const {
return (m_h || m_l); }
58 void readBuffer(
const uint8_t* data,
size_t count);
84 SignedInt128(uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL);
88 bool isNegative()
const;
98 #ifdef OMWi_INT_RIGHTSHIFT_DEBUG
99 uint64_t oldValue_h, oldValue_l;
100 uint64_t lastMask_h, lastMask_l;
111 UnsignedInt128(uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL);
205 #define OMW_128BIT_ALL (omw::Base_Int128(OMW_64BIT_ALL, OMW_64BIT_ALL))
206 #define OMW_128BIT_LSB (omw::Base_Int128(0, OMW_64BIT_LSB))
207 #define OMW_128BIT_MSB (omw::Base_Int128(OMW_64BIT_MSB, 0))
209 #define OMW_INT128_MIN (omw::int128_t(OMW_64BIT_MSB, 0))
210 #define OMW_INT128_MAX (omw::int128_t(~OMW_64BIT_MSB, OMW_64BIT_ALL))
211 #define OMW_UINT128_MAX (omw::uint128_t(OMW_64BIT_ALL, OMW_64BIT_ALL))
215 #endif // IG_OMW_INT_H