Skip to content

Commit 08ed3b3

Browse files
committed
Unify definitions of INT64 and UINT64 across platforms
1 parent 92e26fa commit 08ed3b3

File tree

31 files changed

+377
-332
lines changed

31 files changed

+377
-332
lines changed

include/legacy-folding-api.h

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,28 +69,28 @@ void fperror(int errcode);
6969
void xdtomd(IEEE64 d, double *md);
7070
void xmdtod(double md, IEEE64 d);
7171

72-
int cmp64(INT64 arg1, INT64 arg2);
73-
int ucmp64(UINT64 arg1, UINT64 arg2);
74-
void add64(INT64 arg1, INT64 arg2, INT64 result);
75-
void div64(INT64 arg1, INT64 arg2, INT64 result);
76-
void exp64(INT64 base, int exp, INT64 result);
77-
void mul64(INT64 arg1, INT64 arg2, INT64 result);
78-
void mul64_10(INT64 arg1, INT64 result);
79-
void neg64(INT64 arg, INT64 result);
80-
void shf64(INT64 arg, int count, INT64 result);
81-
void sub64(INT64 arg1, INT64 arg2, INT64 result);
82-
void uadd64(UINT64 arg1, UINT64 arg2, UINT64 result);
83-
void uneg64(UINT64 arg, UINT64 result);
84-
void ushf64(UINT64 arg, int count, UINT64 result);
85-
void usub64(UINT64 arg1, UINT64 arg2, UINT64 result);
86-
void udiv64(UINT64 arg1, UINT64 arg2, UINT64 result);
87-
void umul64(UINT64 arg1, UINT64 arg2, UINT64 result);
88-
void umul64_10(UINT64 arg1, UINT64 result);
89-
void and64(INT64 arg1, INT64 arg2, INT64 result);
90-
void not64(INT64 arg, INT64 result);
91-
void or64(INT64 arg1, INT64 arg2, INT64 result);
92-
void xor64(INT64 arg1, INT64 arg2, INT64 result);
93-
void mul128(INT64 arg1, INT64 arg2, INT result[4]);
72+
int cmp64(DBLINT64 arg1, DBLINT64 arg2);
73+
int ucmp64(DBLUINT64 arg1, DBLUINT64 arg2);
74+
void add64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
75+
void div64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
76+
void exp64(DBLINT64 base, int exp, DBLINT64 result);
77+
void mul64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
78+
void mul64_10(DBLINT64 arg1, DBLINT64 result);
79+
void neg64(DBLINT64 arg, DBLINT64 result);
80+
void shf64(DBLINT64 arg, int count, DBLINT64 result);
81+
void sub64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
82+
void uadd64(DBLUINT64 arg1, DBLUINT64 arg2, DBLUINT64 result);
83+
void uneg64(DBLUINT64 arg, DBLUINT64 result);
84+
void ushf64(DBLUINT64 arg, int count, DBLUINT64 result);
85+
void usub64(DBLUINT64 arg1, DBLUINT64 arg2, DBLUINT64 result);
86+
void udiv64(DBLUINT64 arg1, DBLUINT64 arg2, DBLUINT64 result);
87+
void umul64(DBLUINT64 arg1, DBLUINT64 arg2, DBLUINT64 result);
88+
void umul64_10(DBLUINT64 arg1, DBLUINT64 result);
89+
void and64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
90+
void not64(DBLINT64 arg, DBLINT64 result);
91+
void or64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
92+
void xor64(DBLINT64 arg1, DBLINT64 arg2, DBLINT64 result);
93+
void mul128(DBLINT64 arg1, DBLINT64 arg2, INT result[4]);
9494
void shf128(INT arg[4], int count, INT result[4]);
9595
void shf128_1(INT arg[4], INT result[4]);
9696
void shf128_m1(INT arg[4], INT result[4]);
@@ -121,32 +121,32 @@ int hxatoxe(const char *s, IEEE80 e, int n);
121121
int hxatoxdd(const char *s, IEEE6464 dd, int n);
122122
int hxatoxq(const char *s, IEEE128 q, int n);
123123
void cprintf(char *s, const char *format, INT *val);
124-
int atoxi64(const char *s, INT64 ir, int n, int radix);
125-
int atosi64(const char *, INT64, int, int);
126-
void ui64toax(INT64 from, char *to, int count, int sign, int radix);
124+
int atoxi64(const char *s, DBLINT64 ir, int n, int radix);
125+
int atosi64(const char *, DBLINT64, int, int);
126+
void ui64toax(DBLINT64 from, char *to, int count, int sign, int radix);
127127

