File: mongo-inteldfp-s390x.patch

package info (click to toggle)
libmongocrypt 1.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,572 kB
  • sloc: ansic: 70,067; python: 4,547; cpp: 615; sh: 460; makefile: 44; awk: 8
file content (134 lines) | stat: -rw-r--r-- 4,812 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
index 3eb9fbb17a80..355d70e813bb 100755
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
@@ -570,8 +570,65 @@
 #       endif
 
 
+#elif (defined(__s390x__))
 
+#	undef  vax
+#	undef  mips
+#	undef  hp_pa
+#	undef  cray
+#	undef  alpha
+#	undef  ix86
+#	undef  merced
+#	undef  amd64
+#	undef  sparc
+
+#	define s390 10
+#	define ARCHITECTURE s390
+
+#	define LOCAL_DATA 1
+#	undef  STATIC_ROUNDING_MODES
+#	define DYNAMIC_ROUNDING_MODES 1
+#	define DENORMS_EMULATED 1
+#	define SEPARATE_FLOAT_REGS 1
+#	undef  MULTIPLE_ISSUE
+#	undef  UNSIGNED_TO_FLOAT
+#	define UNSIGNED_MULTIPLY 1
+#	define ENDIANESS big_endian
+#	define SCALE_METHOD by_int
+#	define CVT_TO_HI_LO_METHOD by_flt
+
+#	define BITS_PER_CHAR    8
+#	define BITS_PER_SHORT  16
+#	define BITS_PER_INT    32
+#    	define BITS_PER_LONG   64
+
+#	define BITS_PER_ADDRESS 64
+
+#	define BITS_PER_FLOAT  32
+#	define BITS_PER_DOUBLE 64
+#	define BITS_PER_LONG_DOUBLE 128
+#	define LONG_DOUBLE_128_TYPE	_Quad
+
+#	define __INT_64 long long
+
+#	define INT_8  signed char
+#	define INT_16 signed short
+#	define INT_32 signed int
+#	define INT_64 signed __INT_64
+#	undef  INT_128
+#	define U_INT_8  unsigned char
+#	define U_INT_16 unsigned short
+#	define U_INT_32 unsigned int
+#	define U_INT_64 unsigned __INT_64
+#	undef  U_INT_128
 
+        /* Setup for 64 bits */
+#	define WORD                 INT_64
+#	define U_WORD               U_INT_64
+#	define BITS_PER_WORD        64
+#	define HALF_WORD            INT_32
+#	define U_HALF_WORD          U_INT_32
+#	define BITS_PER_HALF_WORD   32
 
 
 #elif (defined(_M_AMD64))
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_private.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_private.h
index 2d429afafc17..d57406c9014c 100755
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_private.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_private.h
@@ -242,6 +242,10 @@ versions until we need them. ] */
 
 #    include "ix86_macros.h"
 
+#elif (ARCHITECTURE == s390 )
+
+#    include "ix86_macros.h"
+
 #else
 
 #    error Unknown ARCHITECTURE.
diff --git a/src/third_party/IntelRDFPMathLib20U1/TESTS/readtest.c b/src/third_party/IntelRDFPMathLib20U1/TESTS/readtest.c
index afb77da454c2..24e91685de52 100755
--- a/src/third_party/IntelRDFPMathLib20U1/TESTS/readtest.c
+++ b/src/third_party/IntelRDFPMathLib20U1/TESTS/readtest.c
@@ -449,7 +449,7 @@ BID_UINT32 a32, b32, c32, q32, r32;
 BID_UINT64 a64, b64, c64, q64, r64;
 BID_UINT128 a, b, c, q, r;
 
-char AI8;
+signed char AI8;
 unsigned char AUI8;
 short AI16, BI16;
 unsigned short AUI16, BUI16;
@@ -466,7 +466,7 @@ unsigned short u1_16, u2_16;
 short i1_16, i2_16;
 
 unsigned char u1_8, u2_8;
-char i1_8, i2_8;
+signed char i1_8, i2_8;
 
 unsigned int expected_status;
 
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_ops.c b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_ops.c
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_ops.c
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux_ops.c
@@ -666,3 +666,3 @@
         }
-    return fp_class | ((WORD) 1 << (BITS_PER_WORD - 1));
+    return fp_class | ((U_WORD) 1 << (BITS_PER_WORD - 1));
     }
 
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux.h
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/dpml_ux.h
@@ -129,3 +129,3 @@
 #define UX_UNDERFLOW_EXPONENT (- UX_OVERFLOW_EXPONENT)
-#define UX_ZERO_EXPONENT      (- (UX_EXPONENT_TYPE) 1 << (F_EXP_WIDTH + 2))
+#define UX_ZERO_EXPONENT      (- ((UX_EXPONENT_TYPE) 1 << (F_EXP_WIDTH + 2)))
 #define UX_INFINITY_EXPONENT  (-(UX_ZERO_EXPONENT + 1)) 

diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
@@ -45,3 +45,3 @@
 // Fix system header issue on Sun solaris and define required type by ourselves
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__cplusplus)
 typedef int   wchar_t;