33 #ifndef CAIRO_WIDEINT_H 34 #define CAIRO_WIDEINT_H 44 #include "ns3/core-config.h" 46 #define HAVE_UINT64_T 1 55 #define HAVE_STDINT_H 1 57 #define HAVE_STDINT_H 1 64 # include <inttypes.h> 65 #elif HAVE_SYS_INT_TYPES_H 66 # include <sys/int_types.h> 67 #elif defined(_MSC_VER) 68 typedef __int8 int8_t;
69 typedef unsigned __int8 uint8_t;
70 typedef __int16 int16_t;
71 typedef unsigned __int16 uint16_t;
72 typedef __int32 int32_t;
73 typedef unsigned __int32 uint32_t;
74 typedef __int64 int64_t;
75 typedef unsigned __int64 uint64_t;
76 # ifndef HAVE_UINT64_T 77 # define HAVE_UINT64_T 1 80 # define INT16_MIN (-32767-1) 83 # define INT16_MAX (32767) 86 # define UINT16_MAX (65535) 89 #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.) 102 #define I cairo_private 108 typedef struct _cairo_uint64 {
113 #define _cairo_uint64_to_uint32(a) ((a).lo) 124 #define _cairo_uint64_negative(a) (((int32_t)((a).hi)) < 0) 127 #define _cairo_uint64_to_int64(i) (i) 128 #define _cairo_int64_to_uint64(i) (i) 131 #define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32 (a)) 132 #define _cairo_int64_add(a,b) _cairo_uint64_add (a,b) 133 #define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b) 134 #define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b) 137 #define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b) 138 #define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b) 139 #define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b) 140 #define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b) 141 #define _cairo_int64_negate(a) _cairo_uint64_negate (a) 142 #define _cairo_int64_negative(a) (((int32_t)((a).hi)) < 0) 143 #define _cairo_int64_not(a) _cairo_uint64_not (a) 152 #define _cairo_uint32_to_uint64(i) ((uint64_t)(i)) 153 #define _cairo_uint64_to_uint32(i) ((uint32_t)(i)) 154 #define _cairo_uint64_add(a,b) ((a) + (b)) 155 #define _cairo_uint64_sub(a,b) ((a) - (b)) 156 #define _cairo_uint64_mul(a,b) ((a) * (b)) 157 #define _cairo_uint32x32_64_mul(a,b) ((uint64_t)(a) * (b)) 158 #define _cairo_uint64_lsl(a,b) ((a) << (b)) 159 #define _cairo_uint64_rsl(a,b) ((uint64_t)(a) >> (b)) 160 #define _cairo_uint64_rsa(a,b) ((uint64_t)((int64_t)(a) >> (b))) 161 #define _cairo_uint64_lt(a,b) ((a) < (b)) 162 #define _cairo_uint64_eq(a,b) ((a) == (b)) 163 #define _cairo_uint64_negate(a) ((uint64_t) -((int64_t)(a))) 164 #define _cairo_uint64_negative(a) ((int64_t)(a) < 0) 165 #define _cairo_uint64_not(a) (~(a)) 167 #define _cairo_uint64_to_int64(i) ((int64_t)(i)) 168 #define _cairo_int64_to_uint64(i) ((uint64_t)(i)) 170 #define _cairo_int32_to_int64(i) ((int64_t)(i)) 171 #define _cairo_int64_to_int32(i) ((int32_t)(i)) 172 #define _cairo_int64_add(a,b) ((a) + (b)) 173 #define _cairo_int64_sub(a,b) ((a) - (b)) 174 #define _cairo_int64_mul(a,b) ((a) * (b)) 175 #define _cairo_int32x32_64_mul(a,b) ((int64_t)(a) * (b)) 176 #define _cairo_int64_lt(a,b) ((a) < (b)) 177 #define _cairo_int64_eq(a,b) ((a) == (b)) 178 #define _cairo_int64_lsl(a,b) ((a) << (b)) 179 #define _cairo_int64_rsl(a,b) ((int64_t)((uint64_t)(a) >> (b))) 180 #define _cairo_int64_rsa(a,b) ((int64_t)(a) >> (b)) 181 #define _cairo_int64_negate(a) (-(a)) 182 #define _cairo_int64_negative(a) ((a) < 0) 183 #define _cairo_int64_not(a) (~(a)) 190 #define _cairo_uint64_le(a,b) (!_cairo_uint64_gt (a,b)) 191 #define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq (a,b)) 192 #define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt (a,b)) 193 #define _cairo_uint64_gt(a,b) _cairo_uint64_lt (b,a) 195 #define _cairo_int64_le(a,b) (!_cairo_int64_gt (a,b)) 196 #define _cairo_int64_ne(a,b) (!_cairo_int64_eq (a,b)) 197 #define _cairo_int64_ge(a,b) (!_cairo_int64_lt (a,b)) 198 #define _cairo_int64_gt(a,b) _cairo_int64_lt (b,a) 205 typedef struct _cairo_uquorem64 {
210 typedef struct _cairo_quorem64 {
231 typedef struct cairo_uint128 {
237 #define _cairo_uint128_to_uint64(a) ((a).lo) 238 #define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32 (_cairo_uint128_to_uint64 (a)) 249 #define _cairo_uint128_negative(a) (_cairo_uint64_negative (a.hi)) 252 #define _cairo_uint128_to_int128(i) (i) 253 #define _cairo_int128_to_uint128(i) (i) 257 #define _cairo_int128_to_int64(a) ((cairo_int64_t)(a).lo) 258 #define _cairo_int128_to_int32(a) _cairo_int64_to_int32 (_cairo_int128_to_int64 (a)) 259 #define _cairo_int128_add(a,b) _cairo_uint128_add (a,b) 260 #define _cairo_int128_sub(a,b) _cairo_uint128_sub (a,b) 261 #define _cairo_int128_mul(a,b) _cairo_uint128_mul (a,b) 263 #define _cairo_int128_lsl(a,b) _cairo_uint128_lsl (a,b) 264 #define _cairo_int128_rsl(a,b) _cairo_uint128_rsl (a,b) 265 #define _cairo_int128_rsa(a,b) _cairo_uint128_rsa (a,b) 267 #define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b) 268 #define _cairo_int128_negate(a) _cairo_uint128_negate (a) 269 #define _cairo_int128_negative(a) (_cairo_uint128_negative (a)) 270 #define _cairo_int128_not(a) _cairo_uint128_not (a) 279 #define _cairo_uint32_to_uint128(i) ((uint128_t)(i)) 280 #define _cairo_uint64_to_uint128(i) ((uint128_t)(i)) 281 #define _cairo_uint128_to_uint64(i) ((uint64_t)(i)) 282 #define _cairo_uint128_to_uint32(i) ((uint32_t)(i)) 283 #define _cairo_uint128_add(a,b) ((a) + (b)) 284 #define _cairo_uint128_sub(a,b) ((a) - (b)) 285 #define _cairo_uint128_mul(a,b) ((a) * (b)) 286 #define _cairo_uint64x64_128_mul(a,b) ((uint128_t)(a) * (b)) 287 #define _cairo_uint128_lsl(a,b) ((a) << (b)) 288 #define _cairo_uint128_rsl(a,b) ((uint128_t)(a) >> (b)) 289 #define _cairo_uint128_rsa(a,b) ((uint128_t)((int128_t)(a) >> (b))) 290 #define _cairo_uint128_lt(a,b) ((a) < (b)) 291 #define _cairo_uint128_eq(a,b) ((a) == (b)) 292 #define _cairo_uint128_negate(a) ((uint128_t) -((int128_t)(a))) 293 #define _cairo_uint128_negative(a) ((int128_t)(a) < 0) 294 #define _cairo_uint128_not(a) (~(a)) 296 #define _cairo_uint128_to_int128(i) ((int128_t)(i)) 297 #define _cairo_int128_to_uint128(i) ((uint128_t)(i)) 299 #define _cairo_int32_to_int128(i) ((int128_t)(i)) 300 #define _cairo_int64_to_int128(i) ((int128_t)(i)) 301 #define _cairo_int128_to_int64(i) ((int64_t)(i)) 302 #define _cairo_int128_to_int32(i) ((int32_t)(i)) 303 #define _cairo_int128_add(a,b) ((a) + (b)) 304 #define _cairo_int128_sub(a,b) ((a) - (b)) 305 #define _cairo_int128_mul(a,b) ((a) * (b)) 306 #define _cairo_int64x64_128_mul(a,b) ((int128_t)(a) * (b)) 307 #define _cairo_int128_lt(a,b) ((a) < (b)) 308 #define _cairo_int128_eq(a,b) ((a) == (b)) 309 #define _cairo_int128_lsl(a,b) ((a) << (b)) 310 #define _cairo_int128_rsl(a,b) ((int128_t)((uint128_t)(a) >> (b))) 311 #define _cairo_int128_rsa(a,b) ((int128_t)(a) >> (b)) 312 #define _cairo_int128_negate(a) (-(a)) 313 #define _cairo_int128_negative(a) ((a) < 0) 314 #define _cairo_int128_not(a) (~(a)) 318 typedef struct _cairo_uquorem128 {
323 typedef struct _cairo_quorem128 {
342 #define _cairo_uint128_le(a,b) (!_cairo_uint128_gt (a,b)) 343 #define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq (a,b)) 344 #define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt (a,b)) 345 #define _cairo_uint128_gt(a,b) _cairo_uint128_lt (b,a) 347 #define _cairo_int128_le(a,b) (!_cairo_int128_gt (a,b)) 348 #define _cairo_int128_ne(a,b) (!_cairo_int128_eq (a,b)) 349 #define _cairo_int128_ge(a,b) (!_cairo_int128_lt (a,b)) 350 #define _cairo_int128_gt(a,b) _cairo_int128_lt (b,a) cairo_uint128_t I _cairo_uint64_to_uint128(cairo_uint64_t i)
cairo_quorem64_t I _cairo_int_96by64_32x64_divrem(cairo_int128_t num, cairo_int64_t den)
#define _cairo_uint64_rsa(a, b)
const char * cairo_impl128
cairo_uint128_t I _cairo_uint128_negate(cairo_uint128_t a)
int I _cairo_uint128_eq(cairo_uint128_t a, cairo_uint128_t b)
#define _cairo_uint32x32_64_mul(a, b)
#define _cairo_uint64_not(a)
cairo_uquorem128_t I _cairo_uint128_divrem(cairo_uint128_t num, cairo_uint128_t den)
cairo_uquorem64_t I _cairo_uint_96by64_32x64_divrem(cairo_uint128_t num, cairo_uint64_t den)
_cairo_uint_96by64_32x64_divrem:
cairo_quorem128_t I _cairo_int128_divrem(cairo_int128_t num, cairo_int128_t den)
int I _cairo_int128_lt(cairo_int128_t a, cairo_int128_t b)
cairo_uint128_t I _cairo_uint128_rsa(cairo_uint128_t a, int shift)
cairo_int128_t I _cairo_int64x64_128_mul(cairo_int64_t a, cairo_int64_t b)
int I _cairo_uint128_lt(cairo_uint128_t a, cairo_uint128_t b)
#define _cairo_uint64_lsl(a, b)
cairo_quorem64_t I _cairo_int64_divrem(cairo_int64_t num, cairo_int64_t den)
cairo_uint128_t I _cairo_uint128_rsl(cairo_uint128_t a, int shift)
cairo_int128_t I _cairo_int32_to_int128(int32_t i)
cairo_uint128_t I _cairo_uint32_to_uint128(uint32_t i)
cairo_uint128_t I _cairo_uint64x64_128_mul(cairo_uint64_t a, cairo_uint64_t b)
cairo_uquorem64_t I _cairo_uint64_divrem(cairo_uint64_t num, cairo_uint64_t den)
#define _cairo_uint64_mul(a, b)
cairo_uint128_t I _cairo_uint128_sub(cairo_uint128_t a, cairo_uint128_t b)
#define _cairo_uint64_rsl(a, b)
#define _cairo_uint32_to_uint64(i)
#define _cairo_int32x32_64_mul(a, b)
cairo_uint128_t I _cairo_uint128_lsl(cairo_uint128_t a, int shift)
#define _cairo_uint64_add(a, b)
const char * cairo_impl64
cairo_uint128_t I _cairo_uint128_not(cairo_uint128_t a)
#define _cairo_uint64_negate(a)
#define _cairo_uint64_lt(a, b)
cairo_int128_t I _cairo_int64_to_int128(cairo_int64_t i)
cairo_uint128_t I _cairo_uint128_mul(cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t I _cairo_uint128_add(cairo_uint128_t a, cairo_uint128_t b)
#define _cairo_int32_to_int64(i)
#define _cairo_uint64_sub(a, b)
#define _cairo_int64_lt(a, b)
#define _cairo_uint64_eq(a, b)