128-
void xqfix64(IEEE128 q, INT64 i);
129-
void xqfixu64(IEEE128 q, UINT64 i);
130-
void xefix64(IEEE80 e, INT64 i);
131-
void xefixu64(IEEE80 e, UINT64 i);
132-
void xddfix64(IEEE6464 dd, INT64 i);
133-
void xddfixu64(IEEE6464 dd, UINT64 i);
134-
void xdfix64(IEEE64 d, INT64 i);
135-
void xdfixu64(IEEE64 d, UINT64 i);
136-
void xfix64(IEEE32 f, INT64 i);
137-
void xfixu64(IEEE32 f, UINT64 i);
128+
void xqfix64(IEEE128 q, DBLINT64 i);
129+
void xqfixu64(IEEE128 q, DBLUINT64 i);
130+
void xefix64(IEEE80 e, DBLINT64 i);
131+
void xefixu64(IEEE80 e, DBLUINT64 i);
132+
void xddfix64(IEEE6464 dd, DBLINT64 i);
133+
void xddfixu64(IEEE6464 dd, DBLUINT64 i);
134+
void xdfix64(IEEE64 d, DBLINT64 i);
135+
void xdfixu64(IEEE64 d, DBLUINT64 i);
136+
void xfix64(IEEE32 f, DBLINT64 i);
137+
void xfixu64(IEEE32 f, DBLUINT64 i);
138138
void xfixu(IEEE32 f, UINT *r);
139139

140-
void xqflt64(INT64 i, IEEE128 q);
141-
void xqfltu64(UINT64 i, IEEE128 q);
142-
void xeflt64(INT64 i, IEEE80 e);
143-
void xefltu64(UINT64 i, IEEE80 e);
144-
void xddflt64(INT64 i, IEEE6464 dd);
145-
void xddfltu64(UINT64 i, IEEE6464 dd);
146-
void xdflt64(INT64 i, IEEE64 d);
147-
void xdfltu64(UINT64 i, IEEE64 d);
148-
void xflt64(INT64 i, IEEE32 *f);
149-
void xfltu64(UINT64 i, IEEE32 *f);
140+
void xqflt64(DBLINT64 i, IEEE128 q);
141+
void xqfltu64(DBLUINT64 i, IEEE128 q);
142+
void xeflt64(DBLINT64 i, IEEE80 e);
143+
void xefltu64(DBLUINT64 i, IEEE80 e);
144+
void xddflt64(DBLINT64 i, IEEE6464 dd);
145+
void xddfltu64(DBLUINT64 i, IEEE6464 dd);
146+
void xdflt64(DBLINT64 i, IEEE64 d);
147+
void xdfltu64(DBLUINT64 i, IEEE64 d);
148+
void xflt64(DBLINT64 i, IEEE32 *f);
149+
void xfltu64(DBLUINT64 i, IEEE32 *f);
150150

151151
void xfadd(IEEE32 f1, IEEE32 f2, IEEE32 *r);
152152
void xdadd(IEEE64 d1, IEEE64 d2, IEEE64 r);

include/legacy-ints.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,15 +45,15 @@ typedef int64_t BIGINT64; /* 64-bit native integer */
4545
typedef uint64_t BIGUINT64; /* 64-bit native unsigned integer */
4646
typedef uint64_t BITMASK64; /* native 64-bit unsigned int */
4747

48-
typedef int32_t INT64[2]; /* signed 64-bit 2's complement integer: [0]
48+
typedef int32_t DBLINT64[2]; /* signed 64-bit 2's complement integer: [0]
4949
* - most significant 32 bits, including sign
5050
* [1] - least significant 32 bits */
51-
typedef uint32_t UINT64[2]; /* unsigned 64-bit integer: [0] - most
51+
typedef uint32_t DBLUINT64[2]; /* unsigned 64-bit integer: [0] - most
5252
* significant 32 bits [1] - least
5353
* significant 32 bits */
5454

55-
void bgitoi64(int64_t x, INT64 res);
56-
int64_t i64tobgi(INT64 x);
55+
void bgitoi64(int64_t x, DBLINT64 res);
56+
int64_t i64tobgi(DBLINT64 x);
5757

5858
#define BIGIPFSZ "l" /* used to define ISZ_PF */
5959

0 commit comments

Comments
 (0)