Merge ~fheimes/ubuntu/+source/valgrind:valgrind-lp1825343-hirsute into ubuntu/+source/valgrind:ubuntu/hirsute-devel
- Git
- lp:~fheimes/ubuntu/+source/valgrind
- valgrind-lp1825343-hirsute
- Merge into ubuntu/hirsute-devel
Status: | Merged |
---|---|
Approved by: | Christian Ehrhardt |
Approved revision: | 9ce66c4fc97a353855c5cd5bf496d03e42867fda |
Merged at revision: | 9ce66c4fc97a353855c5cd5bf496d03e42867fda |
Proposed branch: | ~fheimes/ubuntu/+source/valgrind:valgrind-lp1825343-hirsute |
Merge into: | ubuntu/+source/valgrind:ubuntu/hirsute-devel |
Diff against target: |
3232 lines (+3198/-0) 5 files modified
debian/changelog (+9/-0) debian/patches/lp-1825343-Bug-404076-s390x-Implement-z14-vector-instructions.patch (+2986/-0) debian/patches/lp-1825343-Bug-428648-s390x-Force-12-bit-amode-for-vector-loads.patch (+45/-0) debian/patches/lp-1825343-Bug-429864-s390-Use-Iop_CasCmp-to-fix-memcheck-false.patch (+155/-0) debian/patches/series (+3/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
Review via email: mp+397860@code.launchpad.net |
Commit message
Description of the change
valgrind-
add support for IBM z14 instructions to Valgrind
debian/
debian/changelog
backported three commits from valgrind > v3.16.1
Thanks to Andreas Arnez (LP: #1825343)
One patch needed to be modified to skip the following two files:
- docs/internals/
- auxprogs/
since these files are not included in the upstream release tar ball 3.16.1 thereby also not included in the Ubuntu package '3.16.1-1ubuntu1'.
Test build is available here:
https:/
Christian Ehrhardt (paelzer) wrote : | # |
To ssh://git.
* [new tag] upload/
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading valgrind_
Uploading valgrind_
Uploading valgrind_
Uploading valgrind_
Successfully uploaded packages.
Frank Heimes (fheimes) wrote : | # |
Many thx for reviewing, commenting, sponsoring, uploading and your overall support on this!
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index c669e48..9b0d8a8 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,12 @@ | |||
6 | 1 | valgrind (1:3.16.1-1ubuntu2) hirsute; urgency=medium | ||
7 | 2 | |||
8 | 3 | * debian/patches/lp-1825343-Bug-404076-s390*.patches | ||
9 | 4 | adding support for IBM z14 instructions to Valgrind | ||
10 | 5 | backported three commits from valgrind > v3.16.1 | ||
11 | 6 | Thanks to Andreas Arnez (LP: #1825343) | ||
12 | 7 | |||
13 | 8 | -- Frank Heimes <frank.heimes@canonical.com> Wed, 10 Feb 2021 20:10:24 +0100 | ||
14 | 9 | |||
15 | 1 | valgrind (1:3.16.1-1ubuntu1) groovy; urgency=low | 10 | valgrind (1:3.16.1-1ubuntu1) groovy; urgency=low |
16 | 2 | 11 | ||
17 | 3 | * Merge from Debian unstable. Remaining changes: | 12 | * Merge from Debian unstable. Remaining changes: |
18 | diff --git a/debian/patches/lp-1825343-Bug-404076-s390x-Implement-z14-vector-instructions.patch b/debian/patches/lp-1825343-Bug-404076-s390x-Implement-z14-vector-instructions.patch | |||
19 | 4 | new file mode 100644 | 13 | new file mode 100644 |
20 | index 0000000..fa985b9 | |||
21 | --- /dev/null | |||
22 | +++ b/debian/patches/lp-1825343-Bug-404076-s390x-Implement-z14-vector-instructions.patch | |||
23 | @@ -0,0 +1,2986 @@ | |||
24 | 1 | From 159f132289160ab1a5a5cf4da14fb57ecdb248ca Mon Sep 17 00:00:00 2001 | ||
25 | 2 | From: Andreas Arnez <arnez@linux.ibm.com> | ||
26 | 3 | Date: Mon, 7 Dec 2020 20:01:26 +0100 | ||
27 | 4 | Subject: [PATCH] Bug 404076 - s390x: Implement z14 vector instructions | ||
28 | 5 | |||
29 | 6 | Implement the new instructions/features that were added to z/Architecture | ||
30 | 7 | with the vector-enhancements facility 1. Also cover the instructions from | ||
31 | 8 | the vector-packed-decimal facility that are defined outside the chapter | ||
32 | 9 | "Vector Decimal Instructions", but not the ones from that chapter itself. | ||
33 | 10 | |||
34 | 11 | For a detailed list of newly supported instructions see the updates to | ||
35 | 12 | `docs/internals/s390-opcodes.csv'. | ||
36 | 13 | |||
37 | 14 | Since the miscellaneous instruction extensions facility 2 was already | ||
38 | 15 | addressed by Bug 404406, this completes the support necessary to run | ||
39 | 16 | general programs built with `--march=z14' under Valgrind. The | ||
40 | 17 | vector-packed-decimal facility is currently not exploited by the standard | ||
41 | 18 | toolchain and libraries. | ||
42 | 19 | |||
43 | 20 | Author: Andreas Arnez <arnez@linux.ibm.com> | ||
44 | 21 | Origin: backport, https://sourceware.org/git/?p=valgrind.git;a=commit;h=159f13228 | ||
45 | 22 | Bug-IBM: IBM Bugzilla 163660 | ||
46 | 23 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1825343 | ||
47 | 24 | Applied-Upstream: > v3.16.1 | ||
48 | 25 | Reviewed-by: Frank Heimes <frank.heimes@canonical.com> | ||
49 | 26 | Last-Update: 2021-02-10 | ||
50 | 27 | |||
51 | 28 | --- | ||
52 | 29 | --- a/coregrind/m_initimg/initimg-linux.c | ||
53 | 30 | +++ b/coregrind/m_initimg/initimg-linux.c | ||
54 | 31 | @@ -697,9 +697,13 @@ | ||
55 | 32 | } | ||
56 | 33 | # elif defined(VGP_s390x_linux) | ||
57 | 34 | { | ||
58 | 35 | - /* Advertise hardware features "below" TE and VXRS. TE itself | ||
59 | 36 | - and anything above VXRS is not supported by Valgrind. */ | ||
60 | 37 | - auxv->u.a_val &= (VKI_HWCAP_S390_TE - 1) | VKI_HWCAP_S390_VXRS; | ||
61 | 38 | + /* Out of the hardware features available on the platform, | ||
62 | 39 | + advertise those "below" TE, as well as the ones explicitly | ||
63 | 40 | + ORed in the expression below. Anything else, such as TE | ||
64 | 41 | + itself, is not supported by Valgrind. */ | ||
65 | 42 | + auxv->u.a_val &= ((VKI_HWCAP_S390_TE - 1) | ||
66 | 43 | + | VKI_HWCAP_S390_VXRS | ||
67 | 44 | + | VKI_HWCAP_S390_VXRS_EXT); | ||
68 | 45 | } | ||
69 | 46 | # elif defined(VGP_arm64_linux) | ||
70 | 47 | { | ||
71 | 48 | --- a/coregrind/m_machine.c | ||
72 | 49 | +++ b/coregrind/m_machine.c | ||
73 | 50 | @@ -1544,6 +1544,7 @@ | ||
74 | 51 | { False, S390_FAC_MSA5, VEX_HWCAPS_S390X_MSA5, "MSA5" }, | ||
75 | 52 | { False, S390_FAC_MI2, VEX_HWCAPS_S390X_MI2, "MI2" }, | ||
76 | 53 | { False, S390_FAC_LSC2, VEX_HWCAPS_S390X_LSC2, "LSC2" }, | ||
77 | 54 | + { False, S390_FAC_VXE, VEX_HWCAPS_S390X_VXE, "VXE" }, | ||
78 | 55 | }; | ||
79 | 56 | |||
80 | 57 | /* Set hwcaps according to the detected facilities */ | ||
81 | 58 | --- a/include/vki/vki-s390x-linux.h | ||
82 | 59 | +++ b/include/vki/vki-s390x-linux.h | ||
83 | 60 | @@ -806,6 +806,7 @@ | ||
84 | 61 | |||
85 | 62 | #define VKI_HWCAP_S390_TE 1024 | ||
86 | 63 | #define VKI_HWCAP_S390_VXRS 2048 | ||
87 | 64 | +#define VKI_HWCAP_S390_VXRS_EXT 8192 | ||
88 | 65 | |||
89 | 66 | |||
90 | 67 | //---------------------------------------------------------------------- | ||
91 | 68 | --- a/NEWS | ||
92 | 69 | +++ b/NEWS | ||
93 | 70 | @@ -2,6 +2,7 @@ | ||
94 | 71 | 428648 s390_emit_load_mem panics due to 20-bit offset for vector load | ||
95 | 72 | 429864 s390x: C++ atomic test_and_set yields false-positive memcheck | ||
96 | 73 | diagnostics | ||
97 | 74 | +404076 s390x: z14 vector instructions not implemented | ||
98 | 75 | |||
99 | 76 | Release 3.16.1 (22 June 2020) | ||
100 | 77 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
101 | 78 | --- a/none/tests/s390x/vector_float.c | ||
102 | 79 | +++ b/none/tests/s390x/vector_float.c | ||
103 | 80 | @@ -114,50 +114,59 @@ | ||
104 | 81 | test_with_selective_printing(vldeb, (V128_V_RES_AS_FLOAT64 | | ||
105 | 82 | V128_V_ARG1_AS_FLOAT64)); | ||
106 | 83 | test_with_selective_printing(wldeb, (V128_V_RES_AS_FLOAT64 | | ||
107 | 84 | - V128_V_ARG1_AS_FLOAT64)); | ||
108 | 85 | + V128_V_ARG1_AS_FLOAT64 | | ||
109 | 86 | + V128_V_RES_ZERO_ONLY)); | ||
110 | 87 | |||
111 | 88 | test_with_selective_printing(vflcdb, (V128_V_RES_AS_FLOAT64 | | ||
112 | 89 | V128_V_ARG1_AS_FLOAT64)); | ||
113 | 90 | test_with_selective_printing(wflcdb, (V128_V_RES_AS_FLOAT64 | | ||
114 | 91 | - V128_V_ARG1_AS_FLOAT64)); | ||
115 | 92 | + V128_V_ARG1_AS_FLOAT64 | | ||
116 | 93 | + V128_V_RES_ZERO_ONLY)); | ||
117 | 94 | test_with_selective_printing(vflndb, (V128_V_RES_AS_FLOAT64 | | ||
118 | 95 | V128_V_ARG1_AS_FLOAT64)); | ||
119 | 96 | test_with_selective_printing(wflndb, (V128_V_RES_AS_FLOAT64 | | ||
120 | 97 | - V128_V_ARG1_AS_FLOAT64)); | ||
121 | 98 | + V128_V_ARG1_AS_FLOAT64 | | ||
122 | 99 | + V128_V_RES_ZERO_ONLY)); | ||
123 | 100 | test_with_selective_printing(vflpdb, (V128_V_RES_AS_FLOAT64 | | ||
124 | 101 | V128_V_ARG1_AS_FLOAT64)); | ||
125 | 102 | test_with_selective_printing(wflpdb, (V128_V_RES_AS_FLOAT64 | | ||
126 | 103 | - V128_V_ARG1_AS_FLOAT64)); | ||
127 | 104 | + V128_V_ARG1_AS_FLOAT64 | | ||
128 | 105 | + V128_V_RES_ZERO_ONLY)); | ||
129 | 106 | |||
130 | 107 | test_with_selective_printing(vfadb, (V128_V_RES_AS_FLOAT64 | | ||
131 | 108 | V128_V_ARG1_AS_FLOAT64 | | ||
132 | 109 | V128_V_ARG2_AS_FLOAT64)); | ||
133 | 110 | test_with_selective_printing(wfadb, (V128_V_RES_AS_FLOAT64 | | ||
134 | 111 | V128_V_ARG1_AS_FLOAT64 | | ||
135 | 112 | - V128_V_ARG2_AS_FLOAT64)); | ||
136 | 113 | + V128_V_ARG2_AS_FLOAT64 | | ||
137 | 114 | + V128_V_RES_ZERO_ONLY)); | ||
138 | 115 | test_with_selective_printing(vfsdb, (V128_V_RES_AS_FLOAT64 | | ||
139 | 116 | V128_V_ARG1_AS_FLOAT64 | | ||
140 | 117 | V128_V_ARG2_AS_FLOAT64)); | ||
141 | 118 | test_with_selective_printing(wfsdb, (V128_V_RES_AS_FLOAT64 | | ||
142 | 119 | V128_V_ARG1_AS_FLOAT64 | | ||
143 | 120 | - V128_V_ARG2_AS_FLOAT64)); | ||
144 | 121 | + V128_V_ARG2_AS_FLOAT64 | | ||
145 | 122 | + V128_V_RES_ZERO_ONLY)); | ||
146 | 123 | test_with_selective_printing(vfmdb, (V128_V_RES_AS_FLOAT64 | | ||
147 | 124 | V128_V_ARG1_AS_FLOAT64 | | ||
148 | 125 | V128_V_ARG2_AS_FLOAT64)); | ||
149 | 126 | test_with_selective_printing(wfmdb, (V128_V_RES_AS_FLOAT64 | | ||
150 | 127 | V128_V_ARG1_AS_FLOAT64 | | ||
151 | 128 | - V128_V_ARG2_AS_FLOAT64)); | ||
152 | 129 | + V128_V_ARG2_AS_FLOAT64 | | ||
153 | 130 | + V128_V_RES_ZERO_ONLY)); | ||
154 | 131 | test_with_selective_printing(vfddb, (V128_V_RES_AS_FLOAT64 | | ||
155 | 132 | V128_V_ARG1_AS_FLOAT64 | | ||
156 | 133 | V128_V_ARG2_AS_FLOAT64)); | ||
157 | 134 | test_with_selective_printing(wfddb, (V128_V_RES_AS_FLOAT64 | | ||
158 | 135 | V128_V_ARG1_AS_FLOAT64 | | ||
159 | 136 | - V128_V_ARG2_AS_FLOAT64)); | ||
160 | 137 | + V128_V_ARG2_AS_FLOAT64 | | ||
161 | 138 | + V128_V_RES_ZERO_ONLY)); | ||
162 | 139 | |||
163 | 140 | test_with_selective_printing(vfsqdb, (V128_V_RES_AS_FLOAT64 | | ||
164 | 141 | V128_V_ARG1_AS_FLOAT64)); | ||
165 | 142 | test_with_selective_printing(wfsqdb, (V128_V_RES_AS_FLOAT64 | | ||
166 | 143 | - V128_V_ARG1_AS_FLOAT64)); | ||
167 | 144 | + V128_V_ARG1_AS_FLOAT64 | | ||
168 | 145 | + V128_V_RES_ZERO_ONLY)); | ||
169 | 146 | |||
170 | 147 | test_with_selective_printing(vfmadb, (V128_V_RES_AS_FLOAT64 | | ||
171 | 148 | V128_V_ARG1_AS_FLOAT64 | | ||
172 | 149 | @@ -166,7 +175,8 @@ | ||
173 | 150 | test_with_selective_printing(wfmadb, (V128_V_RES_AS_FLOAT64 | | ||
174 | 151 | V128_V_ARG1_AS_FLOAT64 | | ||
175 | 152 | V128_V_ARG2_AS_FLOAT64 | | ||
176 | 153 | - V128_V_ARG3_AS_FLOAT64)); | ||
177 | 154 | + V128_V_ARG3_AS_FLOAT64 | | ||
178 | 155 | + V128_V_RES_ZERO_ONLY)); | ||
179 | 156 | test_with_selective_printing(vfmsdb, (V128_V_RES_AS_FLOAT64 | | ||
180 | 157 | V128_V_ARG1_AS_FLOAT64 | | ||
181 | 158 | V128_V_ARG2_AS_FLOAT64 | | ||
182 | 159 | @@ -174,21 +184,25 @@ | ||
183 | 160 | test_with_selective_printing(wfmsdb, (V128_V_RES_AS_FLOAT64 | | ||
184 | 161 | V128_V_ARG1_AS_FLOAT64 | | ||
185 | 162 | V128_V_ARG2_AS_FLOAT64 | | ||
186 | 163 | - V128_V_ARG3_AS_FLOAT64)); | ||
187 | 164 | + V128_V_ARG3_AS_FLOAT64 | | ||
188 | 165 | + V128_V_RES_ZERO_ONLY)); | ||
189 | 166 | |||
190 | 167 | test_with_selective_printing(wfcdb, (V128_V_ARG1_AS_FLOAT64 | | ||
191 | 168 | V128_V_ARG2_AS_FLOAT64 | | ||
192 | 169 | - V128_R_RES)); | ||
193 | 170 | + V128_R_RES | | ||
194 | 171 | + V128_V_RES_ZERO_ONLY)); | ||
195 | 172 | test_with_selective_printing(wfkdb, (V128_V_ARG1_AS_FLOAT64 | | ||
196 | 173 | V128_V_ARG2_AS_FLOAT64 | | ||
197 | 174 | - V128_R_RES)); | ||
198 | 175 | + V128_R_RES | | ||
199 | 176 | + V128_V_RES_ZERO_ONLY)); | ||
200 | 177 | |||
201 | 178 | test_with_selective_printing(vfcedb, (V128_V_RES_AS_INT | | ||
202 | 179 | V128_V_ARG1_AS_FLOAT64 | | ||
203 | 180 | V128_V_ARG2_AS_FLOAT64)); | ||
204 | 181 | test_with_selective_printing(wfcedb, (V128_V_RES_AS_INT | | ||
205 | 182 | V128_V_ARG1_AS_FLOAT64 | | ||
206 | 183 | - V128_V_ARG2_AS_FLOAT64)); | ||
207 | 184 | + V128_V_ARG2_AS_FLOAT64 | | ||
208 | 185 | + V128_V_RES_ZERO_ONLY)); | ||
209 | 186 | test_with_selective_printing(vfcedbs, (V128_V_RES_AS_INT | | ||
210 | 187 | V128_V_ARG1_AS_FLOAT64 | | ||
211 | 188 | V128_V_ARG2_AS_FLOAT64 | | ||
212 | 189 | @@ -196,14 +210,16 @@ | ||
213 | 190 | test_with_selective_printing(wfcedbs, (V128_V_RES_AS_INT | | ||
214 | 191 | V128_V_ARG1_AS_FLOAT64 | | ||
215 | 192 | V128_V_ARG2_AS_FLOAT64 | | ||
216 | 193 | - V128_R_RES)); | ||
217 | 194 | + V128_R_RES | | ||
218 | 195 | + V128_V_RES_ZERO_ONLY)); | ||
219 | 196 | |||
220 | 197 | test_with_selective_printing(vfchdb, (V128_V_RES_AS_INT | | ||
221 | 198 | V128_V_ARG1_AS_FLOAT64 | | ||
222 | 199 | V128_V_ARG2_AS_FLOAT64)); | ||
223 | 200 | test_with_selective_printing(wfchdb, (V128_V_RES_AS_INT | | ||
224 | 201 | V128_V_ARG1_AS_FLOAT64 | | ||
225 | 202 | - V128_V_ARG2_AS_FLOAT64)); | ||
226 | 203 | + V128_V_ARG2_AS_FLOAT64 | | ||
227 | 204 | + V128_V_RES_ZERO_ONLY)); | ||
228 | 205 | test_with_selective_printing(vfchdbs, (V128_V_RES_AS_INT | | ||
229 | 206 | V128_V_ARG1_AS_FLOAT64 | | ||
230 | 207 | V128_V_ARG2_AS_FLOAT64 | | ||
231 | 208 | @@ -211,14 +227,16 @@ | ||
232 | 209 | test_with_selective_printing(wfchdbs, (V128_V_RES_AS_INT | | ||
233 | 210 | V128_V_ARG1_AS_FLOAT64 | | ||
234 | 211 | V128_V_ARG2_AS_FLOAT64 | | ||
235 | 212 | - V128_R_RES)); | ||
236 | 213 | + V128_R_RES | | ||
237 | 214 | + V128_V_RES_ZERO_ONLY)); | ||
238 | 215 | |||
239 | 216 | test_with_selective_printing(vfchedb, (V128_V_RES_AS_INT | | ||
240 | 217 | V128_V_ARG1_AS_FLOAT64 | | ||
241 | 218 | V128_V_ARG2_AS_FLOAT64)); | ||
242 | 219 | test_with_selective_printing(wfchedb, (V128_V_RES_AS_INT | | ||
243 | 220 | V128_V_ARG1_AS_FLOAT64 | | ||
244 | 221 | - V128_V_ARG2_AS_FLOAT64)); | ||
245 | 222 | + V128_V_ARG2_AS_FLOAT64 | | ||
246 | 223 | + V128_V_RES_ZERO_ONLY)); | ||
247 | 224 | test_with_selective_printing(vfchedbs, (V128_V_RES_AS_INT | | ||
248 | 225 | V128_V_ARG1_AS_FLOAT64 | | ||
249 | 226 | V128_V_ARG2_AS_FLOAT64 | | ||
250 | 227 | @@ -226,7 +244,8 @@ | ||
251 | 228 | test_with_selective_printing(wfchedbs, (V128_V_RES_AS_INT | | ||
252 | 229 | V128_V_ARG1_AS_FLOAT64 | | ||
253 | 230 | V128_V_ARG2_AS_FLOAT64 | | ||
254 | 231 | - V128_R_RES)); | ||
255 | 232 | + V128_R_RES | | ||
256 | 233 | + V128_V_RES_ZERO_ONLY)); | ||
257 | 234 | |||
258 | 235 | test_with_selective_printing(vftcidb0, (V128_V_RES_AS_INT | | ||
259 | 236 | V128_V_ARG1_AS_FLOAT64 | | ||
260 | 237 | --- a/none/tests/s390x/vector_float.stdout.exp | ||
261 | 238 | +++ b/none/tests/s390x/vector_float.stdout.exp | ||
262 | 239 | @@ -419,88 +419,88 @@ | ||
263 | 240 | v_result = 7fffffffffffffff | 7fffffffffffffff | ||
264 | 241 | v_arg1 = 0x1.fed2f087c21p+341 | 0x1.180e4c1d87fc4p+682 | ||
265 | 242 | insn wcgdb00: | ||
266 | 243 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
267 | 244 | + v_result = 7fffffffffffffff | -- | ||
268 | 245 | v_arg1 = 0x1.d7fd9222e8b86p+670 | 0x1.c272612672a3p+798 | ||
269 | 246 | insn wcgdb00: | ||
270 | 247 | - v_result = 0000000000000000 | 0000000000000000 | ||
271 | 248 | + v_result = 0000000000000000 | -- | ||
272 | 249 | v_arg1 = 0x1.745cd360987e5p-496 | -0x1.f3b404919f358p-321 | ||
273 | 250 | insn wcgdb00: | ||
274 | 251 | - v_result = 8000000000000000 | 0000000000000000 | ||
275 | 252 | + v_result = 8000000000000000 | -- | ||
276 | 253 | v_arg1 = -0x1.9523565cd92d5p+643 | 0x1.253677d6d3be2p-556 | ||
277 | 254 | insn wcgdb00: | ||
278 | 255 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
279 | 256 | + v_result = 7fffffffffffffff | -- | ||
280 | 257 | v_arg1 = 0x1.b6eb576ec3e6ap+845 | -0x1.c7e102c503d91p+266 | ||
281 | 258 | insn wcgdb01: | ||
282 | 259 | - v_result = 0000000000000000 | 0000000000000000 | ||
283 | 260 | + v_result = 0000000000000000 | -- | ||
284 | 261 | v_arg1 = -0x1.3d4319841f4d6p-1011 | -0x1.2feabf7dfc506p-680 | ||
285 | 262 | insn wcgdb01: | ||
286 | 263 | - v_result = 0000000000000000 | 0000000000000000 | ||
287 | 264 | + v_result = 0000000000000000 | -- | ||
288 | 265 | v_arg1 = -0x1.6fb8d1cd8b32cp-843 | -0x1.50f6a6922f97ep+33 | ||
289 | 266 | insn wcgdb01: | ||
290 | 267 | - v_result = 0000000000000000 | 0000000000000000 | ||
291 | 268 | + v_result = 0000000000000000 | -- | ||
292 | 269 | v_arg1 = -0x1.64a673daccf1ap-566 | -0x1.69ef9b1d01499p+824 | ||
293 | 270 | insn wcgdb01: | ||
294 | 271 | - v_result = 8000000000000000 | 0000000000000000 | ||
295 | 272 | + v_result = 8000000000000000 | -- | ||
296 | 273 | v_arg1 = -0x1.3e2ddd862b4adp+1005 | -0x1.312466410271p+184 | ||
297 | 274 | insn wcgdb03: | ||
298 | 275 | - v_result = 0000000000000001 | 0000000000000000 | ||
299 | 276 | + v_result = 0000000000000001 | -- | ||
300 | 277 | v_arg1 = 0x1.d594c3412a11p-953 | -0x1.a07393d34d77cp-224 | ||
301 | 278 | insn wcgdb03: | ||
302 | 279 | - v_result = 8000000000000000 | 0000000000000000 | ||
303 | 280 | + v_result = 8000000000000000 | -- | ||
304 | 281 | v_arg1 = -0x1.f7a0dbcfd6e4cp+104 | -0x1.40f7cde7f2214p-702 | ||
305 | 282 | insn wcgdb03: | ||
306 | 283 | - v_result = 8000000000000000 | 0000000000000000 | ||
307 | 284 | + v_result = 8000000000000000 | -- | ||
308 | 285 | v_arg1 = -0x1.40739c1574808p+560 | -0x1.970328ddf1b6ep-374 | ||
309 | 286 | insn wcgdb03: | ||
310 | 287 | - v_result = 0000000000000001 | 0000000000000000 | ||
311 | 288 | + v_result = 0000000000000001 | -- | ||
312 | 289 | v_arg1 = 0x1.477653afd7048p-38 | 0x1.1eac2f8b2a93cp-384 | ||
313 | 290 | insn wcgdb04: | ||
314 | 291 | - v_result = ffffffffe9479a7d | 0000000000000000 | ||
315 | 292 | + v_result = ffffffffe9479a7d | -- | ||
316 | 293 | v_arg1 = -0x1.6b865833eff3p+28 | 0x1.06e8cf1834d0ep-722 | ||
317 | 294 | insn wcgdb04: | ||
318 | 295 | - v_result = 0000000000000000 | 0000000000000000 | ||
319 | 296 | + v_result = 0000000000000000 | -- | ||
320 | 297 | v_arg1 = 0x1.eef0b2294a5cp-544 | -0x1.8e8b133ccda15p+752 | ||
321 | 298 | insn wcgdb04: | ||
322 | 299 | - v_result = 0000000000000000 | 0000000000000000 | ||
323 | 300 | + v_result = 0000000000000000 | -- | ||
324 | 301 | v_arg1 = -0x1.f34e77e6b6698p-894 | -0x1.9f7ce1cb53bddp-896 | ||
325 | 302 | insn wcgdb04: | ||
326 | 303 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
327 | 304 | + v_result = 7fffffffffffffff | -- | ||
328 | 305 | v_arg1 = 0x1.95707a6d75db5p+1018 | -0x1.3b0c072d23011p-224 | ||
329 | 306 | insn wcgdb05: | ||
330 | 307 | - v_result = 0000000000000000 | 0000000000000000 | ||
331 | 308 | + v_result = 0000000000000000 | -- | ||
332 | 309 | v_arg1 = -0x1.a9fb71160793p-968 | 0x1.05f601fe8123ap-986 | ||
333 | 310 | insn wcgdb05: | ||
334 | 311 | - v_result = 8000000000000000 | 0000000000000000 | ||
335 | 312 | + v_result = 8000000000000000 | -- | ||
336 | 313 | v_arg1 = -0x1.0864159b94305p+451 | -0x1.d4647f5a78b7ep-599 | ||
337 | 314 | insn wcgdb05: | ||
338 | 315 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
339 | 316 | + v_result = 7fffffffffffffff | -- | ||
340 | 317 | v_arg1 = 0x1.37eadff8397c8p+432 | -0x1.15d896b6f6063p+464 | ||
341 | 318 | insn wcgdb05: | ||
342 | 319 | - v_result = 0000000000000000 | 0000000000000000 | ||
343 | 320 | + v_result = 0000000000000000 | -- | ||
344 | 321 | v_arg1 = 0x1.eb0812b0d677p-781 | 0x1.3117c5e0e288cp-202 | ||
345 | 322 | insn wcgdb06: | ||
346 | 323 | - v_result = 0000000000000001 | 0000000000000000 | ||
347 | 324 | + v_result = 0000000000000001 | -- | ||
348 | 325 | v_arg1 = 0x1.6b88069167c0fp-662 | -0x1.70571d27e1279p+254 | ||
349 | 326 | insn wcgdb06: | ||
350 | 327 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
351 | 328 | + v_result = 7fffffffffffffff | -- | ||
352 | 329 | v_arg1 = 0x1.f6a6d6e883596p+260 | 0x1.0d578afaaa34ap+604 | ||
353 | 330 | insn wcgdb06: | ||
354 | 331 | - v_result = 0000000000000001 | 0000000000000000 | ||
355 | 332 | + v_result = 0000000000000001 | -- | ||
356 | 333 | v_arg1 = 0x1.d91c7d13c4694p-475 | -0x1.ecf1f8529767bp+830 | ||
357 | 334 | insn wcgdb06: | ||
358 | 335 | - v_result = 0000000000000001 | 0000000000000000 | ||
359 | 336 | + v_result = 0000000000000001 | -- | ||
360 | 337 | v_arg1 = 0x1.fac8dd3bb7af6p-101 | 0x1.fb8324a00fba8p+959 | ||
361 | 338 | insn wcgdb07: | ||
362 | 339 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
363 | 340 | + v_result = 7fffffffffffffff | -- | ||
364 | 341 | v_arg1 = 0x1.4b0fa18fa73c7p+111 | -0x1.08e7b17633a49p+61 | ||
365 | 342 | insn wcgdb07: | ||
366 | 343 | - v_result = e636b693e39a1100 | 0000000000000000 | ||
367 | 344 | + v_result = e636b693e39a1100 | -- | ||
368 | 345 | v_arg1 = -0x1.9c9496c1c65efp+60 | 0x1.c4182ee728d76p-572 | ||
369 | 346 | insn wcgdb07: | ||
370 | 347 | - v_result = ffffffffffffffff | 0000000000000000 | ||
371 | 348 | + v_result = ffffffffffffffff | -- | ||
372 | 349 | v_arg1 = -0x1.819718032dff7p-303 | 0x1.a784c77ff6aa2p-622 | ||
373 | 350 | insn wcgdb07: | ||
374 | 351 | - v_result = 7fffffffffffffff | 0000000000000000 | ||
375 | 352 | + v_result = 7fffffffffffffff | -- | ||
376 | 353 | v_arg1 = 0x1.978e8abfd83c2p+152 | 0x1.2531ebf451762p+315 | ||
377 | 354 | insn vclgdb00: | ||
378 | 355 | v_result = 0000000000000000 | 0000000000000000 | ||
379 | 356 | @@ -587,88 +587,88 @@ | ||
380 | 357 | v_result = 0000000000000000 | 0000000000000000 | ||
381 | 358 | v_arg1 = -0x1.137bbb51f08bdp+306 | 0x1.18d2a1063356p-795 | ||
382 | 359 | insn wclgdb00: | ||
383 | 360 | - v_result = 0000000000000000 | 0000000000000000 | ||
384 | 361 | + v_result = 0000000000000000 | -- | ||
385 | 362 | v_arg1 = -0x1.e66f55dcc2639p-1013 | -0x1.733ee56929f3bp-304 | ||
386 | 363 | insn wclgdb00: | ||
387 | 364 | - v_result = 0000000000000000 | 0000000000000000 | ||
388 | 365 | + v_result = 0000000000000000 | -- | ||
389 | 366 | v_arg1 = 0x1.8802fd9ab740cp-986 | -0x1.64d4d2c7c145fp-1015 | ||
390 | 367 | insn wclgdb00: | ||
391 | 368 | - v_result = 0000000000000000 | 0000000000000000 | ||
392 | 369 | + v_result = 0000000000000000 | -- | ||
393 | 370 | v_arg1 = 0x1.a67209b8c407bp-645 | -0x1.6410ff9b1c801p+487 | ||
394 | 371 | insn wclgdb00: | ||
395 | 372 | - v_result = 0000000000000000 | 0000000000000000 | ||
396 | 373 | + v_result = 0000000000000000 | -- | ||
397 | 374 | v_arg1 = -0x1.cb2febaefeb2dp+49 | 0x1.dee368b2ec375p-502 | ||
398 | 375 | insn wclgdb01: | ||
399 | 376 | - v_result = 0000000000000000 | 0000000000000000 | ||
400 | 377 | + v_result = 0000000000000000 | -- | ||
401 | 378 | v_arg1 = 0x1.5703db3c1b0e2p-728 | 0x1.068c4d51ea4ebp+617 | ||
402 | 379 | insn wclgdb01: | ||
403 | 380 | - v_result = 0000000000000000 | 0000000000000000 | ||
404 | 381 | + v_result = 0000000000000000 | -- | ||
405 | 382 | v_arg1 = -0x1.ae350291e5b3ep+291 | 0x1.1b87bb09b6032p+376 | ||
406 | 383 | insn wclgdb01: | ||
407 | 384 | - v_result = ffffffffffffffff | 0000000000000000 | ||
408 | 385 | + v_result = ffffffffffffffff | -- | ||
409 | 386 | v_arg1 = 0x1.c4666a710127ep+424 | -0x1.19e969b6c0076p+491 | ||
410 | 387 | insn wclgdb01: | ||
411 | 388 | - v_result = ffffffffffffffff | 0000000000000000 | ||
412 | 389 | + v_result = ffffffffffffffff | -- | ||
413 | 390 | v_arg1 = 0x1.c892c5a4d103fp+105 | -0x1.d4f937cc76704p+749 | ||
414 | 391 | insn wclgdb03: | ||
415 | 392 | - v_result = 0000000000000001 | 0000000000000000 | ||
416 | 393 | + v_result = 0000000000000001 | -- | ||
417 | 394 | v_arg1 = 0x1.81090d8fc663dp-111 | 0x1.337ec5e0f0904p+1 | ||
418 | 395 | insn wclgdb03: | ||
419 | 396 | - v_result = 0000000000000000 | 0000000000000000 | ||
420 | 397 | + v_result = 0000000000000000 | -- | ||
421 | 398 | v_arg1 = -0x1.e787adc70b91p-593 | 0x1.db8d83196b53cp-762 | ||
422 | 399 | insn wclgdb03: | ||
423 | 400 | - v_result = ffffffffffffffff | 0000000000000000 | ||
424 | 401 | + v_result = ffffffffffffffff | -- | ||
425 | 402 | v_arg1 = 0x1.6529307e907efp+389 | -0x1.3ea0d8d5b4dd2p+589 | ||
426 | 403 | insn wclgdb03: | ||
427 | 404 | - v_result = 0000000000000000 | 0000000000000000 | ||
428 | 405 | + v_result = 0000000000000000 | -- | ||
429 | 406 | v_arg1 = -0x1.be701a158637p-385 | 0x1.c5a7f70cb8a09p+107 | ||
430 | 407 | insn wclgdb04: | ||
431 | 408 | - v_result = 0000000000000000 | 0000000000000000 | ||
432 | 409 | + v_result = 0000000000000000 | -- | ||
433 | 410 | v_arg1 = -0x1.2f328571ab445p+21 | -0x1.dcc21fc82ba01p-930 | ||
434 | 411 | insn wclgdb04: | ||
435 | 412 | - v_result = 0000000000000000 | 0000000000000000 | ||
436 | 413 | + v_result = 0000000000000000 | -- | ||
437 | 414 | v_arg1 = -0x1.06b69fcbb7bffp-415 | 0x1.6f9a13a0a827ap+915 | ||
438 | 415 | insn wclgdb04: | ||
439 | 416 | - v_result = 0000000000000000 | 0000000000000000 | ||
440 | 417 | + v_result = 0000000000000000 | -- | ||
441 | 418 | v_arg1 = -0x1.738e549b38bcdp+479 | 0x1.a522edb999c9p-45 | ||
442 | 419 | insn wclgdb04: | ||
443 | 420 | - v_result = 0000000000000000 | 0000000000000000 | ||
444 | 421 | + v_result = 0000000000000000 | -- | ||
445 | 422 | v_arg1 = 0x1.7f9399d2bcf3bp-215 | -0x1.7bc35f2d69a7fp+818 | ||
446 | 423 | insn wclgdb05: | ||
447 | 424 | - v_result = ffffffffffffffff | 0000000000000000 | ||
448 | 425 | + v_result = ffffffffffffffff | -- | ||
449 | 426 | v_arg1 = 0x1.fc542bdb707f6p+880 | -0x1.8521ebc93a25fp-969 | ||
450 | 427 | insn wclgdb05: | ||
451 | 428 | - v_result = 1ce8d9951b8c8600 | 0000000000000000 | ||
452 | 429 | + v_result = 1ce8d9951b8c8600 | -- | ||
453 | 430 | v_arg1 = 0x1.ce8d9951b8c86p+60 | 0x1.92712589230e7p+475 | ||
454 | 431 | insn wclgdb05: | ||
455 | 432 | - v_result = 0000000000000000 | 0000000000000000 | ||
456 | 433 | + v_result = 0000000000000000 | -- | ||
457 | 434 | v_arg1 = -0x1.8a297f60a0811p-156 | 0x1.102b79043d82cp-204 | ||
458 | 435 | insn wclgdb05: | ||
459 | 436 | - v_result = 0000000000000000 | 0000000000000000 | ||
460 | 437 | + v_result = 0000000000000000 | -- | ||
461 | 438 | v_arg1 = 0x1.beb9057e1401dp-196 | -0x1.820f18f830262p+15 | ||
462 | 439 | insn wclgdb06: | ||
463 | 440 | - v_result = 0000000000000001 | 0000000000000000 | ||
464 | 441 | + v_result = 0000000000000001 | -- | ||
465 | 442 | v_arg1 = 0x1.c321a966ecb4dp-430 | -0x1.2f6a1a95ead99p-943 | ||
466 | 443 | insn wclgdb06: | ||
467 | 444 | - v_result = 0000000000000000 | 0000000000000000 | ||
468 | 445 | + v_result = 0000000000000000 | -- | ||
469 | 446 | v_arg1 = -0x1.f1a86b4aed821p-56 | -0x1.1ee6717cc2d7fp-899 | ||
470 | 447 | insn wclgdb06: | ||
471 | 448 | - v_result = 0000000000000000 | 0000000000000000 | ||
472 | 449 | + v_result = 0000000000000000 | -- | ||
473 | 450 | v_arg1 = -0x1.73ce49d89ecb9p-302 | 0x1.52663b975ed23p-716 | ||
474 | 451 | insn wclgdb06: | ||
475 | 452 | - v_result = 0000000000000000 | 0000000000000000 | ||
476 | 453 | + v_result = 0000000000000000 | -- | ||
477 | 454 | v_arg1 = -0x1.3e9c2de97a292p+879 | 0x1.d34eed36f2eafp+960 | ||
478 | 455 | insn wclgdb07: | ||
479 | 456 | - v_result = 0000000000000000 | 0000000000000000 | ||
480 | 457 | + v_result = 0000000000000000 | -- | ||
481 | 458 | v_arg1 = -0x1.4e6ec6ddc6a45p-632 | -0x1.6e564d0fec72bp+369 | ||
482 | 459 | insn wclgdb07: | ||
483 | 460 | - v_result = ffffffffffffffff | 0000000000000000 | ||
484 | 461 | + v_result = ffffffffffffffff | -- | ||
485 | 462 | v_arg1 = 0x1.42e2c658e4c4dp+459 | -0x1.9f9dc0252e44p+85 | ||
486 | 463 | insn wclgdb07: | ||
487 | 464 | - v_result = 0000000000000000 | 0000000000000000 | ||
488 | 465 | + v_result = 0000000000000000 | -- | ||
489 | 466 | v_arg1 = -0x1.fb40ac8cda3c1p-762 | 0x1.0e9ed614bc8f1p-342 | ||
490 | 467 | insn wclgdb07: | ||
491 | 468 | - v_result = 0000000000000000 | 0000000000000000 | ||
492 | 469 | + v_result = 0000000000000000 | -- | ||
493 | 470 | v_arg1 = -0x1.c1f8b3c68e214p+118 | -0x1.1a26a49368b61p+756 | ||
494 | 471 | insn vfidb00: | ||
495 | 472 | v_arg1 = -0x1.38df4cf9d52dbp-545 | -0x1.049253d90dd92p+94 | ||
496 | 473 | @@ -1020,16 +1020,16 @@ | ||
497 | 474 | v_result = -0x1.6f5fb2p+70 | -0x1.0d2df6p-107 | ||
498 | 475 | insn wldeb: | ||
499 | 476 | v_arg1 = -0x1.d26169729db2ap-435 | 0x1.d6fd080793e8cp+767 | ||
500 | 477 | - v_result = -0x1.9a4c2cp-54 | 0x0p+0 | ||
501 | 478 | + v_result = -0x1.9a4c2cp-54 | -- | ||
502 | 479 | insn wldeb: | ||
503 | 480 | v_arg1 = -0x1.f4b59107fce61p-930 | 0x1.cdf2816e253f4p-168 | ||
504 | 481 | - v_result = -0x1.be96b2p-116 | 0x0p+0 | ||
505 | 482 | + v_result = -0x1.be96b2p-116 | -- | ||
506 | 483 | insn wldeb: | ||
507 | 484 | v_arg1 = -0x1.9603a2997928cp-441 | -0x1.aada85e355a11p-767 | ||
508 | 485 | - v_result = -0x1.d2c074p-55 | 0x0p+0 | ||
509 | 486 | + v_result = -0x1.d2c074p-55 | -- | ||
510 | 487 | insn wldeb: | ||
511 | 488 | v_arg1 = 0x1.25ccf5bd0e83p+620 | 0x1.e1635864ebb17p-88 | ||
512 | 489 | - v_result = 0x1.64b99ep+78 | 0x0p+0 | ||
513 | 490 | + v_result = 0x1.64b99ep+78 | -- | ||
514 | 491 | insn vflcdb: | ||
515 | 492 | v_arg1 = 0x1.0ae6d82f76afp-166 | -0x1.e8fb1e03a7415p-191 | ||
516 | 493 | v_result = -0x1.0ae6d82f76afp-166 | 0x1.e8fb1e03a7415p-191 | ||
517 | 494 | @@ -1044,16 +1044,16 @@ | ||
518 | 495 | v_result = -0x1.19520153d35b4p-301 | -0x1.ac5325cd23253p+396 | ||
519 | 496 | insn wflcdb: | ||
520 | 497 | v_arg1 = 0x1.ffd3eecfd54d7p-831 | -0x1.97854fa523a77p+146 | ||
521 | 498 | - v_result = -0x1.ffd3eecfd54d7p-831 | 0x0p+0 | ||
522 | 499 | + v_result = -0x1.ffd3eecfd54d7p-831 | -- | ||
523 | 500 | insn wflcdb: | ||
524 | 501 | v_arg1 = -0x1.508ea45606447p-442 | 0x1.ae7f0e6cf9d2bp+583 | ||
525 | 502 | - v_result = 0x1.508ea45606447p-442 | 0x0p+0 | ||
526 | 503 | + v_result = 0x1.508ea45606447p-442 | -- | ||
527 | 504 | insn wflcdb: | ||
528 | 505 | v_arg1 = 0x1.da8ab2188c21ap+94 | 0x1.78a9c152aa074p-808 | ||
529 | 506 | - v_result = -0x1.da8ab2188c21ap+94 | 0x0p+0 | ||
530 | 507 | + v_result = -0x1.da8ab2188c21ap+94 | -- | ||
531 | 508 | insn wflcdb: | ||
532 | 509 | v_arg1 = -0x1.086882645e0c5p-1001 | -0x1.54e2de5af5a74p-262 | ||
533 | 510 | - v_result = 0x1.086882645e0c5p-1001 | 0x0p+0 | ||
534 | 511 | + v_result = 0x1.086882645e0c5p-1001 | -- | ||
535 | 512 | insn vflndb: | ||
536 | 513 | v_arg1 = -0x1.5bec561d407dcp+819 | -0x1.a5773dadb7a2dp+935 | ||
537 | 514 | v_result = -0x1.5bec561d407dcp+819 | -0x1.a5773dadb7a2dp+935 | ||
538 | 515 | @@ -1068,16 +1068,16 @@ | ||
539 | 516 | v_result = -0x1.c5bc39a06d4e2p-259 | -0x1.c5e61ad849e77p-833 | ||
540 | 517 | insn wflndb: | ||
541 | 518 | v_arg1 = -0x1.e9f3e6d1beffap-117 | -0x1.d58cc8bf123b3p-714 | ||
542 | 519 | - v_result = -0x1.e9f3e6d1beffap-117 | 0x0p+0 | ||
543 | 520 | + v_result = -0x1.e9f3e6d1beffap-117 | -- | ||
544 | 521 | insn wflndb: | ||
545 | 522 | v_arg1 = -0x1.3fc4ef2e7485ep-691 | 0x1.eb328986081efp-775 | ||
546 | 523 | - v_result = -0x1.3fc4ef2e7485ep-691 | 0x0p+0 | ||
547 | 524 | + v_result = -0x1.3fc4ef2e7485ep-691 | -- | ||
548 | 525 | insn wflndb: | ||
549 | 526 | v_arg1 = -0x1.7146c5afdec16p+23 | -0x1.597fcfa1fab2p-708 | ||
550 | 527 | - v_result = -0x1.7146c5afdec16p+23 | 0x0p+0 | ||
551 | 528 | + v_result = -0x1.7146c5afdec16p+23 | -- | ||
552 | 529 | insn wflndb: | ||
553 | 530 | v_arg1 = 0x1.03f8d7e9afe84p-947 | 0x1.9a10c3feb6b57p-118 | ||
554 | 531 | - v_result = -0x1.03f8d7e9afe84p-947 | 0x0p+0 | ||
555 | 532 | + v_result = -0x1.03f8d7e9afe84p-947 | -- | ||
556 | 533 | insn vflpdb: | ||
557 | 534 | v_arg1 = 0x1.64ae59b6c762ep-407 | -0x1.fa7191ab21e86p+533 | ||
558 | 535 | v_result = 0x1.64ae59b6c762ep-407 | 0x1.fa7191ab21e86p+533 | ||
559 | 536 | @@ -1092,16 +1092,16 @@ | ||
560 | 537 | v_result = 0x1.85fa2de1d492ap+170 | 0x1.ac36828822c11p-968 | ||
561 | 538 | insn wflpdb: | ||
562 | 539 | v_arg1 = 0x1.a6cf677640a73p-871 | 0x1.b6f1792385922p-278 | ||
563 | 540 | - v_result = 0x1.a6cf677640a73p-871 | 0x0p+0 | ||
564 | 541 | + v_result = 0x1.a6cf677640a73p-871 | -- | ||
565 | 542 | insn wflpdb: | ||
566 | 543 | v_arg1 = -0x1.b886774f6d888p-191 | -0x1.6a2b08d735d22p-643 | ||
567 | 544 | - v_result = 0x1.b886774f6d888p-191 | 0x0p+0 | ||
568 | 545 | + v_result = 0x1.b886774f6d888p-191 | -- | ||
569 | 546 | insn wflpdb: | ||
570 | 547 | v_arg1 = 0x1.5045d37d46f5fp+943 | -0x1.333a86ef2dcf6p-1013 | ||
571 | 548 | - v_result = 0x1.5045d37d46f5fp+943 | 0x0p+0 | ||
572 | 549 | + v_result = 0x1.5045d37d46f5fp+943 | -- | ||
573 | 550 | insn wflpdb: | ||
574 | 551 | v_arg1 = 0x1.1e7bec6ada14dp+252 | 0x1.a70b3f3e24dap-153 | ||
575 | 552 | - v_result = 0x1.1e7bec6ada14dp+252 | 0x0p+0 | ||
576 | 553 | + v_result = 0x1.1e7bec6ada14dp+252 | -- | ||
577 | 554 | insn vfadb: | ||
578 | 555 | v_arg1 = 0x1.5b1ad8e9f17c6p-294 | -0x1.ddd8300a0bf02p+122 | ||
579 | 556 | v_arg2 = -0x1.9b49c31ca8ac6p+926 | 0x1.fdbc992926268p+677 | ||
580 | 557 | @@ -1121,19 +1121,19 @@ | ||
581 | 558 | insn wfadb: | ||
582 | 559 | v_arg1 = 0x1.3c5466cb80722p+489 | -0x1.11e1770053ca2p+924 | ||
583 | 560 | v_arg2 = 0x1.d876cd721a726p-946 | 0x1.5c04ceb79c9bcp+1001 | ||
584 | 561 | - v_result = 0x1.3c5466cb80722p+489 | 0x0p+0 | ||
585 | 562 | + v_result = 0x1.3c5466cb80722p+489 | -- | ||
586 | 563 | insn wfadb: | ||
587 | 564 | v_arg1 = 0x1.b0b142d6b76a3p+577 | 0x1.3146824e993a2p+432 | ||
588 | 565 | v_arg2 = -0x1.f7f3b7582925fp-684 | -0x1.9700143c2b935p-837 | ||
589 | 566 | - v_result = 0x1.b0b142d6b76a2p+577 | 0x0p+0 | ||
590 | 567 | + v_result = 0x1.b0b142d6b76a2p+577 | -- | ||
591 | 568 | insn wfadb: | ||
592 | 569 | v_arg1 = -0x1.8d65e15edabd6p+244 | 0x1.3be7fd08492d6p-141 | ||
593 | 570 | v_arg2 = -0x1.5eef86490fb0ap+481 | 0x1.7b26c897cb6dfp+810 | ||
594 | 571 | - v_result = -0x1.5eef86490fb0ap+481 | 0x0p+0 | ||
595 | 572 | + v_result = -0x1.5eef86490fb0ap+481 | -- | ||
596 | 573 | insn wfadb: | ||
597 | 574 | v_arg1 = -0x1.2dffa5b5f29p+34 | 0x1.71a026274602fp-881 | ||
598 | 575 | v_arg2 = 0x1.4dad707287289p+756 | -0x1.1500d55807247p-616 | ||
599 | 576 | - v_result = 0x1.4dad707287288p+756 | 0x0p+0 | ||
600 | 577 | + v_result = 0x1.4dad707287288p+756 | -- | ||
601 | 578 | insn vfsdb: | ||
602 | 579 | v_arg1 = 0x1.054fd9c4d4883p+644 | 0x1.45c90ed85bd7fp-780 | ||
603 | 580 | v_arg2 = 0x1.f3bc7a611dadap+494 | -0x1.7c9e1e858ba5bp-301 | ||
604 | 581 | @@ -1153,19 +1153,19 @@ | ||
605 | 582 | insn wfsdb: | ||
606 | 583 | v_arg1 = 0x1.9090dabf846e7p-648 | 0x1.1c4ab843a2d15p+329 | ||
607 | 584 | v_arg2 = -0x1.a7ceb293690dep+316 | 0x1.22245954a20cp+42 | ||
608 | 585 | - v_result = 0x1.a7ceb293690dep+316 | 0x0p+0 | ||
609 | 586 | + v_result = 0x1.a7ceb293690dep+316 | -- | ||
610 | 587 | insn wfsdb: | ||
611 | 588 | v_arg1 = 0x1.4e5347c27819p-933 | -0x1.56a30bda28351p-64 | ||
612 | 589 | v_arg2 = -0x1.dedb9f3935b56p-155 | 0x1.8c5b6ed76816cp-522 | ||
613 | 590 | - v_result = 0x1.dedb9f3935b56p-155 | 0x0p+0 | ||
614 | 591 | + v_result = 0x1.dedb9f3935b56p-155 | -- | ||
615 | 592 | insn wfsdb: | ||
616 | 593 | v_arg1 = 0x1.0ec4e562a015bp-491 | 0x1.3996381b52d9fp-686 | ||
617 | 594 | v_arg2 = 0x1.1dcce4e81819p+960 | -0x1.32fa425e8fc08p-263 | ||
618 | 595 | - v_result = -0x1.1dcce4e81818fp+960 | 0x0p+0 | ||
619 | 596 | + v_result = -0x1.1dcce4e81818fp+960 | -- | ||
620 | 597 | insn wfsdb: | ||
621 | 598 | v_arg1 = -0x1.587229f90f77dp-19 | 0x1.100d8eb8105e4p-784 | ||
622 | 599 | v_arg2 = -0x1.afb4cce4c43ddp+530 | -0x1.6da7f05e7f512p-869 | ||
623 | 600 | - v_result = 0x1.afb4cce4c43dcp+530 | 0x0p+0 | ||
624 | 601 | + v_result = 0x1.afb4cce4c43dcp+530 | -- | ||
625 | 602 | insn vfmdb: | ||
626 | 603 | v_arg1 = 0x1.892b425556c47p-124 | 0x1.38222404079dfp-656 | ||
627 | 604 | v_arg2 = 0x1.af612ed2c342dp-267 | -0x1.1f735fd6ce768p-877 | ||
628 | 605 | @@ -1185,19 +1185,19 @@ | ||
629 | 606 | insn wfmdb: | ||
630 | 607 | v_arg1 = -0x1.b992d950126a1p-683 | -0x1.9c1b22eb58c59p-497 | ||
631 | 608 | v_arg2 = 0x1.b557a7d8e32c3p-25 | -0x1.f746b2ddafccep+227 | ||
632 | 609 | - v_result = -0x1.792f6fb13894ap-707 | 0x0p+0 | ||
633 | 610 | + v_result = -0x1.792f6fb13894ap-707 | -- | ||
634 | 611 | insn wfmdb: | ||
635 | 612 | v_arg1 = -0x1.677a8c20a5a2fp+876 | 0x1.c03e7b97e8c0dp-645 | ||
636 | 613 | v_arg2 = 0x1.dab44be430937p-1011 | -0x1.3f51352c67be9p-916 | ||
637 | 614 | - v_result = -0x1.4d4b0a1827064p-134 | 0x0p+0 | ||
638 | 615 | + v_result = -0x1.4d4b0a1827064p-134 | -- | ||
639 | 616 | insn wfmdb: | ||
640 | 617 | v_arg1 = -0x1.da60f596ad0cep+254 | 0x1.52332e0650e33p+966 | ||
641 | 618 | v_arg2 = 0x1.a042c52ed993cp+215 | 0x1.8f380c84aa133p+204 | ||
642 | 619 | - v_result = -0x1.81aca4bbcbd24p+470 | 0x0p+0 | ||
643 | 620 | + v_result = -0x1.81aca4bbcbd24p+470 | -- | ||
644 | 621 | insn wfmdb: | ||
645 | 622 | v_arg1 = -0x1.83d17f11f6aa3p-469 | -0x1.98117efe89b9ep-361 | ||
646 | 623 | v_arg2 = 0x1.8c445fd46d214p-701 | -0x1.f98118821821cp+596 | ||
647 | 624 | - v_result = -0x0p+0 | 0x0p+0 | ||
648 | 625 | + v_result = -0x0p+0 | -- | ||
649 | 626 | insn vfddb: | ||
650 | 627 | v_arg1 = -0x1.ecbb48899e0f1p+969 | 0x1.caf175ab352p-20 | ||
651 | 628 | v_arg2 = -0x1.9455d67f9f79dp+208 | 0x1.bc4a431b04a6fp+482 | ||
652 | 629 | @@ -1217,19 +1217,19 @@ | ||
653 | 630 | insn wfddb: | ||
654 | 631 | v_arg1 = 0x1.bd48489b60731p-114 | 0x1.a760dcf57b74fp-51 | ||
655 | 632 | v_arg2 = -0x1.171f83409eeb6p-402 | -0x1.e159d1409bdc6p-972 | ||
656 | 633 | - v_result = -0x1.9864f1511f8cp+288 | 0x0p+0 | ||
657 | 634 | + v_result = -0x1.9864f1511f8cp+288 | -- | ||
658 | 635 | insn wfddb: | ||
659 | 636 | v_arg1 = -0x1.120505ef4606p-637 | -0x1.83f6f775c0eb7p+272 | ||
660 | 637 | v_arg2 = -0x1.d18ba3872fde1p+298 | 0x1.c60f8d191068cp-454 | ||
661 | 638 | - v_result = 0x1.2d5cdb15a686cp-936 | 0x0p+0 | ||
662 | 639 | + v_result = 0x1.2d5cdb15a686cp-936 | -- | ||
663 | 640 | insn wfddb: | ||
664 | 641 | v_arg1 = 0x1.f637f7f8c790fp-97 | -0x1.7bdce4d74947p+189 | ||
665 | 642 | v_arg2 = -0x1.1c8f2d1b3a2edp-218 | -0x1.55fdfd1840241p-350 | ||
666 | 643 | - v_result = -0x1.c3d0799c1420fp+121 | 0x0p+0 | ||
667 | 644 | + v_result = -0x1.c3d0799c1420fp+121 | -- | ||
668 | 645 | insn wfddb: | ||
669 | 646 | v_arg1 = -0x1.c63b7b2eee253p+250 | 0x1.dfd9dcd8b823fp-125 | ||
670 | 647 | v_arg2 = 0x1.094a1f1f87e0cp+629 | 0x1.eeaa23c0d7843p-814 | ||
671 | 648 | - v_result = -0x1.b653a10ebdeccp-379 | 0x0p+0 | ||
672 | 649 | + v_result = -0x1.b653a10ebdeccp-379 | -- | ||
673 | 650 | insn vfsqdb: | ||
674 | 651 | v_arg1 = 0x1.f60db25f7066p-703 | -0x1.d43509abca8c3p+631 | ||
675 | 652 | v_result = 0x1.fb009ab25ec11p-352 | nan | ||
676 | 653 | @@ -1244,16 +1244,16 @@ | ||
677 | 654 | v_result = 0x1.833dba0954bccp+249 | nan | ||
678 | 655 | insn wfsqdb: | ||
679 | 656 | v_arg1 = 0x1.71af4e7f64978p+481 | -0x1.3429dc60011d7p-879 | ||
680 | 657 | - v_result = 0x1.b30fc65551133p+240 | 0x0p+0 | ||
681 | 658 | + v_result = 0x1.b30fc65551133p+240 | -- | ||
682 | 659 | insn wfsqdb: | ||
683 | 660 | v_arg1 = 0x1.5410db1c5f403p+173 | 0x1.97fa6581e692fp+108 | ||
684 | 661 | - v_result = 0x1.a144f43a592c1p+86 | 0x0p+0 | ||
685 | 662 | + v_result = 0x1.a144f43a592c1p+86 | -- | ||
686 | 663 | insn wfsqdb: | ||
687 | 664 | v_arg1 = -0x1.5838027725afep+6 | 0x1.ac61529c11f38p+565 | ||
688 | 665 | - v_result = nan | 0x0p+0 | ||
689 | 666 | + v_result = nan | -- | ||
690 | 667 | insn wfsqdb: | ||
691 | 668 | v_arg1 = -0x1.159e341dcc06ep-439 | 0x1.ed54ce5481ba5p-574 | ||
692 | 669 | - v_result = nan | 0x0p+0 | ||
693 | 670 | + v_result = nan | -- | ||
694 | 671 | insn vfmadb: | ||
695 | 672 | v_arg1 = -0x1.eb00a5c503d75p+538 | 0x1.89fae603ddc07p+767 | ||
696 | 673 | v_arg2 = -0x1.71c72712c3957p+715 | 0x1.1bd5773442feap+762 | ||
697 | 674 | @@ -1278,22 +1278,22 @@ | ||
698 | 675 | v_arg1 = 0x1.1cc5b10a14d54p+668 | -0x1.686407390f7d1p+616 | ||
699 | 676 | v_arg2 = -0x1.bf34549e73246p+676 | -0x1.dc5a34cc470f3p+595 | ||
700 | 677 | v_arg3 = -0x1.95e0fdcf13974p-811 | -0x1.79c7cc1a8ec83p-558 | ||
701 | 678 | - v_result = -0x1.fffffffffffffp+1023 | 0x0p+0 | ||
702 | 679 | + v_result = -0x1.fffffffffffffp+1023 | -- | ||
703 | 680 | insn wfmadb: | ||
704 | 681 | v_arg1 = 0x1.138bc1a5d75f8p+713 | -0x1.e226ebba2fe54p+381 | ||
705 | 682 | v_arg2 = -0x1.081ebb7cc3414p-772 | 0x1.369d99e174fc3p+922 | ||
706 | 683 | v_arg3 = -0x1.0671c682a5d0cp-1016 | 0x1.03c9530dd0377p+378 | ||
707 | 684 | - v_result = -0x1.1c4933e117d95p-59 | 0x0p+0 | ||
708 | 685 | + v_result = -0x1.1c4933e117d95p-59 | -- | ||
709 | 686 | insn wfmadb: | ||
710 | 687 | v_arg1 = -0x1.166f0b1fad67bp+64 | -0x1.e9ee8d32e1069p-452 | ||
711 | 688 | v_arg2 = -0x1.4a235bdd109e2p-65 | 0x1.bacaa96fc7e81p-403 | ||
712 | 689 | v_arg3 = -0x1.d2e19acf7c4bdp+99 | 0x1.f901130f685adp-963 | ||
713 | 690 | - v_result = -0x1.d2e19acf7c4bcp+99 | 0x0p+0 | ||
714 | 691 | + v_result = -0x1.d2e19acf7c4bcp+99 | -- | ||
715 | 692 | insn wfmadb: | ||
716 | 693 | v_arg1 = -0x1.77d7bfec863d2p-988 | -0x1.b68029700c6b1p-206 | ||
717 | 694 | v_arg2 = -0x1.aca05ad00aec1p+737 | 0x1.ac746bd7e216bp+51 | ||
718 | 695 | v_arg3 = 0x1.17342292078b4p+188 | -0x1.49efaf9392301p+555 | ||
719 | 696 | - v_result = 0x1.17342292078b4p+188 | 0x0p+0 | ||
720 | 697 | + v_result = 0x1.17342292078b4p+188 | -- | ||
721 | 698 | insn vfmsdb: | ||
722 | 699 | v_arg1 = -0x1.a1b218e84e61p+34 | 0x1.b220f0d144daep-111 | ||
723 | 700 | v_arg2 = 0x1.564fcc2527961p-265 | 0x1.ea85a4154721ep+733 | ||
724 | 701 | @@ -1318,22 +1318,22 @@ | ||
725 | 702 | v_arg1 = -0x1.7499a639673a6p-100 | -0x1.2a0d737e6cb1cp-207 | ||
726 | 703 | v_arg2 = -0x1.01ad4670a7aa3p-911 | 0x1.f94385e1021e8p+317 | ||
727 | 704 | v_arg3 = 0x1.aa42b2bb17af9p+982 | 0x1.c550e471711p+786 | ||
728 | 705 | - v_result = -0x1.aa42b2bb17af8p+982 | 0x0p+0 | ||
729 | 706 | + v_result = -0x1.aa42b2bb17af8p+982 | -- | ||
730 | 707 | insn wfmsdb: | ||
731 | 708 | v_arg1 = 0x1.76840f99b431ep+500 | -0x1.989a500c92c08p+594 | ||
732 | 709 | v_arg2 = 0x1.33c657cb8385cp-84 | -0x1.2c795ad92ce17p+807 | ||
733 | 710 | v_arg3 = -0x1.ee58a39f02d54p-351 | -0x1.18695ed9a280ap+48 | ||
734 | 711 | - v_result = 0x1.c242894a0068p+416 | 0x0p+0 | ||
735 | 712 | + v_result = 0x1.c242894a0068p+416 | -- | ||
736 | 713 | insn wfmsdb: | ||
737 | 714 | v_arg1 = -0x1.16db07e054a65p-469 | -0x1.3a627ab99c6e4p+689 | ||
738 | 715 | v_arg2 = 0x1.17872eae826e5p-538 | 0x1.44ed513fb5873p-929 | ||
739 | 716 | v_arg3 = 0x1.5ca912008e077p-217 | -0x1.982a6f7359876p-23 | ||
740 | 717 | - v_result = -0x1.5ca912008e077p-217 | 0x0p+0 | ||
741 | 718 | + v_result = -0x1.5ca912008e077p-217 | -- | ||
742 | 719 | insn wfmsdb: | ||
743 | 720 | v_arg1 = -0x1.d315f4a932c6p+122 | 0x1.616a04493e143p+513 | ||
744 | 721 | v_arg2 = -0x1.cf1cd3516f23fp+552 | 0x1.7121749c3932cp-750 | ||
745 | 722 | v_arg3 = 0x1.dc26d92304d7fp-192 | -0x1.1fc3cca9ec20ep+371 | ||
746 | 723 | - v_result = 0x1.a67ca6ba395bcp+675 | 0x0p+0 | ||
747 | 724 | + v_result = 0x1.a67ca6ba395bcp+675 | -- | ||
748 | 725 | insn wfcdb: | ||
749 | 726 | v_arg1 = 0x1.302001b736011p-633 | -0x1.72d5300225c97p-468 | ||
750 | 727 | v_arg2 = -0x1.8c007c5aba108p-17 | -0x1.bb3f9ae136acdp+569 | ||
751 | 728 | @@ -1383,19 +1383,19 @@ | ||
752 | 729 | v_arg1 = 0x1.d8e5c9930c19dp+623 | -0x1.cf1facff4e194p-605 | ||
753 | 730 | v_arg2 = -0x1.ed6ba02646d0dp+441 | -0x1.2d677e710620bp+810 | ||
754 | 731 | insn wfcedb: | ||
755 | 732 | - v_result = 0000000000000000 | 0000000000000000 | ||
756 | 733 | + v_result = 0000000000000000 | -- | ||
757 | 734 | v_arg1 = -0x1.a252009e1a12cp-442 | 0x1.4dc608268bb29p-513 | ||
758 | 735 | v_arg2 = -0x1.81020aa1a36e6p-687 | -0x1.300e64ce414f1p-899 | ||
759 | 736 | insn wfcedb: | ||
760 | 737 | - v_result = 0000000000000000 | 0000000000000000 | ||
761 | 738 | + v_result = 0000000000000000 | -- | ||
762 | 739 | v_arg1 = 0x1.cec439a8d4781p-175 | -0x1.d20e3b281d599p+893 | ||
763 | 740 | v_arg2 = 0x1.ca17cf16cf0aap-879 | 0x1.61506f8596092p+545 | ||
764 | 741 | insn wfcedb: | ||
765 | 742 | - v_result = 0000000000000000 | 0000000000000000 | ||
766 | 743 | + v_result = 0000000000000000 | -- | ||
767 | 744 | v_arg1 = 0x1.0659f5f24a004p+877 | 0x1.fc46867ed0338p-680 | ||
768 | 745 | v_arg2 = -0x1.1d6849587155ep-1010 | -0x1.f68171edc235fp+575 | ||
769 | 746 | insn wfcedb: | ||
770 | 747 | - v_result = 0000000000000000 | 0000000000000000 | ||
771 | 748 | + v_result = 0000000000000000 | -- | ||
772 | 749 | v_arg1 = 0x1.dc88a0d46ad79p-816 | 0x1.245140dcaed79p+851 | ||
773 | 750 | v_arg2 = 0x1.b33e977c7b3ep-818 | -0x1.04319d7c69367p+787 | ||
774 | 751 | insn vfcedbs: | ||
775 | 752 | @@ -1419,22 +1419,22 @@ | ||
776 | 753 | v_arg2 = 0x1.ae2c06ea88ff4p+332 | -0x1.f668ce4f8ef9ap+821 | ||
777 | 754 | r_result = 0000000000000003 | ||
778 | 755 | insn wfcedbs: | ||
779 | 756 | - v_result = 0000000000000000 | 0000000000000000 | ||
780 | 757 | + v_result = 0000000000000000 | -- | ||
781 | 758 | v_arg1 = 0x1.645261bf86b1fp-996 | 0x1.abd13c95397aap+992 | ||
782 | 759 | v_arg2 = -0x1.ba09e8fc66a8cp+113 | 0x1.75dbfe92c16c4p-786 | ||
783 | 760 | r_result = 0000000000000003 | ||
784 | 761 | insn wfcedbs: | ||
785 | 762 | - v_result = 0000000000000000 | 0000000000000000 | ||
786 | 763 | + v_result = 0000000000000000 | -- | ||
787 | 764 | v_arg1 = -0x1.d02831d003e7dp+415 | -0x1.611a9dfd10f36p-80 | ||
788 | 765 | v_arg2 = -0x1.10bda62f4647p+723 | 0x1.cc47af6653378p-614 | ||
789 | 766 | r_result = 0000000000000003 | ||
790 | 767 | insn wfcedbs: | ||
791 | 768 | - v_result = 0000000000000000 | 0000000000000000 | ||
792 | 769 | + v_result = 0000000000000000 | -- | ||
793 | 770 | v_arg1 = 0x1.f168f32f84178p-321 | -0x1.79a2a0b9549d1p-136 | ||
794 | 771 | v_arg2 = 0x1.41e19d1cfa692p+11 | -0x1.2a0ed6e7fd517p-453 | ||
795 | 772 | r_result = 0000000000000003 | ||
796 | 773 | insn wfcedbs: | ||
797 | 774 | - v_result = 0000000000000000 | 0000000000000000 | ||
798 | 775 | + v_result = 0000000000000000 | -- | ||
799 | 776 | v_arg1 = -0x1.76a9144ee26c5p+188 | -0x1.386aaea2d9cddp-542 | ||
800 | 777 | v_arg2 = 0x1.810fcf222efc4p-999 | -0x1.ce90a9a43e2a1p+80 | ||
801 | 778 | r_result = 0000000000000003 | ||
802 | 779 | @@ -1455,19 +1455,19 @@ | ||
803 | 780 | v_arg1 = 0x1.82be31fb88a2dp+946 | -0x1.7ca9e9ff31953p-931 | ||
804 | 781 | v_arg2 = 0x1.fe75a1052beccp+490 | 0x1.179d18543d678p-255 | ||
805 | 782 | insn wfchdb: | ||
806 | 783 | - v_result = ffffffffffffffff | 0000000000000000 | ||
807 | 784 | + v_result = ffffffffffffffff | -- | ||
808 | 785 | v_arg1 = 0x1.0af85d8d8d609p-464 | -0x1.9f639a686e0fep+203 | ||
809 | 786 | v_arg2 = -0x1.3142b77b55761p-673 | 0x1.ca9c474339da1p+472 | ||
810 | 787 | insn wfchdb: | ||
811 | 788 | - v_result = ffffffffffffffff | 0000000000000000 | ||
812 | 789 | + v_result = ffffffffffffffff | -- | ||
813 | 790 | v_arg1 = -0x1.6cf16959a022bp+213 | 0x1.445606e4363e1p+942 | ||
814 | 791 | v_arg2 = -0x1.8c343201bbd2p+939 | -0x1.e5095ad0c37a4p-434 | ||
815 | 792 | insn wfchdb: | ||
816 | 793 | - v_result = ffffffffffffffff | 0000000000000000 | ||
817 | 794 | + v_result = ffffffffffffffff | -- | ||
818 | 795 | v_arg1 = 0x1.36b4fc9cf5bdap-52 | -0x1.f1fd95cbcd533p+540 | ||
819 | 796 | v_arg2 = 0x1.5a2362891c9edp-175 | -0x1.e1f68c319e5d2p+58 | ||
820 | 797 | insn wfchdb: | ||
821 | 798 | - v_result = ffffffffffffffff | 0000000000000000 | ||
822 | 799 | + v_result = ffffffffffffffff | -- | ||
823 | 800 | v_arg1 = 0x1.11c6489f544bbp+811 | 0x1.262a740ec3d47p+456 | ||
824 | 801 | v_arg2 = -0x1.d9394d354e989p-154 | 0x1.cc21b3094391ap-972 | ||
825 | 802 | insn vfchdbs: | ||
826 | 803 | @@ -1491,22 +1491,22 @@ | ||
827 | 804 | v_arg2 = 0x1.e426748435a76p+370 | 0x1.8702527d17783p-871 | ||
828 | 805 | r_result = 0000000000000003 | ||
829 | 806 | insn wfchdbs: | ||
830 | 807 | - v_result = ffffffffffffffff | 0000000000000000 | ||
831 | 808 | + v_result = ffffffffffffffff | -- | ||
832 | 809 | v_arg1 = 0x1.6c51b9f6442c8p+639 | 0x1.1e6b37adff703p+702 | ||
833 | 810 | v_arg2 = 0x1.0cba9c1c75e43p+520 | -0x1.145d44ed90967p+346 | ||
834 | 811 | r_result = 0000000000000000 | ||
835 | 812 | insn wfchdbs: | ||
836 | 813 | - v_result = ffffffffffffffff | 0000000000000000 | ||
837 | 814 | + v_result = ffffffffffffffff | -- | ||
838 | 815 | v_arg1 = 0x1.7b3dd643bf36bp+816 | -0x1.61ce7bfb9307ap-683 | ||
839 | 816 | v_arg2 = -0x1.f2c998dc15c9ap-776 | 0x1.e16397f2dcdf5p+571 | ||
840 | 817 | r_result = 0000000000000000 | ||
841 | 818 | insn wfchdbs: | ||
842 | 819 | - v_result = ffffffffffffffff | 0000000000000000 | ||
843 | 820 | + v_result = ffffffffffffffff | -- | ||
844 | 821 | v_arg1 = 0x1.cc3be81884e0ap-865 | -0x1.8b353bd41064p+820 | ||
845 | 822 | v_arg2 = -0x1.2c1bafaafdd4ep-34 | -0x1.24666808ab16ep-435 | ||
846 | 823 | r_result = 0000000000000000 | ||
847 | 824 | insn wfchdbs: | ||
848 | 825 | - v_result = ffffffffffffffff | 0000000000000000 | ||
849 | 826 | + v_result = ffffffffffffffff | -- | ||
850 | 827 | v_arg1 = 0x1.c3de33d3b673ap+554 | 0x1.d39ed71e53096p-798 | ||
851 | 828 | v_arg2 = -0x1.c1e8f7b3c001p-828 | 0x1.22e2cf797fabp-787 | ||
852 | 829 | r_result = 0000000000000000 | ||
853 | 830 | @@ -1527,19 +1527,19 @@ | ||
854 | 831 | v_arg1 = -0x1.6c5599e7ba923p+829 | -0x1.5d1a1191ed6eap-994 | ||
855 | 832 | v_arg2 = -0x1.555c8775bc4d2p-478 | -0x1.4aa6a2c82319cp+493 | ||
856 | 833 | insn wfchedb: | ||
857 | 834 | - v_result = ffffffffffffffff | 0000000000000000 | ||
858 | 835 | + v_result = ffffffffffffffff | -- | ||
859 | 836 | v_arg1 = 0x1.ae6cad07b0f3ep-232 | -0x1.2ed61a43f3b99p-74 | ||
860 | 837 | v_arg2 = -0x1.226f7cddbde13p-902 | -0x1.790d1d6febbf8p+336 | ||
861 | 838 | insn wfchedb: | ||
862 | 839 | - v_result = ffffffffffffffff | 0000000000000000 | ||
863 | 840 | + v_result = ffffffffffffffff | -- | ||
864 | 841 | v_arg1 = 0x1.20eb8eac3711dp-385 | 0x1.ef71d3312d7e1p+739 | ||
865 | 842 | v_arg2 = 0x1.7a3ba08c5a0bdp-823 | -0x1.a7845ccaa544dp-129 | ||
866 | 843 | insn wfchedb: | ||
867 | 844 | - v_result = 0000000000000000 | 0000000000000000 | ||
868 | 845 | + v_result = 0000000000000000 | -- | ||
869 | 846 | v_arg1 = -0x1.97ebdbc057be8p+824 | 0x1.2b7798b063cd6p+237 | ||
870 | 847 | v_arg2 = 0x1.cdb87a6074294p-81 | -0x1.074c902b19bccp-416 | ||
871 | 848 | insn wfchedb: | ||
872 | 849 | - v_result = 0000000000000000 | 0000000000000000 | ||
873 | 850 | + v_result = 0000000000000000 | -- | ||
874 | 851 | v_arg1 = -0x1.82deebf9ff023p+937 | 0x1.56c5adcf9d4abp-672 | ||
875 | 852 | v_arg2 = -0x1.311ce49bc9439p+561 | 0x1.c8e1c512d8544p+103 | ||
876 | 853 | insn vfchedbs: | ||
877 | 854 | @@ -1563,22 +1563,22 @@ | ||
878 | 855 | v_arg2 = -0x1.47f5dfc7a5bcp-569 | 0x1.5877ef33664a3p-758 | ||
879 | 856 | r_result = 0000000000000003 | ||
880 | 857 | insn wfchedbs: | ||
881 | 858 | - v_result = 0000000000000000 | 0000000000000000 | ||
882 | 859 | + v_result = 0000000000000000 | -- | ||
883 | 860 | v_arg1 = -0x1.a7370ccfd9e49p+505 | 0x1.c6b2385850ca2p-591 | ||
884 | 861 | v_arg2 = 0x1.984f4fcd338b1p+675 | -0x1.feb996c821232p-39 | ||
885 | 862 | r_result = 0000000000000003 | ||
886 | 863 | insn wfchedbs: | ||
887 | 864 | - v_result = ffffffffffffffff | 0000000000000000 | ||
888 | 865 | + v_result = ffffffffffffffff | -- | ||
889 | 866 | v_arg1 = 0x1.641878612dd2p+207 | 0x1.b35e3292db7f6p+567 | ||
890 | 867 | v_arg2 = -0x1.18a87f209e96bp+299 | -0x1.3d598f3612d8ap+1016 | ||
891 | 868 | r_result = 0000000000000000 | ||
892 | 869 | insn wfchedbs: | ||
893 | 870 | - v_result = ffffffffffffffff | 0000000000000000 | ||
894 | 871 | + v_result = ffffffffffffffff | -- | ||
895 | 872 | v_arg1 = 0x1.cfc2cda244153p+404 | 0x1.d8b2b28e9d8d7p+276 | ||
896 | 873 | v_arg2 = 0x1.3517b8c7a59a1p-828 | 0x1.6096fab7003ccp-415 | ||
897 | 874 | r_result = 0000000000000000 | ||
898 | 875 | insn wfchedbs: | ||
899 | 876 | - v_result = 0000000000000000 | 0000000000000000 | ||
900 | 877 | + v_result = 0000000000000000 | -- | ||
901 | 878 | v_arg1 = -0x1.54d656f033e56p-603 | -0x1.95ad0e2088967p+254 | ||
902 | 879 | v_arg2 = 0x1.4cb319db206e4p-614 | 0x1.b41cd9e3739b6p-862 | ||
903 | 880 | r_result = 0000000000000003 | ||
904 | 881 | --- a/none/tests/s390x/vector.h | ||
905 | 882 | +++ b/none/tests/s390x/vector.h | ||
906 | 883 | @@ -86,6 +86,13 @@ | ||
907 | 884 | printf("%016lx | %016lx\n", value.u64[0], value.u64[1]); | ||
908 | 885 | } | ||
909 | 886 | |||
910 | 887 | +void print_hex64(const V128 value, int zero_only) { | ||
911 | 888 | + if (zero_only) | ||
912 | 889 | + printf("%016lx | --\n", value.u64[0]); | ||
913 | 890 | + else | ||
914 | 891 | + printf("%016lx | %016lx\n", value.u64[0], value.u64[1]); | ||
915 | 892 | +} | ||
916 | 893 | + | ||
917 | 894 | void print_f32(const V128 value, int even_only, int zero_only) { | ||
918 | 895 | if (zero_only) | ||
919 | 896 | printf("%a | -- | -- | --\n", value.f32[0]); | ||
920 | 897 | @@ -222,8 +229,10 @@ | ||
921 | 898 | {printf(" v_arg2 = "); print_hex(v_arg2);} \ | ||
922 | 899 | if (info & V128_V_ARG3_AS_INT) \ | ||
923 | 900 | {printf(" v_arg3 = "); print_hex(v_arg3);} \ | ||
924 | 901 | - if (info & V128_V_RES_AS_INT) \ | ||
925 | 902 | - {printf(" v_result = "); print_hex(v_result);} \ | ||
926 | 903 | + if (info & V128_V_RES_AS_INT) { \ | ||
927 | 904 | + printf(" v_result = "); \ | ||
928 | 905 | + print_hex64(v_result, info & V128_V_RES_ZERO_ONLY); \ | ||
929 | 906 | + } \ | ||
930 | 907 | \ | ||
931 | 908 | if (info & V128_V_ARG1_AS_FLOAT64) \ | ||
932 | 909 | {printf(" v_arg1 = "); print_f64(v_arg1, 0);} \ | ||
933 | 910 | --- a/VEX/priv/guest_s390_defs.h | ||
934 | 911 | +++ b/VEX/priv/guest_s390_defs.h | ||
935 | 912 | @@ -8,7 +8,7 @@ | ||
936 | 913 | This file is part of Valgrind, a dynamic binary instrumentation | ||
937 | 914 | framework. | ||
938 | 915 | |||
939 | 916 | - Copyright IBM Corp. 2010-2017 | ||
940 | 917 | + Copyright IBM Corp. 2010-2020 | ||
941 | 918 | |||
942 | 919 | This program is free software; you can redistribute it and/or | ||
943 | 920 | modify it under the terms of the GNU General Public License as | ||
944 | 921 | @@ -263,26 +263,27 @@ | ||
945 | 922 | before S390_VEC_OP_LAST. */ | ||
946 | 923 | typedef enum { | ||
947 | 924 | S390_VEC_OP_INVALID = 0, | ||
948 | 925 | - S390_VEC_OP_VPKS = 1, | ||
949 | 926 | - S390_VEC_OP_VPKLS = 2, | ||
950 | 927 | - S390_VEC_OP_VFAE = 3, | ||
951 | 928 | - S390_VEC_OP_VFEE = 4, | ||
952 | 929 | - S390_VEC_OP_VFENE = 5, | ||
953 | 930 | - S390_VEC_OP_VISTR = 6, | ||
954 | 931 | - S390_VEC_OP_VSTRC = 7, | ||
955 | 932 | - S390_VEC_OP_VCEQ = 8, | ||
956 | 933 | - S390_VEC_OP_VTM = 9, | ||
957 | 934 | - S390_VEC_OP_VGFM = 10, | ||
958 | 935 | - S390_VEC_OP_VGFMA = 11, | ||
959 | 936 | - S390_VEC_OP_VMAH = 12, | ||
960 | 937 | - S390_VEC_OP_VMALH = 13, | ||
961 | 938 | - S390_VEC_OP_VCH = 14, | ||
962 | 939 | - S390_VEC_OP_VCHL = 15, | ||
963 | 940 | - S390_VEC_OP_VFCE = 16, | ||
964 | 941 | - S390_VEC_OP_VFCH = 17, | ||
965 | 942 | - S390_VEC_OP_VFCHE = 18, | ||
966 | 943 | - S390_VEC_OP_VFTCI = 19, | ||
967 | 944 | - S390_VEC_OP_LAST = 20 // supposed to be the last element in enum | ||
968 | 945 | + S390_VEC_OP_VPKS, | ||
969 | 946 | + S390_VEC_OP_VPKLS, | ||
970 | 947 | + S390_VEC_OP_VFAE, | ||
971 | 948 | + S390_VEC_OP_VFEE, | ||
972 | 949 | + S390_VEC_OP_VFENE, | ||
973 | 950 | + S390_VEC_OP_VISTR, | ||
974 | 951 | + S390_VEC_OP_VSTRC, | ||
975 | 952 | + S390_VEC_OP_VCEQ, | ||
976 | 953 | + S390_VEC_OP_VTM, | ||
977 | 954 | + S390_VEC_OP_VGFM, | ||
978 | 955 | + S390_VEC_OP_VGFMA, | ||
979 | 956 | + S390_VEC_OP_VMAH, | ||
980 | 957 | + S390_VEC_OP_VMALH, | ||
981 | 958 | + S390_VEC_OP_VCH, | ||
982 | 959 | + S390_VEC_OP_VCHL, | ||
983 | 960 | + S390_VEC_OP_VFTCI, | ||
984 | 961 | + S390_VEC_OP_VFMIN, | ||
985 | 962 | + S390_VEC_OP_VFMAX, | ||
986 | 963 | + S390_VEC_OP_VBPERM, | ||
987 | 964 | + S390_VEC_OP_VMSL, | ||
988 | 965 | + S390_VEC_OP_LAST // supposed to be the last element in enum | ||
989 | 966 | } s390x_vec_op_t; | ||
990 | 967 | |||
991 | 968 | /* Arguments of s390x_dirtyhelper_vec_op(...) which are packed into one | ||
992 | 969 | --- a/VEX/priv/guest_s390_helpers.c | ||
993 | 970 | +++ b/VEX/priv/guest_s390_helpers.c | ||
994 | 971 | @@ -8,7 +8,7 @@ | ||
995 | 972 | This file is part of Valgrind, a dynamic binary instrumentation | ||
996 | 973 | framework. | ||
997 | 974 | |||
998 | 975 | - Copyright IBM Corp. 2010-2017 | ||
999 | 976 | + Copyright IBM Corp. 2010-2020 | ||
1000 | 977 | |||
1001 | 978 | This program is free software; you can redistribute it and/or | ||
1002 | 979 | modify it under the terms of the GNU General Public License as | ||
1003 | 980 | @@ -314,20 +314,11 @@ | ||
1004 | 981 | /*--- Dirty helper for Store Facility instruction ---*/ | ||
1005 | 982 | /*------------------------------------------------------------*/ | ||
1006 | 983 | #if defined(VGA_s390x) | ||
1007 | 984 | -static void | ||
1008 | 985 | -s390_set_facility_bit(ULong *addr, UInt bitno, UInt value) | ||
1009 | 986 | -{ | ||
1010 | 987 | - addr += bitno / 64; | ||
1011 | 988 | - bitno = bitno % 64; | ||
1012 | 989 | - | ||
1013 | 990 | - ULong mask = 1; | ||
1014 | 991 | - mask <<= (63 - bitno); | ||
1015 | 992 | |||
1016 | 993 | - if (value == 1) { | ||
1017 | 994 | - *addr |= mask; // set | ||
1018 | 995 | - } else { | ||
1019 | 996 | - *addr &= ~mask; // clear | ||
1020 | 997 | - } | ||
1021 | 998 | +static ULong | ||
1022 | 999 | +s390_stfle_range(UInt lo, UInt hi) | ||
1023 | 1000 | +{ | ||
1024 | 1001 | + return ((1UL << (hi + 1 - lo)) - 1) << (63 - (hi % 64)); | ||
1025 | 1002 | } | ||
1026 | 1003 | |||
1027 | 1004 | ULong | ||
1028 | 1005 | @@ -336,6 +327,77 @@ | ||
1029 | 1006 | ULong hoststfle[S390_NUM_FACILITY_DW], cc, num_dw, i; | ||
1030 | 1007 | register ULong reg0 asm("0") = guest_state->guest_r0 & 0xF; /* r0[56:63] */ | ||
1031 | 1008 | |||
1032 | 1009 | + /* Restrict to facilities that we know about and that we assume to be | ||
1033 | 1010 | + compatible with Valgrind. Of course, in this way we may reject features | ||
1034 | 1011 | + that Valgrind is not really involved in (and thus would be compatible | ||
1035 | 1012 | + with), but quering for such features doesn't seem like a typical use | ||
1036 | 1013 | + case. */ | ||
1037 | 1014 | + ULong accepted_facility[S390_NUM_FACILITY_DW] = { | ||
1038 | 1015 | + /* === 0 .. 63 === */ | ||
1039 | 1016 | + (s390_stfle_range(0, 16) | ||
1040 | 1017 | + /* 17: message-security-assist, not supported */ | ||
1041 | 1018 | + | s390_stfle_range(18, 19) | ||
1042 | 1019 | + /* 20: HFP-multiply-and-add/subtract, not supported */ | ||
1043 | 1020 | + | s390_stfle_range(21, 22) | ||
1044 | 1021 | + /* 23: HFP-unnormalized-extension, not supported */ | ||
1045 | 1022 | + | s390_stfle_range(24, 25) | ||
1046 | 1023 | + /* 26: parsing-enhancement, not supported */ | ||
1047 | 1024 | + | s390_stfle_range(27, 28) | ||
1048 | 1025 | + /* 29: unassigned */ | ||
1049 | 1026 | + | s390_stfle_range(30, 30) | ||
1050 | 1027 | + /* 31: extract-CPU-time, not supported */ | ||
1051 | 1028 | + | s390_stfle_range(32, 41) | ||
1052 | 1029 | + /* 42-43: DFP, not fully supported */ | ||
1053 | 1030 | + /* 44: PFPO, not fully supported */ | ||
1054 | 1031 | + | s390_stfle_range(45, 47) | ||
1055 | 1032 | + /* 48: DFP zoned-conversion, not supported */ | ||
1056 | 1033 | + /* 49: includes PPA, not supported */ | ||
1057 | 1034 | + /* 50: constrained transactional-execution, not supported */ | ||
1058 | 1035 | + | s390_stfle_range(51, 55) | ||
1059 | 1036 | + /* 56: unassigned */ | ||
1060 | 1037 | + /* 57: MSA5, not supported */ | ||
1061 | 1038 | + | s390_stfle_range(58, 60) | ||
1062 | 1039 | + /* 61: miscellaneous-instruction 3, not supported */ | ||
1063 | 1040 | + | s390_stfle_range(62, 63)), | ||
1064 | 1041 | + | ||
1065 | 1042 | + /* === 64 .. 127 === */ | ||
1066 | 1043 | + (s390_stfle_range(64, 72) | ||
1067 | 1044 | + /* 73: transactional-execution, not supported */ | ||
1068 | 1045 | + | s390_stfle_range(74, 75) | ||
1069 | 1046 | + /* 76: MSA3, not supported */ | ||
1070 | 1047 | + /* 77: MSA4, not supported */ | ||
1071 | 1048 | + | s390_stfle_range(78, 78) | ||
1072 | 1049 | + /* 80: DFP packed-conversion, not supported */ | ||
1073 | 1050 | + /* 81: PPA-in-order, not supported */ | ||
1074 | 1051 | + | s390_stfle_range(82, 82) | ||
1075 | 1052 | + /* 83-127: unassigned */ ), | ||
1076 | 1053 | + | ||
1077 | 1054 | + /* === 128 .. 191 === */ | ||
1078 | 1055 | + (s390_stfle_range(128, 131) | ||
1079 | 1056 | + /* 132: unassigned */ | ||
1080 | 1057 | + /* 133: guarded-storage, not supported */ | ||
1081 | 1058 | + /* 134: vector packed decimal, not supported */ | ||
1082 | 1059 | + | s390_stfle_range(135, 135) | ||
1083 | 1060 | + /* 136: unassigned */ | ||
1084 | 1061 | + /* 137: unassigned */ | ||
1085 | 1062 | + | s390_stfle_range(138, 142) | ||
1086 | 1063 | + /* 143: unassigned */ | ||
1087 | 1064 | + | s390_stfle_range(144, 145) | ||
1088 | 1065 | + /* 146: MSA8, not supported */ | ||
1089 | 1066 | + | s390_stfle_range(147, 147) | ||
1090 | 1067 | + /* 148: vector-enhancements 2, not supported */ | ||
1091 | 1068 | + | s390_stfle_range(149, 149) | ||
1092 | 1069 | + /* 150: unassigned */ | ||
1093 | 1070 | + /* 151: DEFLATE-conversion, not supported */ | ||
1094 | 1071 | + /* 153: unassigned */ | ||
1095 | 1072 | + /* 154: unassigned */ | ||
1096 | 1073 | + /* 155: MSA9, not supported */ | ||
1097 | 1074 | + | s390_stfle_range(156, 156) | ||
1098 | 1075 | + /* 157-167: unassigned */ | ||
1099 | 1076 | + | s390_stfle_range(168, 168) | ||
1100 | 1077 | + /* 168-191: unassigned */ ), | ||
1101 | 1078 | + }; | ||
1102 | 1079 | + | ||
1103 | 1080 | /* We cannot store more than S390_NUM_FACILITY_DW | ||
1104 | 1081 | (and it makes not much sense to do so anyhow) */ | ||
1105 | 1082 | if (reg0 > S390_NUM_FACILITY_DW - 1) | ||
1106 | 1083 | @@ -351,35 +413,9 @@ | ||
1107 | 1084 | /* Update guest register 0 with what STFLE set r0 to */ | ||
1108 | 1085 | guest_state->guest_r0 = reg0; | ||
1109 | 1086 | |||
1110 | 1087 | - /* Set default: VM facilities = host facilities */ | ||
1111 | 1088 | + /* VM facilities = host facilities, filtered by acceptance */ | ||
1112 | 1089 | for (i = 0; i < num_dw; ++i) | ||
1113 | 1090 | - addr[i] = hoststfle[i]; | ||
1114 | 1091 | - | ||
1115 | 1092 | - /* Now adjust the VM facilities according to what the VM supports */ | ||
1116 | 1093 | - s390_set_facility_bit(addr, S390_FAC_LDISP, 1); | ||
1117 | 1094 | - s390_set_facility_bit(addr, S390_FAC_EIMM, 1); | ||
1118 | 1095 | - s390_set_facility_bit(addr, S390_FAC_ETF2, 1); | ||
1119 | 1096 | - s390_set_facility_bit(addr, S390_FAC_ETF3, 1); | ||
1120 | 1097 | - s390_set_facility_bit(addr, S390_FAC_GIE, 1); | ||
1121 | 1098 | - s390_set_facility_bit(addr, S390_FAC_EXEXT, 1); | ||
1122 | 1099 | - s390_set_facility_bit(addr, S390_FAC_HIGHW, 1); | ||
1123 | 1100 | - s390_set_facility_bit(addr, S390_FAC_LSC2, 1); | ||
1124 | 1101 | - | ||
1125 | 1102 | - s390_set_facility_bit(addr, S390_FAC_HFPMAS, 0); | ||
1126 | 1103 | - s390_set_facility_bit(addr, S390_FAC_HFPUNX, 0); | ||
1127 | 1104 | - s390_set_facility_bit(addr, S390_FAC_XCPUT, 0); | ||
1128 | 1105 | - s390_set_facility_bit(addr, S390_FAC_MSA, 0); | ||
1129 | 1106 | - s390_set_facility_bit(addr, S390_FAC_PENH, 0); | ||
1130 | 1107 | - s390_set_facility_bit(addr, S390_FAC_DFP, 0); | ||
1131 | 1108 | - s390_set_facility_bit(addr, S390_FAC_PFPO, 0); | ||
1132 | 1109 | - s390_set_facility_bit(addr, S390_FAC_DFPZC, 0); | ||
1133 | 1110 | - s390_set_facility_bit(addr, S390_FAC_MISC, 0); | ||
1134 | 1111 | - s390_set_facility_bit(addr, S390_FAC_CTREXE, 0); | ||
1135 | 1112 | - s390_set_facility_bit(addr, S390_FAC_TREXE, 0); | ||
1136 | 1113 | - s390_set_facility_bit(addr, S390_FAC_MSA4, 0); | ||
1137 | 1114 | - s390_set_facility_bit(addr, S390_FAC_VXE, 0); | ||
1138 | 1115 | - s390_set_facility_bit(addr, S390_FAC_VXE2, 0); | ||
1139 | 1116 | - s390_set_facility_bit(addr, S390_FAC_DFLT, 0); | ||
1140 | 1117 | + addr[i] = hoststfle[i] & accepted_facility[i]; | ||
1141 | 1118 | |||
1142 | 1119 | return cc; | ||
1143 | 1120 | } | ||
1144 | 1121 | @@ -2500,25 +2536,26 @@ | ||
1145 | 1122 | vassert(d->op > S390_VEC_OP_INVALID && d->op < S390_VEC_OP_LAST); | ||
1146 | 1123 | static const UChar opcodes[][2] = { | ||
1147 | 1124 | {0x00, 0x00}, /* invalid */ | ||
1148 | 1125 | - {0xe7, 0x97}, /* VPKS */ | ||
1149 | 1126 | - {0xe7, 0x95}, /* VPKLS */ | ||
1150 | 1127 | - {0xe7, 0x82}, /* VFAE */ | ||
1151 | 1128 | - {0xe7, 0x80}, /* VFEE */ | ||
1152 | 1129 | - {0xe7, 0x81}, /* VFENE */ | ||
1153 | 1130 | - {0xe7, 0x5c}, /* VISTR */ | ||
1154 | 1131 | - {0xe7, 0x8a}, /* VSTRC */ | ||
1155 | 1132 | - {0xe7, 0xf8}, /* VCEQ */ | ||
1156 | 1133 | - {0xe7, 0xd8}, /* VTM */ | ||
1157 | 1134 | - {0xe7, 0xb4}, /* VGFM */ | ||
1158 | 1135 | - {0xe7, 0xbc}, /* VGFMA */ | ||
1159 | 1136 | - {0xe7, 0xab}, /* VMAH */ | ||
1160 | 1137 | - {0xe7, 0xa9}, /* VMALH */ | ||
1161 | 1138 | - {0xe7, 0xfb}, /* VCH */ | ||
1162 | 1139 | - {0xe7, 0xf9}, /* VCHL */ | ||
1163 | 1140 | - {0xe7, 0xe8}, /* VFCE */ | ||
1164 | 1141 | - {0xe7, 0xeb}, /* VFCH */ | ||
1165 | 1142 | - {0xe7, 0xea}, /* VFCHE */ | ||
1166 | 1143 | - {0xe7, 0x4a} /* VFTCI */ | ||
1167 | 1144 | + [S390_VEC_OP_VPKS] = {0xe7, 0x97}, | ||
1168 | 1145 | + [S390_VEC_OP_VPKLS] = {0xe7, 0x95}, | ||
1169 | 1146 | + [S390_VEC_OP_VFAE] = {0xe7, 0x82}, | ||
1170 | 1147 | + [S390_VEC_OP_VFEE] = {0xe7, 0x80}, | ||
1171 | 1148 | + [S390_VEC_OP_VFENE] = {0xe7, 0x81}, | ||
1172 | 1149 | + [S390_VEC_OP_VISTR] = {0xe7, 0x5c}, | ||
1173 | 1150 | + [S390_VEC_OP_VSTRC] = {0xe7, 0x8a}, | ||
1174 | 1151 | + [S390_VEC_OP_VCEQ] = {0xe7, 0xf8}, | ||
1175 | 1152 | + [S390_VEC_OP_VTM] = {0xe7, 0xd8}, | ||
1176 | 1153 | + [S390_VEC_OP_VGFM] = {0xe7, 0xb4}, | ||
1177 | 1154 | + [S390_VEC_OP_VGFMA] = {0xe7, 0xbc}, | ||
1178 | 1155 | + [S390_VEC_OP_VMAH] = {0xe7, 0xab}, | ||
1179 | 1156 | + [S390_VEC_OP_VMALH] = {0xe7, 0xa9}, | ||
1180 | 1157 | + [S390_VEC_OP_VCH] = {0xe7, 0xfb}, | ||
1181 | 1158 | + [S390_VEC_OP_VCHL] = {0xe7, 0xf9}, | ||
1182 | 1159 | + [S390_VEC_OP_VFTCI] = {0xe7, 0x4a}, | ||
1183 | 1160 | + [S390_VEC_OP_VFMIN] = {0xe7, 0xee}, | ||
1184 | 1161 | + [S390_VEC_OP_VFMAX] = {0xe7, 0xef}, | ||
1185 | 1162 | + [S390_VEC_OP_VBPERM]= {0xe7, 0x85}, | ||
1186 | 1163 | + [S390_VEC_OP_VMSL] = {0xe7, 0xb8}, | ||
1187 | 1164 | }; | ||
1188 | 1165 | |||
1189 | 1166 | union { | ||
1190 | 1167 | @@ -2612,6 +2649,7 @@ | ||
1191 | 1168 | case S390_VEC_OP_VGFMA: | ||
1192 | 1169 | case S390_VEC_OP_VMAH: | ||
1193 | 1170 | case S390_VEC_OP_VMALH: | ||
1194 | 1171 | + case S390_VEC_OP_VMSL: | ||
1195 | 1172 | the_insn.VRRd.v1 = 1; | ||
1196 | 1173 | the_insn.VRRd.v2 = 2; | ||
1197 | 1174 | the_insn.VRRd.v3 = 3; | ||
1198 | 1175 | @@ -2621,9 +2659,9 @@ | ||
1199 | 1176 | the_insn.VRRd.m6 = d->m5; | ||
1200 | 1177 | break; | ||
1201 | 1178 | |||
1202 | 1179 | - case S390_VEC_OP_VFCE: | ||
1203 | 1180 | - case S390_VEC_OP_VFCH: | ||
1204 | 1181 | - case S390_VEC_OP_VFCHE: | ||
1205 | 1182 | + case S390_VEC_OP_VFMIN: | ||
1206 | 1183 | + case S390_VEC_OP_VFMAX: | ||
1207 | 1184 | + case S390_VEC_OP_VBPERM: | ||
1208 | 1185 | the_insn.VRRc.v1 = 1; | ||
1209 | 1186 | the_insn.VRRc.v2 = 2; | ||
1210 | 1187 | the_insn.VRRc.v3 = 3; | ||
1211 | 1188 | --- a/VEX/priv/guest_s390_toIR.c | ||
1212 | 1189 | +++ b/VEX/priv/guest_s390_toIR.c | ||
1213 | 1190 | @@ -8,7 +8,7 @@ | ||
1214 | 1191 | This file is part of Valgrind, a dynamic binary instrumentation | ||
1215 | 1192 | framework. | ||
1216 | 1193 | |||
1217 | 1194 | - Copyright IBM Corp. 2010-2017 | ||
1218 | 1195 | + Copyright IBM Corp. 2010-2020 | ||
1219 | 1196 | |||
1220 | 1197 | This program is free software; you can redistribute it and/or | ||
1221 | 1198 | modify it under the terms of the GNU General Public License as | ||
1222 | 1199 | @@ -248,6 +248,13 @@ | ||
1223 | 1200 | #define VRS_d2(insn) (((insn) >> 32) & 0xfff) | ||
1224 | 1201 | #define VRS_m4(insn) (((insn) >> 28) & 0xf) | ||
1225 | 1202 | #define VRS_rxb(insn) (((insn) >> 24) & 0xf) | ||
1226 | 1203 | +#define VRSd_v1(insn) (((insn) >> 28) & 0xf) | ||
1227 | 1204 | +#define VRSd_r3(insn) (((insn) >> 48) & 0xf) | ||
1228 | 1205 | +#define VSI_i3(insn) (((insn) >> 48) & 0xff) | ||
1229 | 1206 | +#define VSI_b2(insn) (((insn) >> 44) & 0xf) | ||
1230 | 1207 | +#define VSI_d2(insn) (((insn) >> 32) & 0xfff) | ||
1231 | 1208 | +#define VSI_v1(insn) (((insn) >> 28) & 0xf) | ||
1232 | 1209 | +#define VSI_rxb(insn) (((insn) >> 24) & 0xf) | ||
1233 | 1210 | |||
1234 | 1211 | |||
1235 | 1212 | /*------------------------------------------------------------*/ | ||
1236 | 1213 | @@ -1937,6 +1944,26 @@ | ||
1237 | 1214 | return results[m]; | ||
1238 | 1215 | } | ||
1239 | 1216 | |||
1240 | 1217 | +/* Determine IRType from instruction's floating-point format field */ | ||
1241 | 1218 | +static IRType | ||
1242 | 1219 | +s390_vr_get_ftype(const UChar m) | ||
1243 | 1220 | +{ | ||
1244 | 1221 | + static const IRType results[] = {Ity_F32, Ity_F64, Ity_F128}; | ||
1245 | 1222 | + if (m >= 2 && m <= 4) | ||
1246 | 1223 | + return results[m - 2]; | ||
1247 | 1224 | + return Ity_INVALID; | ||
1248 | 1225 | +} | ||
1249 | 1226 | + | ||
1250 | 1227 | +/* Determine number of elements from instruction's floating-point format | ||
1251 | 1228 | + field */ | ||
1252 | 1229 | +static UChar | ||
1253 | 1230 | +s390_vr_get_n_elem(const UChar m) | ||
1254 | 1231 | +{ | ||
1255 | 1232 | + if (m >= 2 && m <= 4) | ||
1256 | 1233 | + return 1 << (4 - m); | ||
1257 | 1234 | + return 0; | ||
1258 | 1235 | +} | ||
1259 | 1236 | + | ||
1260 | 1237 | /* Determine if Condition Code Set (CS) flag is set in m field */ | ||
1261 | 1238 | #define s390_vr_is_cs_set(m) (((m) & 0x1) != 0) | ||
1262 | 1239 | |||
1263 | 1240 | @@ -2191,12 +2218,15 @@ | ||
1264 | 1241 | goto invalidIndex; | ||
1265 | 1242 | } | ||
1266 | 1243 | return vr_offset(archreg) + sizeof(ULong) * index; | ||
1267 | 1244 | + | ||
1268 | 1245 | case Ity_V128: | ||
1269 | 1246 | + case Ity_F128: | ||
1270 | 1247 | if(index == 0) { | ||
1271 | 1248 | return vr_qw_offset(archreg); | ||
1272 | 1249 | } else { | ||
1273 | 1250 | goto invalidIndex; | ||
1274 | 1251 | } | ||
1275 | 1252 | + | ||
1276 | 1253 | default: | ||
1277 | 1254 | vpanic("s390_vr_offset_by_index: unknown type"); | ||
1278 | 1255 | } | ||
1279 | 1256 | @@ -2214,7 +2244,14 @@ | ||
1280 | 1257 | UInt offset = s390_vr_offset_by_index(archreg, type, index); | ||
1281 | 1258 | vassert(typeOfIRExpr(irsb->tyenv, expr) == type); | ||
1282 | 1259 | |||
1283 | 1260 | - stmt(IRStmt_Put(offset, expr)); | ||
1284 | 1261 | + if (type == Ity_F128) { | ||
1285 | 1262 | + IRTemp val = newTemp(Ity_F128); | ||
1286 | 1263 | + assign(val, expr); | ||
1287 | 1264 | + stmt(IRStmt_Put(offset, unop(Iop_F128HItoF64, mkexpr(val)))); | ||
1288 | 1265 | + stmt(IRStmt_Put(offset + 8, unop(Iop_F128LOtoF64, mkexpr(val)))); | ||
1289 | 1266 | + } else { | ||
1290 | 1267 | + stmt(IRStmt_Put(offset, expr)); | ||
1291 | 1268 | + } | ||
1292 | 1269 | } | ||
1293 | 1270 | |||
1294 | 1271 | /* Read type sized part specified by index of a vr register. */ | ||
1295 | 1272 | @@ -2222,6 +2259,11 @@ | ||
1296 | 1273 | get_vr(UInt archreg, IRType type, UChar index) | ||
1297 | 1274 | { | ||
1298 | 1275 | UInt offset = s390_vr_offset_by_index(archreg, type, index); | ||
1299 | 1276 | + if (type == Ity_F128) { | ||
1300 | 1277 | + return binop(Iop_F64HLtoF128, | ||
1301 | 1278 | + IRExpr_Get(offset, Ity_F64), | ||
1302 | 1279 | + IRExpr_Get(offset + 8, Ity_F64)); | ||
1303 | 1280 | + } | ||
1304 | 1281 | return IRExpr_Get(offset, type); | ||
1305 | 1282 | } | ||
1306 | 1283 | |||
1307 | 1284 | @@ -2297,11 +2339,11 @@ | ||
1308 | 1285 | return mkexpr(output); | ||
1309 | 1286 | } | ||
1310 | 1287 | |||
1311 | 1288 | -/* Load bytes into v1. | ||
1312 | 1289 | - maxIndex specifies max index to load and must be Ity_I32. | ||
1313 | 1290 | - If maxIndex >= 15, all 16 bytes are loaded. | ||
1314 | 1291 | - All bytes after maxIndex are zeroed. */ | ||
1315 | 1292 | -static void s390_vr_loadWithLength(UChar v1, IRTemp addr, IRExpr *maxIndex) | ||
1316 | 1293 | +/* Starting from addr, load at most maxIndex + 1 bytes into v1. Fill the | ||
1317 | 1294 | + leftmost or rightmost bytes of v1, depending on whether `rightmost' is set. | ||
1318 | 1295 | + If maxIndex >= 15, load all 16 bytes; otherwise clear the remaining bytes. */ | ||
1319 | 1296 | +static void | ||
1320 | 1297 | +s390_vr_loadWithLength(UChar v1, IRTemp addr, IRExpr *maxIndex, Bool rightmost) | ||
1321 | 1298 | { | ||
1322 | 1299 | IRTemp maxIdx = newTemp(Ity_I32); | ||
1323 | 1300 | IRTemp cappedMax = newTemp(Ity_I64); | ||
1324 | 1301 | @@ -2314,8 +2356,8 @@ | ||
1325 | 1302 | crossed if and only if the real insn would have crossed it as well. | ||
1326 | 1303 | Thus, if the bytes to load are fully contained in an aligned 16-byte | ||
1327 | 1304 | chunk, load the whole 16-byte aligned chunk, and otherwise load 16 bytes | ||
1328 | 1305 | - from the unaligned address. Then shift the loaded data left-aligned | ||
1329 | 1306 | - into the target vector register. */ | ||
1330 | 1307 | + from the unaligned address. Then shift the loaded data left- or | ||
1331 | 1308 | + right-aligned into the target vector register. */ | ||
1332 | 1309 | |||
1333 | 1310 | assign(maxIdx, maxIndex); | ||
1334 | 1311 | assign(cappedMax, mkite(binop(Iop_CmpLT32U, mkexpr(maxIdx), mkU32(15)), | ||
1335 | 1312 | @@ -2328,20 +2370,60 @@ | ||
1336 | 1313 | assign(back, mkite(binop(Iop_CmpLE64U, mkexpr(offset), mkexpr(zeroed)), | ||
1337 | 1314 | mkexpr(offset), mkU64(0))); | ||
1338 | 1315 | |||
1339 | 1316 | - /* How much to shift the loaded 16-byte vector to the right, and then to | ||
1340 | 1317 | - the left. Since both 'zeroed' and 'back' range from 0 to 15, the shift | ||
1341 | 1318 | - amounts range from 0 to 120. */ | ||
1342 | 1319 | - IRExpr *shrAmount = binop(Iop_Shl64, | ||
1343 | 1320 | - binop(Iop_Sub64, mkexpr(zeroed), mkexpr(back)), | ||
1344 | 1321 | - mkU8(3)); | ||
1345 | 1322 | - IRExpr *shlAmount = binop(Iop_Shl64, mkexpr(zeroed), mkU8(3)); | ||
1346 | 1323 | - | ||
1347 | 1324 | - put_vr_qw(v1, binop(Iop_ShlV128, | ||
1348 | 1325 | - binop(Iop_ShrV128, | ||
1349 | 1326 | - load(Ity_V128, | ||
1350 | 1327 | - binop(Iop_Sub64, mkexpr(addr), mkexpr(back))), | ||
1351 | 1328 | - unop(Iop_64to8, shrAmount)), | ||
1352 | 1329 | - unop(Iop_64to8, shlAmount))); | ||
1353 | 1330 | + IRExpr* chunk = load(Ity_V128, binop(Iop_Sub64, mkexpr(addr), mkexpr(back))); | ||
1354 | 1331 | + | ||
1355 | 1332 | + /* Shift the loaded 16-byte vector to the right, then to the left, or vice | ||
1356 | 1333 | + versa, where each shift amount ranges from 0 to 120. */ | ||
1357 | 1334 | + IRExpr* shift1; | ||
1358 | 1335 | + IRExpr* shift2 = unop(Iop_64to8, binop(Iop_Shl64, mkexpr(zeroed), mkU8(3))); | ||
1359 | 1336 | + | ||
1360 | 1337 | + if (rightmost) { | ||
1361 | 1338 | + shift1 = unop(Iop_64to8, binop(Iop_Shl64, mkexpr(back), mkU8(3))); | ||
1362 | 1339 | + put_vr_qw(v1, binop(Iop_ShrV128, | ||
1363 | 1340 | + binop(Iop_ShlV128, chunk, shift1), | ||
1364 | 1341 | + shift2)); | ||
1365 | 1342 | + } else { | ||
1366 | 1343 | + shift1 = unop(Iop_64to8, | ||
1367 | 1344 | + binop(Iop_Shl64, | ||
1368 | 1345 | + binop(Iop_Sub64, mkexpr(zeroed), mkexpr(back)), | ||
1369 | 1346 | + mkU8(3))); | ||
1370 | 1347 | + put_vr_qw(v1, binop(Iop_ShlV128, | ||
1371 | 1348 | + binop(Iop_ShrV128, chunk, shift1), | ||
1372 | 1349 | + shift2)); | ||
1373 | 1350 | + } | ||
1374 | 1351 | +} | ||
1375 | 1352 | + | ||
1376 | 1353 | +/* Store at most maxIndex + 1 bytes from v1 to addr. Store the leftmost or | ||
1377 | 1354 | + rightmost bytes of v1, depending on whether `rightmost' is set. If maxIndex | ||
1378 | 1355 | + >= 15, store all 16 bytes. */ | ||
1379 | 1356 | +static void | ||
1380 | 1357 | +s390_vr_storeWithLength(UChar v1, IRTemp addr, IRExpr *maxIndex, Bool rightmost) | ||
1381 | 1358 | +{ | ||
1382 | 1359 | + IRTemp maxIdx = newTemp(Ity_I32); | ||
1383 | 1360 | + IRTemp cappedMax = newTemp(Ity_I64); | ||
1384 | 1361 | + IRTemp counter = newTemp(Ity_I64); | ||
1385 | 1362 | + IRExpr* offset; | ||
1386 | 1363 | + | ||
1387 | 1364 | + assign(maxIdx, maxIndex); | ||
1388 | 1365 | + assign(cappedMax, mkite(binop(Iop_CmpLT32U, mkexpr(maxIdx), mkU32(15)), | ||
1389 | 1366 | + unop(Iop_32Uto64, mkexpr(maxIdx)), mkU64(15))); | ||
1390 | 1367 | + | ||
1391 | 1368 | + assign(counter, get_counter_dw0()); | ||
1392 | 1369 | + | ||
1393 | 1370 | + if (rightmost) | ||
1394 | 1371 | + offset = binop(Iop_Add64, | ||
1395 | 1372 | + binop(Iop_Sub64, mkU64(15), mkexpr(cappedMax)), | ||
1396 | 1373 | + mkexpr(counter)); | ||
1397 | 1374 | + else | ||
1398 | 1375 | + offset = mkexpr(counter); | ||
1399 | 1376 | + | ||
1400 | 1377 | + store(binop(Iop_Add64, mkexpr(addr), mkexpr(counter)), | ||
1401 | 1378 | + binop(Iop_GetElem8x16, get_vr_qw(v1), unop(Iop_64to8, offset))); | ||
1402 | 1379 | + | ||
1403 | 1380 | + /* Check for end of field */ | ||
1404 | 1381 | + put_counter_dw0(binop(Iop_Add64, mkexpr(counter), mkU64(1))); | ||
1405 | 1382 | + iterate_if(binop(Iop_CmpNE64, mkexpr(counter), mkexpr(cappedMax))); | ||
1406 | 1383 | + put_counter_dw0(mkU64(0)); | ||
1407 | 1384 | } | ||
1408 | 1385 | |||
1409 | 1386 | /* Bitwise vCond ? v1 : v2 | ||
1410 | 1387 | @@ -3752,6 +3834,28 @@ | ||
1411 | 1388 | s390_disasm(ENC5(MNM, GPR, UDXB, VR, UINT), mnm, r1, d2, 0, b2, v3, m4); | ||
1412 | 1389 | } | ||
1413 | 1390 | |||
1414 | 1391 | +static void | ||
1415 | 1392 | +s390_format_VRS_RRDV(const HChar *(*irgen)(UChar v1, UChar r3, IRTemp op2addr), | ||
1416 | 1393 | + UChar v1, UChar r3, UChar b2, UShort d2, UChar rxb) | ||
1417 | 1394 | +{ | ||
1418 | 1395 | + const HChar *mnm; | ||
1419 | 1396 | + IRTemp op2addr = newTemp(Ity_I64); | ||
1420 | 1397 | + | ||
1421 | 1398 | + if (! s390_host_has_vx) { | ||
1422 | 1399 | + emulation_failure(EmFail_S390X_vx); | ||
1423 | 1400 | + return; | ||
1424 | 1401 | + } | ||
1425 | 1402 | + | ||
1426 | 1403 | + assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : | ||
1427 | 1404 | + mkU64(0))); | ||
1428 | 1405 | + | ||
1429 | 1406 | + v1 = s390_vr_getVRindex(v1, 4, rxb); | ||
1430 | 1407 | + mnm = irgen(v1, r3, op2addr); | ||
1431 | 1408 | + | ||
1432 | 1409 | + if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) | ||
1433 | 1410 | + s390_disasm(ENC4(MNM, VR, GPR, UDXB), mnm, v1, r3, d2, 0, b2); | ||
1434 | 1411 | +} | ||
1435 | 1412 | + | ||
1436 | 1413 | |||
1437 | 1414 | static void | ||
1438 | 1415 | s390_format_VRS_VRDVM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar v3, | ||
1439 | 1416 | @@ -4084,6 +4188,29 @@ | ||
1440 | 1417 | mnm, v1, v2, v3, m4, m5, m6); | ||
1441 | 1418 | } | ||
1442 | 1419 | |||
1443 | 1420 | +static void | ||
1444 | 1421 | +s390_format_VSI_URDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar i3), | ||
1445 | 1422 | + UChar v1, UChar b2, UChar d2, UChar i3, UChar rxb) | ||
1446 | 1423 | +{ | ||
1447 | 1424 | + const HChar *mnm; | ||
1448 | 1425 | + IRTemp op2addr = newTemp(Ity_I64); | ||
1449 | 1426 | + | ||
1450 | 1427 | + if (!s390_host_has_vx) { | ||
1451 | 1428 | + emulation_failure(EmFail_S390X_vx); | ||
1452 | 1429 | + return; | ||
1453 | 1430 | + } | ||
1454 | 1431 | + | ||
1455 | 1432 | + v1 = s390_vr_getVRindex(v1, 4, rxb); | ||
1456 | 1433 | + | ||
1457 | 1434 | + assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : | ||
1458 | 1435 | + mkU64(0))); | ||
1459 | 1436 | + | ||
1460 | 1437 | + mnm = irgen(v1, op2addr, i3); | ||
1461 | 1438 | + | ||
1462 | 1439 | + if (vex_traceflags & VEX_TRACE_FE) | ||
1463 | 1440 | + s390_disasm(ENC4(MNM, VR, UDXB, UINT), mnm, v1, d2, 0, b2, i3); | ||
1464 | 1441 | +} | ||
1465 | 1442 | + | ||
1466 | 1443 | /*------------------------------------------------------------*/ | ||
1467 | 1444 | /*--- Build IR for opcodes ---*/ | ||
1468 | 1445 | /*------------------------------------------------------------*/ | ||
1469 | 1446 | @@ -16183,7 +16310,9 @@ | ||
1470 | 1447 | static const HChar * | ||
1471 | 1448 | s390_irgen_VLLEZ(UChar v1, IRTemp op2addr, UChar m3) | ||
1472 | 1449 | { | ||
1473 | 1450 | - IRType type = s390_vr_get_type(m3); | ||
1474 | 1451 | + s390_insn_assert("vllez", m3 <= 3 || m3 == 6); | ||
1475 | 1452 | + | ||
1476 | 1453 | + IRType type = s390_vr_get_type(m3 & 3); | ||
1477 | 1454 | IRExpr* op2 = load(type, mkexpr(op2addr)); | ||
1478 | 1455 | IRExpr* op2as64bit; | ||
1479 | 1456 | switch (type) { | ||
1480 | 1457 | @@ -16203,7 +16332,13 @@ | ||
1481 | 1458 | vpanic("s390_irgen_VLLEZ: unknown type"); | ||
1482 | 1459 | } | ||
1483 | 1460 | |||
1484 | 1461 | - put_vr_dw0(v1, op2as64bit); | ||
1485 | 1462 | + if (m3 == 6) { | ||
1486 | 1463 | + /* left-aligned */ | ||
1487 | 1464 | + put_vr_dw0(v1, binop(Iop_Shl64, op2as64bit, mkU8(32))); | ||
1488 | 1465 | + } else { | ||
1489 | 1466 | + /* right-aligned */ | ||
1490 | 1467 | + put_vr_dw0(v1, op2as64bit); | ||
1491 | 1468 | + } | ||
1492 | 1469 | put_vr_dw1(v1, mkU64(0)); | ||
1493 | 1470 | return "vllez"; | ||
1494 | 1471 | } | ||
1495 | 1472 | @@ -16612,7 +16747,7 @@ | ||
1496 | 1473 | s390_getCountToBlockBoundary(addr, m3), | ||
1497 | 1474 | mkU32(1)); | ||
1498 | 1475 | |||
1499 | 1476 | - s390_vr_loadWithLength(v1, addr, maxIndex); | ||
1500 | 1477 | + s390_vr_loadWithLength(v1, addr, maxIndex, False); | ||
1501 | 1478 | |||
1502 | 1479 | return "vlbb"; | ||
1503 | 1480 | } | ||
1504 | 1481 | @@ -16620,42 +16755,51 @@ | ||
1505 | 1482 | static const HChar * | ||
1506 | 1483 | s390_irgen_VLL(UChar v1, IRTemp addr, UChar r3) | ||
1507 | 1484 | { | ||
1508 | 1485 | - s390_vr_loadWithLength(v1, addr, get_gpr_w1(r3)); | ||
1509 | 1486 | + s390_vr_loadWithLength(v1, addr, get_gpr_w1(r3), False); | ||
1510 | 1487 | |||
1511 | 1488 | return "vll"; | ||
1512 | 1489 | } | ||
1513 | 1490 | |||
1514 | 1491 | static const HChar * | ||
1515 | 1492 | -s390_irgen_VSTL(UChar v1, IRTemp addr, UChar r3) | ||
1516 | 1493 | +s390_irgen_VLRL(UChar v1, IRTemp addr, UChar i3) | ||
1517 | 1494 | { | ||
1518 | 1495 | - IRTemp counter = newTemp(Ity_I64); | ||
1519 | 1496 | - IRTemp maxIndexToStore = newTemp(Ity_I64); | ||
1520 | 1497 | - IRTemp gpr3 = newTemp(Ity_I64); | ||
1521 | 1498 | + s390_insn_assert("vlrl", (i3 & 0xf0) == 0); | ||
1522 | 1499 | + s390_vr_loadWithLength(v1, addr, mkU32((UInt) i3), True); | ||
1523 | 1500 | |||
1524 | 1501 | - assign(gpr3, unop(Iop_32Uto64, get_gpr_w1(r3))); | ||
1525 | 1502 | - assign(maxIndexToStore, mkite(binop(Iop_CmpLE64U, | ||
1526 | 1503 | - mkexpr(gpr3), | ||
1527 | 1504 | - mkU64(16) | ||
1528 | 1505 | - ), | ||
1529 | 1506 | - mkexpr(gpr3), | ||
1530 | 1507 | - mkU64(16) | ||
1531 | 1508 | - ) | ||
1532 | 1509 | - ); | ||
1533 | 1510 | - | ||
1534 | 1511 | - assign(counter, get_counter_dw0()); | ||
1535 | 1512 | + return "vlrl"; | ||
1536 | 1513 | +} | ||
1537 | 1514 | |||
1538 | 1515 | - store(binop(Iop_Add64, mkexpr(addr), mkexpr(counter)), | ||
1539 | 1516 | - binop(Iop_GetElem8x16, get_vr_qw(v1), unop(Iop_64to8, mkexpr(counter)))); | ||
1540 | 1517 | +static const HChar * | ||
1541 | 1518 | +s390_irgen_VLRLR(UChar v1, UChar r3, IRTemp addr) | ||
1542 | 1519 | +{ | ||
1543 | 1520 | + s390_vr_loadWithLength(v1, addr, get_gpr_w1(r3), True); | ||
1544 | 1521 | |||
1545 | 1522 | - /* Check for end of field */ | ||
1546 | 1523 | - put_counter_dw0(binop(Iop_Add64, mkexpr(counter), mkU64(1))); | ||
1547 | 1524 | - iterate_if(binop(Iop_CmpNE64, mkexpr(counter), mkexpr(maxIndexToStore))); | ||
1548 | 1525 | - put_counter_dw0(mkU64(0)); | ||
1549 | 1526 | + return "vlrlr"; | ||
1550 | 1527 | +} | ||
1551 | 1528 | |||
1552 | 1529 | +static const HChar * | ||
1553 | 1530 | +s390_irgen_VSTL(UChar v1, IRTemp addr, UChar r3) | ||
1554 | 1531 | +{ | ||
1555 | 1532 | + s390_vr_storeWithLength(v1, addr, get_gpr_w1(r3), False); | ||
1556 | 1533 | return "vstl"; | ||
1557 | 1534 | } | ||
1558 | 1535 | |||
1559 | 1536 | static const HChar * | ||
1560 | 1537 | +s390_irgen_VSTRL(UChar v1, IRTemp addr, UChar i3) | ||
1561 | 1538 | +{ | ||
1562 | 1539 | + s390_insn_assert("vstrl", (i3 & 0xf0) == 0); | ||
1563 | 1540 | + s390_vr_storeWithLength(v1, addr, mkU32((UInt) i3), True); | ||
1564 | 1541 | + return "vstrl"; | ||
1565 | 1542 | +} | ||
1566 | 1543 | + | ||
1567 | 1544 | +static const HChar * | ||
1568 | 1545 | +s390_irgen_VSTRLR(UChar v1, UChar r3, IRTemp addr) | ||
1569 | 1546 | +{ | ||
1570 | 1547 | + s390_vr_storeWithLength(v1, addr, get_gpr_w1(r3), True); | ||
1571 | 1548 | + return "vstrlr"; | ||
1572 | 1549 | +} | ||
1573 | 1550 | + | ||
1574 | 1551 | +static const HChar * | ||
1575 | 1552 | s390_irgen_VX(UChar v1, UChar v2, UChar v3) | ||
1576 | 1553 | { | ||
1577 | 1554 | put_vr_qw(v1, binop(Iop_XorV128, get_vr_qw(v2), get_vr_qw(v3))); | ||
1578 | 1555 | @@ -16680,6 +16824,24 @@ | ||
1579 | 1556 | } | ||
1580 | 1557 | |||
1581 | 1558 | static const HChar * | ||
1582 | 1559 | +s390_irgen_VOC(UChar v1, UChar v2, UChar v3) | ||
1583 | 1560 | +{ | ||
1584 | 1561 | + put_vr_qw(v1, binop(Iop_OrV128, get_vr_qw(v2), | ||
1585 | 1562 | + unop(Iop_NotV128, get_vr_qw(v3)))); | ||
1586 | 1563 | + | ||
1587 | 1564 | + return "voc"; | ||
1588 | 1565 | +} | ||
1589 | 1566 | + | ||
1590 | 1567 | +static const HChar * | ||
1591 | 1568 | +s390_irgen_VNN(UChar v1, UChar v2, UChar v3) | ||
1592 | 1569 | +{ | ||
1593 | 1570 | + put_vr_qw(v1, unop(Iop_NotV128, | ||
1594 | 1571 | + binop(Iop_AndV128, get_vr_qw(v2), get_vr_qw(v3)))); | ||
1595 | 1572 | + | ||
1596 | 1573 | + return "vnn"; | ||
1597 | 1574 | +} | ||
1598 | 1575 | + | ||
1599 | 1576 | +static const HChar * | ||
1600 | 1577 | s390_irgen_VNO(UChar v1, UChar v2, UChar v3) | ||
1601 | 1578 | { | ||
1602 | 1579 | put_vr_qw(v1, unop(Iop_NotV128, | ||
1603 | 1580 | @@ -16689,6 +16851,15 @@ | ||
1604 | 1581 | } | ||
1605 | 1582 | |||
1606 | 1583 | static const HChar * | ||
1607 | 1584 | +s390_irgen_VNX(UChar v1, UChar v2, UChar v3) | ||
1608 | 1585 | +{ | ||
1609 | 1586 | + put_vr_qw(v1, unop(Iop_NotV128, | ||
1610 | 1587 | + binop(Iop_XorV128, get_vr_qw(v2), get_vr_qw(v3)))); | ||
1611 | 1588 | + | ||
1612 | 1589 | + return "vnx"; | ||
1613 | 1590 | +} | ||
1614 | 1591 | + | ||
1615 | 1592 | +static const HChar * | ||
1616 | 1593 | s390_irgen_LZRF(UChar r1, IRTemp op2addr) | ||
1617 | 1594 | { | ||
1618 | 1595 | IRTemp op2 = newTemp(Ity_I32); | ||
1619 | 1596 | @@ -17496,9 +17667,19 @@ | ||
1620 | 1597 | static const HChar * | ||
1621 | 1598 | s390_irgen_VPOPCT(UChar v1, UChar v2, UChar m3) | ||
1622 | 1599 | { | ||
1623 | 1600 | - vassert(m3 == 0); | ||
1624 | 1601 | + s390_insn_assert("vpopct", m3 <= 3); | ||
1625 | 1602 | |||
1626 | 1603 | - put_vr_qw(v1, unop(Iop_Cnt8x16, get_vr_qw(v2))); | ||
1627 | 1604 | + IRExpr* cnt = unop(Iop_Cnt8x16, get_vr_qw(v2)); | ||
1628 | 1605 | + | ||
1629 | 1606 | + if (m3 >= 1) { | ||
1630 | 1607 | + cnt = unop(Iop_PwAddL8Ux16, cnt); | ||
1631 | 1608 | + if (m3 >= 2) { | ||
1632 | 1609 | + cnt = unop(Iop_PwAddL16Ux8, cnt); | ||
1633 | 1610 | + if (m3 == 3) | ||
1634 | 1611 | + cnt = unop(Iop_PwAddL32Ux4, cnt); | ||
1635 | 1612 | + } | ||
1636 | 1613 | + } | ||
1637 | 1614 | + put_vr_qw(v1, cnt); | ||
1638 | 1615 | |||
1639 | 1616 | return "vpopct"; | ||
1640 | 1617 | } | ||
1641 | 1618 | @@ -18332,12 +18513,53 @@ | ||
1642 | 1619 | return "vmalh"; | ||
1643 | 1620 | } | ||
1644 | 1621 | |||
1645 | 1622 | +static const HChar * | ||
1646 | 1623 | +s390_irgen_VMSL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) | ||
1647 | 1624 | +{ | ||
1648 | 1625 | + s390_insn_assert("vmsl", m5 == 3 && (m6 & 3) == 0); | ||
1649 | 1626 | + | ||
1650 | 1627 | + IRDirty* d; | ||
1651 | 1628 | + IRTemp cc = newTemp(Ity_I64); | ||
1652 | 1629 | + | ||
1653 | 1630 | + s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
1654 | 1631 | + details.op = S390_VEC_OP_VMSL; | ||
1655 | 1632 | + details.v1 = v1; | ||
1656 | 1633 | + details.v2 = v2; | ||
1657 | 1634 | + details.v3 = v3; | ||
1658 | 1635 | + details.v4 = v4; | ||
1659 | 1636 | + details.m4 = m5; | ||
1660 | 1637 | + details.m5 = m6; | ||
1661 | 1638 | + | ||
1662 | 1639 | + d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
1663 | 1640 | + &s390x_dirtyhelper_vec_op, | ||
1664 | 1641 | + mkIRExprVec_2(IRExpr_GSPTR(), | ||
1665 | 1642 | + mkU64(details.serialized))); | ||
1666 | 1643 | + | ||
1667 | 1644 | + d->nFxState = 4; | ||
1668 | 1645 | + vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
1669 | 1646 | + d->fxState[0].fx = Ifx_Read; | ||
1670 | 1647 | + d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
1671 | 1648 | + d->fxState[0].size = sizeof(V128); | ||
1672 | 1649 | + d->fxState[1].fx = Ifx_Read; | ||
1673 | 1650 | + d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
1674 | 1651 | + d->fxState[1].size = sizeof(V128); | ||
1675 | 1652 | + d->fxState[2].fx = Ifx_Read; | ||
1676 | 1653 | + d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v4 * sizeof(V128); | ||
1677 | 1654 | + d->fxState[2].size = sizeof(V128); | ||
1678 | 1655 | + d->fxState[3].fx = Ifx_Write; | ||
1679 | 1656 | + d->fxState[3].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
1680 | 1657 | + d->fxState[3].size = sizeof(V128); | ||
1681 | 1658 | + | ||
1682 | 1659 | + stmt(IRStmt_Dirty(d)); | ||
1683 | 1660 | + | ||
1684 | 1661 | + return "vmsl"; | ||
1685 | 1662 | +} | ||
1686 | 1663 | + | ||
1687 | 1664 | static void | ||
1688 | 1665 | -s390_vector_fp_convert(IROp op, IRType fromType, IRType toType, | ||
1689 | 1666 | +s390_vector_fp_convert(IROp op, IRType fromType, IRType toType, Bool rounding, | ||
1690 | 1667 | UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1691 | 1668 | { | ||
1692 | 1669 | Bool isSingleElementOp = s390_vr_is_single_element_control_set(m4); | ||
1693 | 1670 | - UChar maxIndex = isSingleElementOp ? 0 : 1; | ||
1694 | 1671 | |||
1695 | 1672 | /* For Iop_F32toF64 we do this: | ||
1696 | 1673 | f32[0] -> f64[0] | ||
1697 | 1674 | @@ -18350,14 +18572,21 @@ | ||
1698 | 1675 | The magic below with scaling factors is used to achieve the logic | ||
1699 | 1676 | described above. | ||
1700 | 1677 | */ | ||
1701 | 1678 | - const UChar sourceIndexScaleFactor = (op == Iop_F32toF64) ? 2 : 1; | ||
1702 | 1679 | - const UChar destinationIndexScaleFactor = (op == Iop_F64toF32) ? 2 : 1; | ||
1703 | 1680 | + Int size_diff = sizeofIRType(toType) - sizeofIRType(fromType); | ||
1704 | 1681 | + const UChar sourceIndexScaleFactor = size_diff > 0 ? 2 : 1; | ||
1705 | 1682 | + const UChar destinationIndexScaleFactor = size_diff < 0 ? 2 : 1; | ||
1706 | 1683 | + UChar n_elem = (isSingleElementOp ? 1 : | ||
1707 | 1684 | + 16 / (size_diff > 0 ? | ||
1708 | 1685 | + sizeofIRType(toType) : sizeofIRType(fromType))); | ||
1709 | 1686 | |||
1710 | 1687 | - const Bool isUnary = (op == Iop_F32toF64); | ||
1711 | 1688 | - for (UChar i = 0; i <= maxIndex; i++) { | ||
1712 | 1689 | + for (UChar i = 0; i < n_elem; i++) { | ||
1713 | 1690 | IRExpr* argument = get_vr(v2, fromType, i * sourceIndexScaleFactor); | ||
1714 | 1691 | IRExpr* result; | ||
1715 | 1692 | - if (!isUnary) { | ||
1716 | 1693 | + if (rounding) { | ||
1717 | 1694 | + if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1718 | 1695 | + emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1719 | 1696 | + m5 = S390_BFP_ROUND_PER_FPC; | ||
1720 | 1697 | + } | ||
1721 | 1698 | result = binop(op, | ||
1722 | 1699 | mkexpr(encode_bfp_rounding_mode(m5)), | ||
1723 | 1700 | argument); | ||
1724 | 1701 | @@ -18366,10 +18595,6 @@ | ||
1725 | 1702 | } | ||
1726 | 1703 | put_vr(v1, toType, i * destinationIndexScaleFactor, result); | ||
1727 | 1704 | } | ||
1728 | 1705 | - | ||
1729 | 1706 | - if (isSingleElementOp) { | ||
1730 | 1707 | - put_vr_dw1(v1, mkU64(0)); | ||
1731 | 1708 | - } | ||
1732 | 1709 | } | ||
1733 | 1710 | |||
1734 | 1711 | static const HChar * | ||
1735 | 1712 | @@ -18377,12 +18602,8 @@ | ||
1736 | 1713 | { | ||
1737 | 1714 | s390_insn_assert("vcdg", m3 == 3); | ||
1738 | 1715 | |||
1739 | 1716 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1740 | 1717 | - emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1741 | 1718 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1742 | 1719 | - } | ||
1743 | 1720 | - | ||
1744 | 1721 | - s390_vector_fp_convert(Iop_I64StoF64, Ity_I64, Ity_F64, v1, v2, m3, m4, m5); | ||
1745 | 1722 | + s390_vector_fp_convert(Iop_I64StoF64, Ity_I64, Ity_F64, True, | ||
1746 | 1723 | + v1, v2, m3, m4, m5); | ||
1747 | 1724 | |||
1748 | 1725 | return "vcdg"; | ||
1749 | 1726 | } | ||
1750 | 1727 | @@ -18392,12 +18613,8 @@ | ||
1751 | 1728 | { | ||
1752 | 1729 | s390_insn_assert("vcdlg", m3 == 3); | ||
1753 | 1730 | |||
1754 | 1731 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1755 | 1732 | - emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1756 | 1733 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1757 | 1734 | - } | ||
1758 | 1735 | - | ||
1759 | 1736 | - s390_vector_fp_convert(Iop_I64UtoF64, Ity_I64, Ity_F64, v1, v2, m3, m4, m5); | ||
1760 | 1737 | + s390_vector_fp_convert(Iop_I64UtoF64, Ity_I64, Ity_F64, True, | ||
1761 | 1738 | + v1, v2, m3, m4, m5); | ||
1762 | 1739 | |||
1763 | 1740 | return "vcdlg"; | ||
1764 | 1741 | } | ||
1765 | 1742 | @@ -18407,12 +18624,8 @@ | ||
1766 | 1743 | { | ||
1767 | 1744 | s390_insn_assert("vcgd", m3 == 3); | ||
1768 | 1745 | |||
1769 | 1746 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1770 | 1747 | - emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1771 | 1748 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1772 | 1749 | - } | ||
1773 | 1750 | - | ||
1774 | 1751 | - s390_vector_fp_convert(Iop_F64toI64S, Ity_F64, Ity_I64, v1, v2, m3, m4, m5); | ||
1775 | 1752 | + s390_vector_fp_convert(Iop_F64toI64S, Ity_F64, Ity_I64, True, | ||
1776 | 1753 | + v1, v2, m3, m4, m5); | ||
1777 | 1754 | |||
1778 | 1755 | return "vcgd"; | ||
1779 | 1756 | } | ||
1780 | 1757 | @@ -18422,12 +18635,8 @@ | ||
1781 | 1758 | { | ||
1782 | 1759 | s390_insn_assert("vclgd", m3 == 3); | ||
1783 | 1760 | |||
1784 | 1761 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1785 | 1762 | - emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1786 | 1763 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1787 | 1764 | - } | ||
1788 | 1765 | - | ||
1789 | 1766 | - s390_vector_fp_convert(Iop_F64toI64U, Ity_F64, Ity_I64, v1, v2, m3, m4, m5); | ||
1790 | 1767 | + s390_vector_fp_convert(Iop_F64toI64U, Ity_F64, Ity_I64, True, | ||
1791 | 1768 | + v1, v2, m3, m4, m5); | ||
1792 | 1769 | |||
1793 | 1770 | return "vclgd"; | ||
1794 | 1771 | } | ||
1795 | 1772 | @@ -18435,246 +18644,262 @@ | ||
1796 | 1773 | static const HChar * | ||
1797 | 1774 | s390_irgen_VFI(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1798 | 1775 | { | ||
1799 | 1776 | - s390_insn_assert("vfi", m3 == 3); | ||
1800 | 1777 | + s390_insn_assert("vfi", | ||
1801 | 1778 | + (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); | ||
1802 | 1779 | |||
1803 | 1780 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1804 | 1781 | - emulation_warning(EmWarn_S390X_fpext_rounding); | ||
1805 | 1782 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1806 | 1783 | + switch (m3) { | ||
1807 | 1784 | + case 2: s390_vector_fp_convert(Iop_RoundF32toInt, Ity_F32, Ity_F32, True, | ||
1808 | 1785 | + v1, v2, m3, m4, m5); break; | ||
1809 | 1786 | + case 3: s390_vector_fp_convert(Iop_RoundF64toInt, Ity_F64, Ity_F64, True, | ||
1810 | 1787 | + v1, v2, m3, m4, m5); break; | ||
1811 | 1788 | + case 4: s390_vector_fp_convert(Iop_RoundF128toInt, Ity_F128, Ity_F128, True, | ||
1812 | 1789 | + v1, v2, m3, m4, m5); break; | ||
1813 | 1790 | } | ||
1814 | 1791 | |||
1815 | 1792 | - s390_vector_fp_convert(Iop_RoundF64toInt, Ity_F64, Ity_F64, | ||
1816 | 1793 | - v1, v2, m3, m4, m5); | ||
1817 | 1794 | - | ||
1818 | 1795 | - return "vcgld"; | ||
1819 | 1796 | + return "vfi"; | ||
1820 | 1797 | } | ||
1821 | 1798 | |||
1822 | 1799 | static const HChar * | ||
1823 | 1800 | -s390_irgen_VLDE(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1824 | 1801 | +s390_irgen_VFLL(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1825 | 1802 | { | ||
1826 | 1803 | - s390_insn_assert("vlde", m3 == 2); | ||
1827 | 1804 | + s390_insn_assert("vfll", m3 == 2 || (s390_host_has_vxe && m3 == 3)); | ||
1828 | 1805 | |||
1829 | 1806 | - s390_vector_fp_convert(Iop_F32toF64, Ity_F32, Ity_F64, v1, v2, m3, m4, m5); | ||
1830 | 1807 | + if (m3 == 2) | ||
1831 | 1808 | + s390_vector_fp_convert(Iop_F32toF64, Ity_F32, Ity_F64, False, | ||
1832 | 1809 | + v1, v2, m3, m4, m5); | ||
1833 | 1810 | + else | ||
1834 | 1811 | + s390_vector_fp_convert(Iop_F64toF128, Ity_F64, Ity_F128, False, | ||
1835 | 1812 | + v1, v2, m3, m4, m5); | ||
1836 | 1813 | |||
1837 | 1814 | - return "vlde"; | ||
1838 | 1815 | + return "vfll"; | ||
1839 | 1816 | } | ||
1840 | 1817 | |||
1841 | 1818 | static const HChar * | ||
1842 | 1819 | -s390_irgen_VLED(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1843 | 1820 | +s390_irgen_VFLR(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1844 | 1821 | { | ||
1845 | 1822 | - s390_insn_assert("vled", m3 == 3); | ||
1846 | 1823 | + s390_insn_assert("vflr", m3 == 3 || (s390_host_has_vxe && m3 == 2)); | ||
1847 | 1824 | |||
1848 | 1825 | - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { | ||
1849 | 1826 | - m5 = S390_BFP_ROUND_PER_FPC; | ||
1850 | 1827 | - } | ||
1851 | 1828 | - | ||
1852 | 1829 | - s390_vector_fp_convert(Iop_F64toF32, Ity_F64, Ity_F32, v1, v2, m3, m4, m5); | ||
1853 | 1830 | + if (m3 == 3) | ||
1854 | 1831 | + s390_vector_fp_convert(Iop_F64toF32, Ity_F64, Ity_F32, True, | ||
1855 | 1832 | + v1, v2, m3, m4, m5); | ||
1856 | 1833 | + else | ||
1857 | 1834 | + s390_vector_fp_convert(Iop_F128toF64, Ity_F128, Ity_F64, True, | ||
1858 | 1835 | + v1, v2, m3, m4, m5); | ||
1859 | 1836 | |||
1860 | 1837 | - return "vled"; | ||
1861 | 1838 | + return "vflr"; | ||
1862 | 1839 | } | ||
1863 | 1840 | |||
1864 | 1841 | static const HChar * | ||
1865 | 1842 | s390_irgen_VFPSO(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) | ||
1866 | 1843 | { | ||
1867 | 1844 | - s390_insn_assert("vfpso", m3 == 3); | ||
1868 | 1845 | + s390_insn_assert("vfpso", m5 <= 2 && | ||
1869 | 1846 | + (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); | ||
1870 | 1847 | |||
1871 | 1848 | - IRExpr* result; | ||
1872 | 1849 | - switch (m5) { | ||
1873 | 1850 | - case 0: { | ||
1874 | 1851 | - /* Invert sign */ | ||
1875 | 1852 | - if (!s390_vr_is_single_element_control_set(m4)) { | ||
1876 | 1853 | - result = unop(Iop_Neg64Fx2, get_vr_qw(v2)); | ||
1877 | 1854 | - } | ||
1878 | 1855 | - else { | ||
1879 | 1856 | - result = binop(Iop_64HLtoV128, | ||
1880 | 1857 | - unop(Iop_ReinterpF64asI64, | ||
1881 | 1858 | - unop(Iop_NegF64, get_vr(v2, Ity_F64, 0))), | ||
1882 | 1859 | - mkU64(0)); | ||
1883 | 1860 | - } | ||
1884 | 1861 | - break; | ||
1885 | 1862 | - } | ||
1886 | 1863 | + Bool single = s390_vr_is_single_element_control_set(m4) || m3 == 4; | ||
1887 | 1864 | + IRType type = single ? s390_vr_get_ftype(m3) : Ity_V128; | ||
1888 | 1865 | + int idx = 2 * (m3 - 2) + (single ? 0 : 1); | ||
1889 | 1866 | + | ||
1890 | 1867 | + static const IROp negate_ops[] = { | ||
1891 | 1868 | + Iop_NegF32, Iop_Neg32Fx4, | ||
1892 | 1869 | + Iop_NegF64, Iop_Neg64Fx2, | ||
1893 | 1870 | + Iop_NegF128 | ||
1894 | 1871 | + }; | ||
1895 | 1872 | + static const IROp abs_ops[] = { | ||
1896 | 1873 | + Iop_AbsF32, Iop_Abs32Fx4, | ||
1897 | 1874 | + Iop_AbsF64, Iop_Abs64Fx2, | ||
1898 | 1875 | + Iop_AbsF128 | ||
1899 | 1876 | + }; | ||
1900 | 1877 | |||
1901 | 1878 | - case 1: { | ||
1902 | 1879 | + if (m5 == 1) { | ||
1903 | 1880 | /* Set sign to negative */ | ||
1904 | 1881 | - IRExpr* highHalf = mkU64(0x8000000000000000ULL); | ||
1905 | 1882 | - if (!s390_vr_is_single_element_control_set(m4)) { | ||
1906 | 1883 | - IRExpr* lowHalf = highHalf; | ||
1907 | 1884 | - IRExpr* mask = binop(Iop_64HLtoV128, highHalf, lowHalf); | ||
1908 | 1885 | - result = binop(Iop_OrV128, get_vr_qw(v2), mask); | ||
1909 | 1886 | - } | ||
1910 | 1887 | - else { | ||
1911 | 1888 | - result = binop(Iop_64HLtoV128, | ||
1912 | 1889 | - binop(Iop_Or64, get_vr_dw0(v2), highHalf), | ||
1913 | 1890 | - mkU64(0ULL)); | ||
1914 | 1891 | - } | ||
1915 | 1892 | - | ||
1916 | 1893 | - break; | ||
1917 | 1894 | + put_vr(v1, type, 0, | ||
1918 | 1895 | + unop(negate_ops[idx], | ||
1919 | 1896 | + unop(abs_ops[idx], get_vr(v2, type, 0)))); | ||
1920 | 1897 | + } else { | ||
1921 | 1898 | + /* m5 == 0: invert sign; m5 == 2: set sign to positive */ | ||
1922 | 1899 | + const IROp *ops = m5 == 2 ? abs_ops : negate_ops; | ||
1923 | 1900 | + put_vr(v1, type, 0, unop(ops[idx], get_vr(v2, type, 0))); | ||
1924 | 1901 | } | ||
1925 | 1902 | |||
1926 | 1903 | - case 2: { | ||
1927 | 1904 | - /* Set sign to positive */ | ||
1928 | 1905 | - if (!s390_vr_is_single_element_control_set(m4)) { | ||
1929 | 1906 | - result = unop(Iop_Abs64Fx2, get_vr_qw(v2)); | ||
1930 | 1907 | - } | ||
1931 | 1908 | - else { | ||
1932 | 1909 | - result = binop(Iop_64HLtoV128, | ||
1933 | 1910 | - unop(Iop_ReinterpF64asI64, | ||
1934 | 1911 | - unop(Iop_AbsF64, get_vr(v2, Ity_F64, 0))), | ||
1935 | 1912 | - mkU64(0)); | ||
1936 | 1913 | - } | ||
1937 | 1914 | + return "vfpso"; | ||
1938 | 1915 | +} | ||
1939 | 1916 | |||
1940 | 1917 | - break; | ||
1941 | 1918 | - } | ||
1942 | 1919 | +static const HChar * | ||
1943 | 1920 | +s390x_vec_fp_binary_op(const HChar* mnm, const IROp ops[], | ||
1944 | 1921 | + UChar v1, UChar v2, UChar v3, | ||
1945 | 1922 | + UChar m4, UChar m5) | ||
1946 | 1923 | +{ | ||
1947 | 1924 | + s390_insn_assert(mnm, (m5 & 7) == 0 && | ||
1948 | 1925 | + (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); | ||
1949 | 1926 | |||
1950 | 1927 | - default: | ||
1951 | 1928 | - vpanic("s390_irgen_VFPSO: Invalid m5 value"); | ||
1952 | 1929 | - } | ||
1953 | 1930 | + int idx = 2 * (m4 - 2); | ||
1954 | 1931 | |||
1955 | 1932 | - put_vr_qw(v1, result); | ||
1956 | 1933 | - if (s390_vr_is_single_element_control_set(m4)) { | ||
1957 | 1934 | - put_vr_dw1(v1, mkU64(0ULL)); | ||
1958 | 1935 | + if (m4 == 4 || s390_vr_is_single_element_control_set(m5)) { | ||
1959 | 1936 | + IRType type = s390_vr_get_ftype(m4); | ||
1960 | 1937 | + put_vr(v1, type, 0, | ||
1961 | 1938 | + triop(ops[idx], get_bfp_rounding_mode_from_fpc(), | ||
1962 | 1939 | + get_vr(v2, type, 0), get_vr(v3, type, 0))); | ||
1963 | 1940 | + } else { | ||
1964 | 1941 | + put_vr_qw(v1, triop(ops[idx + 1], get_bfp_rounding_mode_from_fpc(), | ||
1965 | 1942 | + get_vr_qw(v2), get_vr_qw(v3))); | ||
1966 | 1943 | } | ||
1967 | 1944 | |||
1968 | 1945 | - return "vfpso"; | ||
1969 | 1946 | + return mnm; | ||
1970 | 1947 | } | ||
1971 | 1948 | |||
1972 | 1949 | -static void s390x_vec_fp_binary_op(IROp generalOp, IROp singleElementOp, | ||
1973 | 1950 | - UChar v1, UChar v2, UChar v3, UChar m4, | ||
1974 | 1951 | - UChar m5) | ||
1975 | 1952 | +static const HChar * | ||
1976 | 1953 | +s390x_vec_fp_unary_op(const HChar* mnm, const IROp ops[], | ||
1977 | 1954 | + UChar v1, UChar v2, UChar m3, UChar m4) | ||
1978 | 1955 | { | ||
1979 | 1956 | - IRExpr* result; | ||
1980 | 1957 | - if (!s390_vr_is_single_element_control_set(m5)) { | ||
1981 | 1958 | - result = triop(generalOp, get_bfp_rounding_mode_from_fpc(), | ||
1982 | 1959 | - get_vr_qw(v2), get_vr_qw(v3)); | ||
1983 | 1960 | - } else { | ||
1984 | 1961 | - IRExpr* highHalf = triop(singleElementOp, | ||
1985 | 1962 | - get_bfp_rounding_mode_from_fpc(), | ||
1986 | 1963 | - get_vr(v2, Ity_F64, 0), | ||
1987 | 1964 | - get_vr(v3, Ity_F64, 0)); | ||
1988 | 1965 | - result = binop(Iop_64HLtoV128, unop(Iop_ReinterpF64asI64, highHalf), | ||
1989 | 1966 | - mkU64(0ULL)); | ||
1990 | 1967 | - } | ||
1991 | 1968 | + s390_insn_assert(mnm, (m4 & 7) == 0 && | ||
1992 | 1969 | + (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); | ||
1993 | 1970 | |||
1994 | 1971 | - put_vr_qw(v1, result); | ||
1995 | 1972 | -} | ||
1996 | 1973 | + int idx = 2 * (m3 - 2); | ||
1997 | 1974 | |||
1998 | 1975 | -static void s390x_vec_fp_unary_op(IROp generalOp, IROp singleElementOp, | ||
1999 | 1976 | - UChar v1, UChar v2, UChar m3, UChar m4) | ||
2000 | 1977 | -{ | ||
2001 | 1978 | - IRExpr* result; | ||
2002 | 1979 | - if (!s390_vr_is_single_element_control_set(m4)) { | ||
2003 | 1980 | - result = binop(generalOp, get_bfp_rounding_mode_from_fpc(), | ||
2004 | 1981 | - get_vr_qw(v2)); | ||
2005 | 1982 | + if (m3 == 4 || s390_vr_is_single_element_control_set(m4)) { | ||
2006 | 1983 | + IRType type = s390_vr_get_ftype(m3); | ||
2007 | 1984 | + put_vr(v1, type, 0, | ||
2008 | 1985 | + binop(ops[idx], get_bfp_rounding_mode_from_fpc(), | ||
2009 | 1986 | + get_vr(v2, type, 0))); | ||
2010 | 1987 | } | ||
2011 | 1988 | else { | ||
2012 | 1989 | - IRExpr* highHalf = binop(singleElementOp, | ||
2013 | 1990 | - get_bfp_rounding_mode_from_fpc(), | ||
2014 | 1991 | - get_vr(v2, Ity_F64, 0)); | ||
2015 | 1992 | - result = binop(Iop_64HLtoV128, unop(Iop_ReinterpF64asI64, highHalf), | ||
2016 | 1993 | - mkU64(0ULL)); | ||
2017 | 1994 | + put_vr_qw(v1, binop(ops[idx + 1], get_bfp_rounding_mode_from_fpc(), | ||
2018 | 1995 | + get_vr_qw(v2))); | ||
2019 | 1996 | } | ||
2020 | 1997 | |||
2021 | 1998 | - put_vr_qw(v1, result); | ||
2022 | 1999 | + return mnm; | ||
2023 | 2000 | } | ||
2024 | 2001 | |||
2025 | 2002 | |||
2026 | 2003 | -static void | ||
2027 | 2004 | -s390_vector_fp_mulAddOrSub(IROp singleElementOp, | ||
2028 | 2005 | - UChar v1, UChar v2, UChar v3, UChar v4, | ||
2029 | 2006 | - UChar m5, UChar m6) | ||
2030 | 2007 | +static const HChar * | ||
2031 | 2008 | +s390_vector_fp_mulAddOrSub(UChar v1, UChar v2, UChar v3, UChar v4, | ||
2032 | 2009 | + UChar m5, UChar m6, | ||
2033 | 2010 | + const HChar* mnm, const IROp single_ops[], | ||
2034 | 2011 | + Bool negate) | ||
2035 | 2012 | { | ||
2036 | 2013 | - Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); | ||
2037 | 2014 | + s390_insn_assert(mnm, m6 == 3 || (s390_host_has_vxe && m6 >= 2 && m6 <= 4)); | ||
2038 | 2015 | + | ||
2039 | 2016 | + static const IROp negate_ops[] = { Iop_NegF32, Iop_NegF64, Iop_NegF128 }; | ||
2040 | 2017 | + IRType type = s390_vr_get_ftype(m6); | ||
2041 | 2018 | + Bool single = s390_vr_is_single_element_control_set(m5) || m6 == 4; | ||
2042 | 2019 | + UChar n_elem = single ? 1 : s390_vr_get_n_elem(m6); | ||
2043 | 2020 | IRTemp irrm_temp = newTemp(Ity_I32); | ||
2044 | 2021 | assign(irrm_temp, get_bfp_rounding_mode_from_fpc()); | ||
2045 | 2022 | IRExpr* irrm = mkexpr(irrm_temp); | ||
2046 | 2023 | - IRExpr* result; | ||
2047 | 2024 | - IRExpr* highHalf = qop(singleElementOp, | ||
2048 | 2025 | - irrm, | ||
2049 | 2026 | - get_vr(v2, Ity_F64, 0), | ||
2050 | 2027 | - get_vr(v3, Ity_F64, 0), | ||
2051 | 2028 | - get_vr(v4, Ity_F64, 0)); | ||
2052 | 2029 | - | ||
2053 | 2030 | - if (isSingleElementOp) { | ||
2054 | 2031 | - result = binop(Iop_64HLtoV128, unop(Iop_ReinterpF64asI64, highHalf), | ||
2055 | 2032 | - mkU64(0ULL)); | ||
2056 | 2033 | - } else { | ||
2057 | 2034 | - IRExpr* lowHalf = qop(singleElementOp, | ||
2058 | 2035 | - irrm, | ||
2059 | 2036 | - get_vr(v2, Ity_F64, 1), | ||
2060 | 2037 | - get_vr(v3, Ity_F64, 1), | ||
2061 | 2038 | - get_vr(v4, Ity_F64, 1)); | ||
2062 | 2039 | - result = binop(Iop_64HLtoV128, unop(Iop_ReinterpF64asI64, highHalf), | ||
2063 | 2040 | - unop(Iop_ReinterpF64asI64, lowHalf)); | ||
2064 | 2041 | - } | ||
2065 | 2042 | |||
2066 | 2043 | - put_vr_qw(v1, result); | ||
2067 | 2044 | + for (UChar idx = 0; idx < n_elem; idx++) { | ||
2068 | 2045 | + IRExpr* result = qop(single_ops[m6 - 2], | ||
2069 | 2046 | + irrm, | ||
2070 | 2047 | + get_vr(v2, type, idx), | ||
2071 | 2048 | + get_vr(v3, type, idx), | ||
2072 | 2049 | + get_vr(v4, type, idx)); | ||
2073 | 2050 | + put_vr(v1, type, idx, negate ? unop(negate_ops[m6 - 2], result) : result); | ||
2074 | 2051 | + } | ||
2075 | 2052 | + return mnm; | ||
2076 | 2053 | } | ||
2077 | 2054 | |||
2078 | 2055 | static const HChar * | ||
2079 | 2056 | s390_irgen_VFA(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) | ||
2080 | 2057 | { | ||
2081 | 2058 | - s390_insn_assert("vfa", m4 == 3); | ||
2082 | 2059 | - s390x_vec_fp_binary_op(Iop_Add64Fx2, Iop_AddF64, v1, v2, v3, m4, m5); | ||
2083 | 2060 | - return "vfa"; | ||
2084 | 2061 | + static const IROp vfa_ops[] = { | ||
2085 | 2062 | + Iop_AddF32, Iop_Add32Fx4, | ||
2086 | 2063 | + Iop_AddF64, Iop_Add64Fx2, | ||
2087 | 2064 | + Iop_AddF128, | ||
2088 | 2065 | + }; | ||
2089 | 2066 | + return s390x_vec_fp_binary_op("vfa", vfa_ops, v1, v2, v3, m4, m5); | ||
2090 | 2067 | } | ||
2091 | 2068 | |||
2092 | 2069 | static const HChar * | ||
2093 | 2070 | s390_irgen_VFS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) | ||
2094 | 2071 | { | ||
2095 | 2072 | - s390_insn_assert("vfs", m4 == 3); | ||
2096 | 2073 | - s390x_vec_fp_binary_op(Iop_Sub64Fx2, Iop_SubF64, v1, v2, v3, m4, m5); | ||
2097 | 2074 | - return "vfs"; | ||
2098 | 2075 | + static const IROp vfs_ops[] = { | ||
2099 | 2076 | + Iop_SubF32, Iop_Sub32Fx4, | ||
2100 | 2077 | + Iop_SubF64, Iop_Sub64Fx2, | ||
2101 | 2078 | + Iop_SubF128, | ||
2102 | 2079 | + }; | ||
2103 | 2080 | + return s390x_vec_fp_binary_op("vfs", vfs_ops, v1, v2, v3, m4, m5); | ||
2104 | 2081 | } | ||
2105 | 2082 | |||
2106 | 2083 | static const HChar * | ||
2107 | 2084 | s390_irgen_VFM(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) | ||
2108 | 2085 | { | ||
2109 | 2086 | - s390_insn_assert("vfm", m4 == 3); | ||
2110 | 2087 | - s390x_vec_fp_binary_op(Iop_Mul64Fx2, Iop_MulF64, v1, v2, v3, m4, m5); | ||
2111 | 2088 | - return "vfm"; | ||
2112 | 2089 | + static const IROp vfm_ops[] = { | ||
2113 | 2090 | + Iop_MulF32, Iop_Mul32Fx4, | ||
2114 | 2091 | + Iop_MulF64, Iop_Mul64Fx2, | ||
2115 | 2092 | + Iop_MulF128, | ||
2116 | 2093 | + }; | ||
2117 | 2094 | + return s390x_vec_fp_binary_op("vfm", vfm_ops, v1, v2, v3, m4, m5); | ||
2118 | 2095 | } | ||
2119 | 2096 | |||
2120 | 2097 | static const HChar * | ||
2121 | 2098 | s390_irgen_VFD(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) | ||
2122 | 2099 | { | ||
2123 | 2100 | - s390_insn_assert("vfd", m4 == 3); | ||
2124 | 2101 | - s390x_vec_fp_binary_op(Iop_Div64Fx2, Iop_DivF64, v1, v2, v3, m4, m5); | ||
2125 | 2102 | - return "vfd"; | ||
2126 | 2103 | + static const IROp vfd_ops[] = { | ||
2127 | 2104 | + Iop_DivF32, Iop_Div32Fx4, | ||
2128 | 2105 | + Iop_DivF64, Iop_Div64Fx2, | ||
2129 | 2106 | + Iop_DivF128, | ||
2130 | 2107 | + }; | ||
2131 | 2108 | + return s390x_vec_fp_binary_op("vfd", vfd_ops, v1, v2, v3, m4, m5); | ||
2132 | 2109 | } | ||
2133 | 2110 | |||
2134 | 2111 | static const HChar * | ||
2135 | 2112 | s390_irgen_VFSQ(UChar v1, UChar v2, UChar m3, UChar m4) | ||
2136 | 2113 | { | ||
2137 | 2114 | - s390_insn_assert("vfsq", m3 == 3); | ||
2138 | 2115 | - s390x_vec_fp_unary_op(Iop_Sqrt64Fx2, Iop_SqrtF64, v1, v2, m3, m4); | ||
2139 | 2116 | - | ||
2140 | 2117 | - return "vfsq"; | ||
2141 | 2118 | + static const IROp vfsq_ops[] = { | ||
2142 | 2119 | + Iop_SqrtF32, Iop_Sqrt32Fx4, | ||
2143 | 2120 | + Iop_SqrtF64, Iop_Sqrt64Fx2, | ||
2144 | 2121 | + Iop_SqrtF128 | ||
2145 | 2122 | + }; | ||
2146 | 2123 | + return s390x_vec_fp_unary_op("vfsq", vfsq_ops, v1, v2, m3, m4); | ||
2147 | 2124 | } | ||
2148 | 2125 | |||
2149 | 2126 | +static const IROp FMA_single_ops[] = { | ||
2150 | 2127 | + Iop_MAddF32, Iop_MAddF64, Iop_MAddF128 | ||
2151 | 2128 | +}; | ||
2152 | 2129 | + | ||
2153 | 2130 | static const HChar * | ||
2154 | 2131 | s390_irgen_VFMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) | ||
2155 | 2132 | { | ||
2156 | 2133 | - s390_insn_assert("vfma", m6 == 3); | ||
2157 | 2134 | - s390_vector_fp_mulAddOrSub(Iop_MAddF64, v1, v2, v3, v4, m5, m6); | ||
2158 | 2135 | - return "vfma"; | ||
2159 | 2136 | + return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, | ||
2160 | 2137 | + "vfma", FMA_single_ops, False); | ||
2161 | 2138 | } | ||
2162 | 2139 | |||
2163 | 2140 | static const HChar * | ||
2164 | 2141 | +s390_irgen_VFNMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) | ||
2165 | 2142 | +{ | ||
2166 | 2143 | + return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, | ||
2167 | 2144 | + "vfnma", FMA_single_ops, True); | ||
2168 | 2145 | +} | ||
2169 | 2146 | + | ||
2170 | 2147 | +static const IROp FMS_single_ops[] = { | ||
2171 | 2148 | + Iop_MSubF32, Iop_MSubF64, Iop_MSubF128 | ||
2172 | 2149 | +}; | ||
2173 | 2150 | + | ||
2174 | 2151 | +static const HChar * | ||
2175 | 2152 | s390_irgen_VFMS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) | ||
2176 | 2153 | { | ||
2177 | 2154 | - s390_insn_assert("vfms", m6 == 3); | ||
2178 | 2155 | - s390_vector_fp_mulAddOrSub(Iop_MSubF64, v1, v2, v3, v4, m5, m6); | ||
2179 | 2156 | - return "vfms"; | ||
2180 | 2157 | + return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, | ||
2181 | 2158 | + "vfms", FMS_single_ops, False); | ||
2182 | 2159 | +} | ||
2183 | 2160 | + | ||
2184 | 2161 | +static const HChar * | ||
2185 | 2162 | +s390_irgen_VFNMS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) | ||
2186 | 2163 | +{ | ||
2187 | 2164 | + return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, | ||
2188 | 2165 | + "vfnms", FMS_single_ops, True); | ||
2189 | 2166 | } | ||
2190 | 2167 | |||
2191 | 2168 | static const HChar * | ||
2192 | 2169 | s390_irgen_WFC(UChar v1, UChar v2, UChar m3, UChar m4) | ||
2193 | 2170 | { | ||
2194 | 2171 | - s390_insn_assert("wfc", m3 == 3); | ||
2195 | 2172 | - s390_insn_assert("wfc", m4 == 0); | ||
2196 | 2173 | + s390_insn_assert("wfc", m4 == 0 && | ||
2197 | 2174 | + (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); | ||
2198 | 2175 | + | ||
2199 | 2176 | + static const IROp ops[] = { Iop_CmpF32, Iop_CmpF64, Iop_CmpF128 }; | ||
2200 | 2177 | + IRType type = s390_vr_get_ftype(m3); | ||
2201 | 2178 | |||
2202 | 2179 | IRTemp cc_vex = newTemp(Ity_I32); | ||
2203 | 2180 | - assign(cc_vex, binop(Iop_CmpF64, | ||
2204 | 2181 | - get_vr(v1, Ity_F64, 0), get_vr(v2, Ity_F64, 0))); | ||
2205 | 2182 | + assign(cc_vex, binop(ops[m3 - 2], get_vr(v1, type, 0), get_vr(v2, type, 0))); | ||
2206 | 2183 | |||
2207 | 2184 | IRTemp cc_s390 = newTemp(Ity_I32); | ||
2208 | 2185 | assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex)); | ||
2209 | 2186 | @@ -18692,213 +18917,253 @@ | ||
2210 | 2187 | } | ||
2211 | 2188 | |||
2212 | 2189 | static const HChar * | ||
2213 | 2190 | -s390_irgen_VFCE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2214 | 2191 | -{ | ||
2215 | 2192 | - s390_insn_assert("vfce", m4 == 3); | ||
2216 | 2193 | +s390_irgen_VFCx(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6, | ||
2217 | 2194 | + const HChar *mnem, IRCmpFResult cmp, Bool equal_ok, | ||
2218 | 2195 | + IROp cmp32, IROp cmp64) | ||
2219 | 2196 | +{ | ||
2220 | 2197 | + s390_insn_assert(mnem, (m5 & 3) == 0 && (m6 & 14) == 0 && | ||
2221 | 2198 | + (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); | ||
2222 | 2199 | + | ||
2223 | 2200 | + Bool single = s390_vr_is_single_element_control_set(m5) || m4 == 4; | ||
2224 | 2201 | + | ||
2225 | 2202 | + if (single) { | ||
2226 | 2203 | + static const IROp ops[] = { Iop_CmpF32, Iop_CmpF64, Iop_CmpF128 }; | ||
2227 | 2204 | + IRType type = s390_vr_get_ftype(m4); | ||
2228 | 2205 | + IRTemp result = newTemp(Ity_I32); | ||
2229 | 2206 | + IRTemp cond = newTemp(Ity_I1); | ||
2230 | 2207 | |||
2231 | 2208 | - Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); | ||
2232 | 2209 | - if (!s390_vr_is_cs_set(m6)) { | ||
2233 | 2210 | - if (!isSingleElementOp) { | ||
2234 | 2211 | - put_vr_qw(v1, binop(Iop_CmpEQ64Fx2, get_vr_qw(v2), get_vr_qw(v3))); | ||
2235 | 2212 | + assign(result, binop(ops[m4 - 2], | ||
2236 | 2213 | + get_vr(v2, type, 0), get_vr(v3, type, 0))); | ||
2237 | 2214 | + if (equal_ok) { | ||
2238 | 2215 | + assign(cond, | ||
2239 | 2216 | + binop(Iop_Or1, | ||
2240 | 2217 | + binop(Iop_CmpEQ32, mkexpr(result), mkU32(cmp)), | ||
2241 | 2218 | + binop(Iop_CmpEQ32, mkexpr(result), mkU32(Ircr_EQ)))); | ||
2242 | 2219 | } else { | ||
2243 | 2220 | - IRExpr* comparisonResult = binop(Iop_CmpF64, get_vr(v2, Ity_F64, 0), | ||
2244 | 2221 | - get_vr(v3, Ity_F64, 0)); | ||
2245 | 2222 | - IRExpr* result = mkite(binop(Iop_CmpEQ32, comparisonResult, | ||
2246 | 2223 | - mkU32(Ircr_EQ)), | ||
2247 | 2224 | - mkU64(0xffffffffffffffffULL), | ||
2248 | 2225 | - mkU64(0ULL)); | ||
2249 | 2226 | - put_vr_qw(v1, binop(Iop_64HLtoV128, result, mkU64(0ULL))); | ||
2250 | 2227 | + assign(cond, binop(Iop_CmpEQ32, mkexpr(result), mkU32(cmp))); | ||
2251 | 2228 | + } | ||
2252 | 2229 | + put_vr_qw(v1, mkite(mkexpr(cond), | ||
2253 | 2230 | + IRExpr_Const(IRConst_V128(0xffff)), | ||
2254 | 2231 | + IRExpr_Const(IRConst_V128(0)))); | ||
2255 | 2232 | + if (s390_vr_is_cs_set(m6)) { | ||
2256 | 2233 | + IRTemp cc = newTemp(Ity_I64); | ||
2257 | 2234 | + assign(cc, mkite(mkexpr(cond), mkU64(0), mkU64(3))); | ||
2258 | 2235 | + s390_cc_set(cc); | ||
2259 | 2236 | } | ||
2260 | 2237 | } else { | ||
2261 | 2238 | - IRDirty* d; | ||
2262 | 2239 | - IRTemp cc = newTemp(Ity_I64); | ||
2263 | 2240 | + IRTemp result = newTemp(Ity_V128); | ||
2264 | 2241 | |||
2265 | 2242 | - s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2266 | 2243 | - details.op = S390_VEC_OP_VFCE; | ||
2267 | 2244 | - details.v1 = v1; | ||
2268 | 2245 | - details.v2 = v2; | ||
2269 | 2246 | - details.v3 = v3; | ||
2270 | 2247 | - details.m4 = m4; | ||
2271 | 2248 | - details.m5 = m5; | ||
2272 | 2249 | - details.m6 = m6; | ||
2273 | 2250 | + assign(result, binop(m4 == 2 ? cmp32 : cmp64, | ||
2274 | 2251 | + get_vr_qw(v2), get_vr_qw(v3))); | ||
2275 | 2252 | + put_vr_qw(v1, mkexpr(result)); | ||
2276 | 2253 | + if (s390_vr_is_cs_set(m6)) { | ||
2277 | 2254 | + IRTemp cc = newTemp(Ity_I64); | ||
2278 | 2255 | + assign(cc, | ||
2279 | 2256 | + mkite(binop(Iop_CmpEQ64, | ||
2280 | 2257 | + binop(Iop_And64, | ||
2281 | 2258 | + unop(Iop_V128to64, mkexpr(result)), | ||
2282 | 2259 | + unop(Iop_V128HIto64, mkexpr(result))), | ||
2283 | 2260 | + mkU64(-1ULL)), | ||
2284 | 2261 | + mkU64(0), /* all comparison results are true */ | ||
2285 | 2262 | + mkite(binop(Iop_CmpEQ64, | ||
2286 | 2263 | + binop(Iop_Or64, | ||
2287 | 2264 | + unop(Iop_V128to64, mkexpr(result)), | ||
2288 | 2265 | + unop(Iop_V128HIto64, mkexpr(result))), | ||
2289 | 2266 | + mkU64(0)), | ||
2290 | 2267 | + mkU64(3), /* all false */ | ||
2291 | 2268 | + mkU64(1)))); /* mixed true/false */ | ||
2292 | 2269 | + s390_cc_set(cc); | ||
2293 | 2270 | + } | ||
2294 | 2271 | + } | ||
2295 | 2272 | |||
2296 | 2273 | - d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2297 | 2274 | - &s390x_dirtyhelper_vec_op, | ||
2298 | 2275 | - mkIRExprVec_2(IRExpr_GSPTR(), | ||
2299 | 2276 | - mkU64(details.serialized))); | ||
2300 | 2277 | + return mnem; | ||
2301 | 2278 | +} | ||
2302 | 2279 | |||
2303 | 2280 | - const UChar elementSize = isSingleElementOp ? sizeof(ULong) : sizeof(V128); | ||
2304 | 2281 | - d->nFxState = 3; | ||
2305 | 2282 | - vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2306 | 2283 | - d->fxState[0].fx = Ifx_Read; | ||
2307 | 2284 | - d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2308 | 2285 | - d->fxState[0].size = elementSize; | ||
2309 | 2286 | - d->fxState[1].fx = Ifx_Read; | ||
2310 | 2287 | - d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2311 | 2288 | - d->fxState[1].size = elementSize; | ||
2312 | 2289 | - d->fxState[2].fx = Ifx_Write; | ||
2313 | 2290 | - d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2314 | 2291 | - d->fxState[2].size = sizeof(V128); | ||
2315 | 2292 | +static const HChar * | ||
2316 | 2293 | +s390_irgen_VFCE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2317 | 2294 | +{ | ||
2318 | 2295 | + return s390_irgen_VFCx(v1, v2, v3, m4, m5, m6, "vfce", Ircr_EQ, | ||
2319 | 2296 | + False, Iop_CmpEQ32Fx4, Iop_CmpEQ64Fx2); | ||
2320 | 2297 | +} | ||
2321 | 2298 | |||
2322 | 2299 | - stmt(IRStmt_Dirty(d)); | ||
2323 | 2300 | - s390_cc_set(cc); | ||
2324 | 2301 | - } | ||
2325 | 2302 | +static const HChar * | ||
2326 | 2303 | +s390_irgen_VFCH(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2327 | 2304 | +{ | ||
2328 | 2305 | + /* Swap arguments and compare "low" instead. */ | ||
2329 | 2306 | + return s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, "vfch", Ircr_LT, | ||
2330 | 2307 | + False, Iop_CmpLT32Fx4, Iop_CmpLT64Fx2); | ||
2331 | 2308 | +} | ||
2332 | 2309 | |||
2333 | 2310 | - return "vfce"; | ||
2334 | 2311 | +static const HChar * | ||
2335 | 2312 | +s390_irgen_VFCHE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2336 | 2313 | +{ | ||
2337 | 2314 | + /* Swap arguments and compare "low or equal" instead. */ | ||
2338 | 2315 | + return s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, "vfche", Ircr_LT, | ||
2339 | 2316 | + True, Iop_CmpLE32Fx4, Iop_CmpLE64Fx2); | ||
2340 | 2317 | } | ||
2341 | 2318 | |||
2342 | 2319 | static const HChar * | ||
2343 | 2320 | -s390_irgen_VFCH(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2344 | 2321 | +s390_irgen_VFTCI(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5) | ||
2345 | 2322 | { | ||
2346 | 2323 | - vassert(m4 == 3); | ||
2347 | 2324 | + s390_insn_assert("vftci", | ||
2348 | 2325 | + (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); | ||
2349 | 2326 | |||
2350 | 2327 | Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); | ||
2351 | 2328 | - if (!s390_vr_is_cs_set(m6)) { | ||
2352 | 2329 | - if (!isSingleElementOp) { | ||
2353 | 2330 | - put_vr_qw(v1, binop(Iop_CmpLE64Fx2, get_vr_qw(v3), get_vr_qw(v2))); | ||
2354 | 2331 | - } else { | ||
2355 | 2332 | - IRExpr* comparisonResult = binop(Iop_CmpF64, get_vr(v2, Ity_F64, 0), | ||
2356 | 2333 | - get_vr(v3, Ity_F64, 0)); | ||
2357 | 2334 | - IRExpr* result = mkite(binop(Iop_CmpEQ32, comparisonResult, | ||
2358 | 2335 | - mkU32(Ircr_GT)), | ||
2359 | 2336 | - mkU64(0xffffffffffffffffULL), | ||
2360 | 2337 | - mkU64(0ULL)); | ||
2361 | 2338 | - put_vr_qw(v1, binop(Iop_64HLtoV128, result, mkU64(0ULL))); | ||
2362 | 2339 | - } | ||
2363 | 2340 | - } | ||
2364 | 2341 | - else { | ||
2365 | 2342 | - IRDirty* d; | ||
2366 | 2343 | - IRTemp cc = newTemp(Ity_I64); | ||
2367 | 2344 | |||
2368 | 2345 | - s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2369 | 2346 | - details.op = S390_VEC_OP_VFCH; | ||
2370 | 2347 | - details.v1 = v1; | ||
2371 | 2348 | - details.v2 = v2; | ||
2372 | 2349 | - details.v3 = v3; | ||
2373 | 2350 | - details.m4 = m4; | ||
2374 | 2351 | - details.m5 = m5; | ||
2375 | 2352 | - details.m6 = m6; | ||
2376 | 2353 | + IRDirty* d; | ||
2377 | 2354 | + IRTemp cc = newTemp(Ity_I64); | ||
2378 | 2355 | |||
2379 | 2356 | - d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2380 | 2357 | - &s390x_dirtyhelper_vec_op, | ||
2381 | 2358 | - mkIRExprVec_2(IRExpr_GSPTR(), | ||
2382 | 2359 | - mkU64(details.serialized))); | ||
2383 | 2360 | + s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2384 | 2361 | + details.op = S390_VEC_OP_VFTCI; | ||
2385 | 2362 | + details.v1 = v1; | ||
2386 | 2363 | + details.v2 = v2; | ||
2387 | 2364 | + details.i3 = i3; | ||
2388 | 2365 | + details.m4 = m4; | ||
2389 | 2366 | + details.m5 = m5; | ||
2390 | 2367 | |||
2391 | 2368 | - const UChar elementSize = isSingleElementOp ? sizeof(ULong) : sizeof(V128); | ||
2392 | 2369 | - d->nFxState = 3; | ||
2393 | 2370 | - vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2394 | 2371 | - d->fxState[0].fx = Ifx_Read; | ||
2395 | 2372 | - d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2396 | 2373 | - d->fxState[0].size = elementSize; | ||
2397 | 2374 | - d->fxState[1].fx = Ifx_Read; | ||
2398 | 2375 | - d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2399 | 2376 | - d->fxState[1].size = elementSize; | ||
2400 | 2377 | - d->fxState[2].fx = Ifx_Write; | ||
2401 | 2378 | - d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2402 | 2379 | - d->fxState[2].size = sizeof(V128); | ||
2403 | 2380 | + d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2404 | 2381 | + &s390x_dirtyhelper_vec_op, | ||
2405 | 2382 | + mkIRExprVec_2(IRExpr_GSPTR(), | ||
2406 | 2383 | + mkU64(details.serialized))); | ||
2407 | 2384 | |||
2408 | 2385 | - stmt(IRStmt_Dirty(d)); | ||
2409 | 2386 | - s390_cc_set(cc); | ||
2410 | 2387 | - } | ||
2411 | 2388 | + const UChar elementSize = isSingleElementOp ? | ||
2412 | 2389 | + sizeofIRType(s390_vr_get_ftype(m4)) : sizeof(V128); | ||
2413 | 2390 | + d->nFxState = 2; | ||
2414 | 2391 | + vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2415 | 2392 | + d->fxState[0].fx = Ifx_Read; | ||
2416 | 2393 | + d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2417 | 2394 | + d->fxState[0].size = elementSize; | ||
2418 | 2395 | + d->fxState[1].fx = Ifx_Write; | ||
2419 | 2396 | + d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2420 | 2397 | + d->fxState[1].size = sizeof(V128); | ||
2421 | 2398 | + | ||
2422 | 2399 | + stmt(IRStmt_Dirty(d)); | ||
2423 | 2400 | + s390_cc_set(cc); | ||
2424 | 2401 | |||
2425 | 2402 | - return "vfch"; | ||
2426 | 2403 | + return "vftci"; | ||
2427 | 2404 | } | ||
2428 | 2405 | |||
2429 | 2406 | static const HChar * | ||
2430 | 2407 | -s390_irgen_VFCHE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2431 | 2408 | +s390_irgen_VFMIN(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2432 | 2409 | { | ||
2433 | 2410 | - s390_insn_assert("vfche", m4 == 3); | ||
2434 | 2411 | + s390_insn_assert("vfmin", | ||
2435 | 2412 | + (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); | ||
2436 | 2413 | |||
2437 | 2414 | Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); | ||
2438 | 2415 | - if (!s390_vr_is_cs_set(m6)) { | ||
2439 | 2416 | - if (!isSingleElementOp) { | ||
2440 | 2417 | - put_vr_qw(v1, binop(Iop_CmpLT64Fx2, get_vr_qw(v3), get_vr_qw(v2))); | ||
2441 | 2418 | - } | ||
2442 | 2419 | - else { | ||
2443 | 2420 | - IRExpr* comparisonResult = binop(Iop_CmpF64, get_vr(v3, Ity_F64, 0), | ||
2444 | 2421 | - get_vr(v2, Ity_F64, 0)); | ||
2445 | 2422 | - IRExpr* result = mkite(binop(Iop_CmpEQ32, comparisonResult, | ||
2446 | 2423 | - mkU32(Ircr_LT)), | ||
2447 | 2424 | - mkU64(0xffffffffffffffffULL), | ||
2448 | 2425 | - mkU64(0ULL)); | ||
2449 | 2426 | - put_vr_qw(v1, binop(Iop_64HLtoV128, result, mkU64(0ULL))); | ||
2450 | 2427 | - } | ||
2451 | 2428 | - } | ||
2452 | 2429 | - else { | ||
2453 | 2430 | - IRDirty* d; | ||
2454 | 2431 | - IRTemp cc = newTemp(Ity_I64); | ||
2455 | 2432 | - | ||
2456 | 2433 | - s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2457 | 2434 | - details.op = S390_VEC_OP_VFCHE; | ||
2458 | 2435 | - details.v1 = v1; | ||
2459 | 2436 | - details.v2 = v2; | ||
2460 | 2437 | - details.v3 = v3; | ||
2461 | 2438 | - details.m4 = m4; | ||
2462 | 2439 | - details.m5 = m5; | ||
2463 | 2440 | - details.m6 = m6; | ||
2464 | 2441 | + IRDirty* d; | ||
2465 | 2442 | + IRTemp cc = newTemp(Ity_I64); | ||
2466 | 2443 | |||
2467 | 2444 | - d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2468 | 2445 | - &s390x_dirtyhelper_vec_op, | ||
2469 | 2446 | - mkIRExprVec_2(IRExpr_GSPTR(), | ||
2470 | 2447 | - mkU64(details.serialized))); | ||
2471 | 2448 | + s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2472 | 2449 | + details.op = S390_VEC_OP_VFMIN; | ||
2473 | 2450 | + details.v1 = v1; | ||
2474 | 2451 | + details.v2 = v2; | ||
2475 | 2452 | + details.v3 = v3; | ||
2476 | 2453 | + details.m4 = m4; | ||
2477 | 2454 | + details.m5 = m5; | ||
2478 | 2455 | + details.m6 = m6; | ||
2479 | 2456 | |||
2480 | 2457 | - const UChar elementSize = isSingleElementOp ? sizeof(ULong) : sizeof(V128); | ||
2481 | 2458 | - d->nFxState = 3; | ||
2482 | 2459 | - vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2483 | 2460 | - d->fxState[0].fx = Ifx_Read; | ||
2484 | 2461 | - d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2485 | 2462 | - d->fxState[0].size = elementSize; | ||
2486 | 2463 | - d->fxState[1].fx = Ifx_Read; | ||
2487 | 2464 | - d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2488 | 2465 | - d->fxState[1].size = elementSize; | ||
2489 | 2466 | - d->fxState[2].fx = Ifx_Write; | ||
2490 | 2467 | - d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2491 | 2468 | - d->fxState[2].size = sizeof(V128); | ||
2492 | 2469 | + d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2493 | 2470 | + &s390x_dirtyhelper_vec_op, | ||
2494 | 2471 | + mkIRExprVec_2(IRExpr_GSPTR(), | ||
2495 | 2472 | + mkU64(details.serialized))); | ||
2496 | 2473 | |||
2497 | 2474 | - stmt(IRStmt_Dirty(d)); | ||
2498 | 2475 | - s390_cc_set(cc); | ||
2499 | 2476 | - } | ||
2500 | 2477 | + const UChar elementSize = isSingleElementOp ? | ||
2501 | 2478 | + sizeofIRType(s390_vr_get_ftype(m4)) : sizeof(V128); | ||
2502 | 2479 | + d->nFxState = 3; | ||
2503 | 2480 | + vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2504 | 2481 | + d->fxState[0].fx = Ifx_Read; | ||
2505 | 2482 | + d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2506 | 2483 | + d->fxState[0].size = elementSize; | ||
2507 | 2484 | + d->fxState[1].fx = Ifx_Read; | ||
2508 | 2485 | + d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2509 | 2486 | + d->fxState[1].size = elementSize; | ||
2510 | 2487 | + d->fxState[2].fx = Ifx_Write; | ||
2511 | 2488 | + d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2512 | 2489 | + d->fxState[2].size = sizeof(V128); | ||
2513 | 2490 | |||
2514 | 2491 | - return "vfche"; | ||
2515 | 2492 | + stmt(IRStmt_Dirty(d)); | ||
2516 | 2493 | + s390_cc_set(cc); | ||
2517 | 2494 | + return "vfmin"; | ||
2518 | 2495 | } | ||
2519 | 2496 | |||
2520 | 2497 | static const HChar * | ||
2521 | 2498 | -s390_irgen_VFTCI(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5) | ||
2522 | 2499 | +s390_irgen_VFMAX(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) | ||
2523 | 2500 | { | ||
2524 | 2501 | - s390_insn_assert("vftci", m4 == 3); | ||
2525 | 2502 | + s390_insn_assert("vfmax", | ||
2526 | 2503 | + (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); | ||
2527 | 2504 | |||
2528 | 2505 | Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); | ||
2529 | 2506 | - | ||
2530 | 2507 | IRDirty* d; | ||
2531 | 2508 | IRTemp cc = newTemp(Ity_I64); | ||
2532 | 2509 | |||
2533 | 2510 | s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2534 | 2511 | - details.op = S390_VEC_OP_VFTCI; | ||
2535 | 2512 | + details.op = S390_VEC_OP_VFMAX; | ||
2536 | 2513 | details.v1 = v1; | ||
2537 | 2514 | details.v2 = v2; | ||
2538 | 2515 | - details.i3 = i3; | ||
2539 | 2516 | + details.v3 = v3; | ||
2540 | 2517 | details.m4 = m4; | ||
2541 | 2518 | details.m5 = m5; | ||
2542 | 2519 | + details.m6 = m6; | ||
2543 | 2520 | |||
2544 | 2521 | d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2545 | 2522 | &s390x_dirtyhelper_vec_op, | ||
2546 | 2523 | mkIRExprVec_2(IRExpr_GSPTR(), | ||
2547 | 2524 | mkU64(details.serialized))); | ||
2548 | 2525 | |||
2549 | 2526 | - const UChar elementSize = isSingleElementOp ? sizeof(ULong) : sizeof(V128); | ||
2550 | 2527 | - d->nFxState = 2; | ||
2551 | 2528 | + const UChar elementSize = isSingleElementOp ? | ||
2552 | 2529 | + sizeofIRType(s390_vr_get_ftype(m4)) : sizeof(V128); | ||
2553 | 2530 | + d->nFxState = 3; | ||
2554 | 2531 | vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2555 | 2532 | d->fxState[0].fx = Ifx_Read; | ||
2556 | 2533 | d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2557 | 2534 | d->fxState[0].size = elementSize; | ||
2558 | 2535 | - d->fxState[1].fx = Ifx_Write; | ||
2559 | 2536 | - d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2560 | 2537 | - d->fxState[1].size = sizeof(V128); | ||
2561 | 2538 | + d->fxState[1].fx = Ifx_Read; | ||
2562 | 2539 | + d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2563 | 2540 | + d->fxState[1].size = elementSize; | ||
2564 | 2541 | + d->fxState[2].fx = Ifx_Write; | ||
2565 | 2542 | + d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2566 | 2543 | + d->fxState[2].size = sizeof(V128); | ||
2567 | 2544 | |||
2568 | 2545 | stmt(IRStmt_Dirty(d)); | ||
2569 | 2546 | s390_cc_set(cc); | ||
2570 | 2547 | + return "vfmax"; | ||
2571 | 2548 | +} | ||
2572 | 2549 | |||
2573 | 2550 | - return "vftci"; | ||
2574 | 2551 | +static const HChar * | ||
2575 | 2552 | +s390_irgen_VBPERM(UChar v1, UChar v2, UChar v3) | ||
2576 | 2553 | +{ | ||
2577 | 2554 | + IRDirty* d; | ||
2578 | 2555 | + IRTemp cc = newTemp(Ity_I64); | ||
2579 | 2556 | + | ||
2580 | 2557 | + s390x_vec_op_details_t details = { .serialized = 0ULL }; | ||
2581 | 2558 | + details.op = S390_VEC_OP_VBPERM; | ||
2582 | 2559 | + details.v1 = v1; | ||
2583 | 2560 | + details.v2 = v2; | ||
2584 | 2561 | + details.v3 = v3; | ||
2585 | 2562 | + details.m4 = 0; | ||
2586 | 2563 | + details.m5 = 0; | ||
2587 | 2564 | + details.m6 = 0; | ||
2588 | 2565 | + | ||
2589 | 2566 | + d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_vec_op", | ||
2590 | 2567 | + &s390x_dirtyhelper_vec_op, | ||
2591 | 2568 | + mkIRExprVec_2(IRExpr_GSPTR(), | ||
2592 | 2569 | + mkU64(details.serialized))); | ||
2593 | 2570 | + | ||
2594 | 2571 | + d->nFxState = 3; | ||
2595 | 2572 | + vex_bzero(&d->fxState, sizeof(d->fxState)); | ||
2596 | 2573 | + d->fxState[0].fx = Ifx_Read; | ||
2597 | 2574 | + d->fxState[0].offset = S390X_GUEST_OFFSET(guest_v0) + v2 * sizeof(V128); | ||
2598 | 2575 | + d->fxState[0].size = sizeof(V128); | ||
2599 | 2576 | + d->fxState[1].fx = Ifx_Read; | ||
2600 | 2577 | + d->fxState[1].offset = S390X_GUEST_OFFSET(guest_v0) + v3 * sizeof(V128); | ||
2601 | 2578 | + d->fxState[1].size = sizeof(V128); | ||
2602 | 2579 | + d->fxState[2].fx = Ifx_Write; | ||
2603 | 2580 | + d->fxState[2].offset = S390X_GUEST_OFFSET(guest_v0) + v1 * sizeof(V128); | ||
2604 | 2581 | + d->fxState[2].size = sizeof(V128); | ||
2605 | 2582 | + | ||
2606 | 2583 | + stmt(IRStmt_Dirty(d)); | ||
2607 | 2584 | + s390_cc_set(cc); | ||
2608 | 2585 | + return "vbperm"; | ||
2609 | 2586 | } | ||
2610 | 2587 | |||
2611 | 2588 | /* New insns are added here. | ||
2612 | 2589 | @@ -20486,11 +20751,23 @@ | ||
2613 | 2590 | RXY_dl2(ovl), | ||
2614 | 2591 | RXY_dh2(ovl)); goto ok; | ||
2615 | 2592 | case 0xe60000000034ULL: /* VPKZ */ goto unimplemented; | ||
2616 | 2593 | - case 0xe60000000035ULL: /* VLRL */ goto unimplemented; | ||
2617 | 2594 | - case 0xe60000000037ULL: /* VLRLR */ goto unimplemented; | ||
2618 | 2595 | + case 0xe60000000035ULL: s390_format_VSI_URDV(s390_irgen_VLRL, VSI_v1(ovl), | ||
2619 | 2596 | + VSI_b2(ovl), VSI_d2(ovl), | ||
2620 | 2597 | + VSI_i3(ovl), | ||
2621 | 2598 | + VSI_rxb(ovl)); goto ok; | ||
2622 | 2599 | + case 0xe60000000037ULL: s390_format_VRS_RRDV(s390_irgen_VLRLR, VRSd_v1(ovl), | ||
2623 | 2600 | + VRSd_r3(ovl), VRS_b2(ovl), | ||
2624 | 2601 | + VRS_d2(ovl), | ||
2625 | 2602 | + VRS_rxb(ovl)); goto ok; | ||
2626 | 2603 | case 0xe6000000003cULL: /* VUPKZ */ goto unimplemented; | ||
2627 | 2604 | - case 0xe6000000003dULL: /* VSTRL */ goto unimplemented; | ||
2628 | 2605 | - case 0xe6000000003fULL: /* VSTRLR */ goto unimplemented; | ||
2629 | 2606 | + case 0xe6000000003dULL: s390_format_VSI_URDV(s390_irgen_VSTRL, VSI_v1(ovl), | ||
2630 | 2607 | + VSI_b2(ovl), VSI_d2(ovl), | ||
2631 | 2608 | + VSI_i3(ovl), | ||
2632 | 2609 | + VSI_rxb(ovl)); goto ok; | ||
2633 | 2610 | + case 0xe6000000003fULL: s390_format_VRS_RRDV(s390_irgen_VSTRLR, VRSd_v1(ovl), | ||
2634 | 2611 | + VRSd_r3(ovl), VRS_b2(ovl), | ||
2635 | 2612 | + VRS_d2(ovl), | ||
2636 | 2613 | + VRS_rxb(ovl)); goto ok; | ||
2637 | 2614 | case 0xe60000000049ULL: /* VLIP */ goto unimplemented; | ||
2638 | 2615 | case 0xe60000000050ULL: /* VCVB */ goto unimplemented; | ||
2639 | 2616 | case 0xe60000000052ULL: /* VCVBG */ goto unimplemented; | ||
2640 | 2617 | @@ -20688,12 +20965,18 @@ | ||
2641 | 2618 | case 0xe7000000006bULL: s390_format_VRR_VVV(s390_irgen_VNO, VRR_v1(ovl), | ||
2642 | 2619 | VRR_v2(ovl), VRR_r3(ovl), | ||
2643 | 2620 | VRR_rxb(ovl)); goto ok; | ||
2644 | 2621 | - case 0xe7000000006cULL: /* VNX */ goto unimplemented; | ||
2645 | 2622 | + case 0xe7000000006cULL: s390_format_VRR_VVV(s390_irgen_VNX, VRR_v1(ovl), | ||
2646 | 2623 | + VRR_v2(ovl), VRR_r3(ovl), | ||
2647 | 2624 | + VRR_rxb(ovl)); goto ok; | ||
2648 | 2625 | case 0xe7000000006dULL: s390_format_VRR_VVV(s390_irgen_VX, VRR_v1(ovl), | ||
2649 | 2626 | VRR_v2(ovl), VRR_r3(ovl), | ||
2650 | 2627 | VRR_rxb(ovl)); goto ok; | ||
2651 | 2628 | - case 0xe7000000006eULL: /* VNN */ goto unimplemented; | ||
2652 | 2629 | - case 0xe7000000006fULL: /* VOC */ goto unimplemented; | ||
2653 | 2630 | + case 0xe7000000006eULL: s390_format_VRR_VVV(s390_irgen_VNN, VRR_v1(ovl), | ||
2654 | 2631 | + VRR_v2(ovl), VRR_r3(ovl), | ||
2655 | 2632 | + VRR_rxb(ovl)); goto ok; | ||
2656 | 2633 | + case 0xe7000000006fULL: s390_format_VRR_VVV(s390_irgen_VOC, VRR_v1(ovl), | ||
2657 | 2634 | + VRR_v2(ovl), VRR_r3(ovl), | ||
2658 | 2635 | + VRR_rxb(ovl)); goto ok; | ||
2659 | 2636 | case 0xe70000000070ULL: s390_format_VRR_VVVM(s390_irgen_VESLV, VRR_v1(ovl), | ||
2660 | 2637 | VRR_v2(ovl), VRR_r3(ovl), | ||
2661 | 2638 | VRR_m4(ovl), VRR_rxb(ovl)); goto ok; | ||
2662 | 2639 | @@ -20746,7 +21029,9 @@ | ||
2663 | 2640 | case 0xe70000000084ULL: s390_format_VRR_VVVM(s390_irgen_VPDI, VRR_v1(ovl), | ||
2664 | 2641 | VRR_v2(ovl), VRR_r3(ovl), | ||
2665 | 2642 | VRR_m4(ovl), VRR_rxb(ovl)); goto ok; | ||
2666 | 2643 | - case 0xe70000000085ULL: /* VBPERM */ goto unimplemented; | ||
2667 | 2644 | + case 0xe70000000085ULL: s390_format_VRR_VVV(s390_irgen_VBPERM, VRR_v1(ovl), | ||
2668 | 2645 | + VRR_v2(ovl), VRR_r3(ovl), | ||
2669 | 2646 | + VRR_rxb(ovl)); goto ok; | ||
2670 | 2647 | case 0xe7000000008aULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRC, VRRd_v1(ovl), | ||
2671 | 2648 | VRRd_v2(ovl), VRRd_v3(ovl), | ||
2672 | 2649 | VRRd_v4(ovl), VRRd_m5(ovl), | ||
2673 | 2650 | @@ -20777,8 +21062,16 @@ | ||
2674 | 2651 | case 0xe70000000097ULL: s390_format_VRR_VVVMM(s390_irgen_VPKS, VRR_v1(ovl), | ||
2675 | 2652 | VRR_v2(ovl), VRR_r3(ovl), | ||
2676 | 2653 | VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl)); goto ok; | ||
2677 | 2654 | - case 0xe7000000009eULL: /* VFNMS */ goto unimplemented; | ||
2678 | 2655 | - case 0xe7000000009fULL: /* VFNMA */ goto unimplemented; | ||
2679 | 2656 | + case 0xe7000000009eULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMS, VRRe_v1(ovl), | ||
2680 | 2657 | + VRRe_v2(ovl), VRRe_v3(ovl), | ||
2681 | 2658 | + VRRe_v4(ovl), VRRe_m5(ovl), | ||
2682 | 2659 | + VRRe_m6(ovl), | ||
2683 | 2660 | + VRRe_rxb(ovl)); goto ok; | ||
2684 | 2661 | + case 0xe7000000009fULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMA, VRRe_v1(ovl), | ||
2685 | 2662 | + VRRe_v2(ovl), VRRe_v3(ovl), | ||
2686 | 2663 | + VRRe_v4(ovl), VRRe_m5(ovl), | ||
2687 | 2664 | + VRRe_m6(ovl), | ||
2688 | 2665 | + VRRe_rxb(ovl)); goto ok; | ||
2689 | 2666 | case 0xe700000000a1ULL: s390_format_VRR_VVVM(s390_irgen_VMLH, VRR_v1(ovl), | ||
2690 | 2667 | VRR_v2(ovl), VRR_r3(ovl), | ||
2691 | 2668 | VRR_m4(ovl), VRR_rxb(ovl)); goto ok; | ||
2692 | 2669 | @@ -20831,7 +21124,11 @@ | ||
2693 | 2670 | case 0xe700000000b4ULL: s390_format_VRR_VVVM(s390_irgen_VGFM, VRR_v1(ovl), | ||
2694 | 2671 | VRR_v2(ovl), VRR_r3(ovl), | ||
2695 | 2672 | VRR_m4(ovl), VRR_rxb(ovl)); goto ok; | ||
2696 | 2673 | - case 0xe700000000b8ULL: /* VMSL */ goto unimplemented; | ||
2697 | 2674 | + case 0xe700000000b8ULL: s390_format_VRR_VVVVMM(s390_irgen_VMSL, VRRd_v1(ovl), | ||
2698 | 2675 | + VRRd_v2(ovl), VRRd_v3(ovl), | ||
2699 | 2676 | + VRRd_v4(ovl), VRRd_m5(ovl), | ||
2700 | 2677 | + VRRd_m6(ovl), | ||
2701 | 2678 | + VRRd_rxb(ovl)); goto ok; | ||
2702 | 2679 | case 0xe700000000b9ULL: s390_format_VRRd_VVVVM(s390_irgen_VACCC, VRRd_v1(ovl), | ||
2703 | 2680 | VRRd_v2(ovl), VRRd_v3(ovl), | ||
2704 | 2681 | VRRd_v4(ovl), VRRd_m5(ovl), | ||
2705 | 2682 | @@ -20868,11 +21165,11 @@ | ||
2706 | 2683 | VRRa_v2(ovl), VRRa_m3(ovl), | ||
2707 | 2684 | VRRa_m4(ovl), VRRa_m5(ovl), | ||
2708 | 2685 | VRRa_rxb(ovl)); goto ok; | ||
2709 | 2686 | - case 0xe700000000c4ULL: s390_format_VRRa_VVMMM(s390_irgen_VLDE, VRRa_v1(ovl), | ||
2710 | 2687 | + case 0xe700000000c4ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLL, VRRa_v1(ovl), | ||
2711 | 2688 | VRRa_v2(ovl), VRRa_m3(ovl), | ||
2712 | 2689 | VRRa_m4(ovl), VRRa_m5(ovl), | ||
2713 | 2690 | VRRa_rxb(ovl)); goto ok; | ||
2714 | 2691 | - case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VLED, VRRa_v1(ovl), | ||
2715 | 2692 | + case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLR, VRRa_v1(ovl), | ||
2716 | 2693 | VRRa_v2(ovl), VRRa_m3(ovl), | ||
2717 | 2694 | VRRa_m4(ovl), VRRa_m5(ovl), | ||
2718 | 2695 | VRRa_rxb(ovl)); goto ok; | ||
2719 | 2696 | @@ -20953,8 +21250,16 @@ | ||
2720 | 2697 | VRRa_m3(ovl), VRRa_m4(ovl), | ||
2721 | 2698 | VRRa_m5(ovl), | ||
2722 | 2699 | VRRa_rxb(ovl)); goto ok; | ||
2723 | 2700 | - case 0xe700000000eeULL: /* VFMIN */ goto unimplemented; | ||
2724 | 2701 | - case 0xe700000000efULL: /* VFMAX */ goto unimplemented; | ||
2725 | 2702 | + case 0xe700000000eeULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMIN, VRRa_v1(ovl), | ||
2726 | 2703 | + VRRa_v2(ovl), VRRa_v3(ovl), | ||
2727 | 2704 | + VRRa_m3(ovl), VRRa_m4(ovl), | ||
2728 | 2705 | + VRRa_m5(ovl), | ||
2729 | 2706 | + VRRa_rxb(ovl)); goto ok; | ||
2730 | 2707 | + case 0xe700000000efULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMAX, VRRa_v1(ovl), | ||
2731 | 2708 | + VRRa_v2(ovl), VRRa_v3(ovl), | ||
2732 | 2709 | + VRRa_m3(ovl), VRRa_m4(ovl), | ||
2733 | 2710 | + VRRa_m5(ovl), | ||
2734 | 2711 | + VRRa_rxb(ovl)); goto ok; | ||
2735 | 2712 | case 0xe700000000f0ULL: s390_format_VRR_VVVM(s390_irgen_VAVGL, VRR_v1(ovl), | ||
2736 | 2713 | VRR_v2(ovl), VRR_r3(ovl), | ||
2737 | 2714 | VRR_m4(ovl), VRR_rxb(ovl)); goto ok; | ||
2738 | 2715 | --- a/VEX/priv/host_s390_defs.c | ||
2739 | 2716 | +++ b/VEX/priv/host_s390_defs.c | ||
2740 | 2717 | @@ -8,7 +8,7 @@ | ||
2741 | 2718 | This file is part of Valgrind, a dynamic binary instrumentation | ||
2742 | 2719 | framework. | ||
2743 | 2720 | |||
2744 | 2721 | - Copyright IBM Corp. 2010-2017 | ||
2745 | 2722 | + Copyright IBM Corp. 2010-2020 | ||
2746 | 2723 | Copyright (C) 2012-2017 Florian Krohm (britzel@acm.org) | ||
2747 | 2724 | |||
2748 | 2725 | This program is free software; you can redistribute it and/or | ||
2749 | 2726 | @@ -684,6 +684,8 @@ | ||
2750 | 2727 | switch (hregClass(from)) { | ||
2751 | 2728 | case HRcInt64: | ||
2752 | 2729 | return s390_insn_move(sizeofIRType(Ity_I64), to, from); | ||
2753 | 2730 | + case HRcFlt64: | ||
2754 | 2731 | + return s390_insn_move(sizeofIRType(Ity_F64), to, from); | ||
2755 | 2732 | case HRcVec128: | ||
2756 | 2733 | return s390_insn_move(sizeofIRType(Ity_V128), to, from); | ||
2757 | 2734 | default: | ||
2758 | 2735 | @@ -7870,6 +7872,10 @@ | ||
2759 | 2736 | op = "v-vfloatabs"; | ||
2760 | 2737 | break; | ||
2761 | 2738 | |||
2762 | 2739 | + case S390_VEC_FLOAT_NABS: | ||
2763 | 2740 | + op = "v-vfloatnabs"; | ||
2764 | 2741 | + break; | ||
2765 | 2742 | + | ||
2766 | 2743 | default: | ||
2767 | 2744 | goto fail; | ||
2768 | 2745 | } | ||
2769 | 2746 | @@ -9439,21 +9445,28 @@ | ||
2770 | 2747 | |||
2771 | 2748 | case S390_VEC_FLOAT_NEG: { | ||
2772 | 2749 | vassert(insn->variant.unop.src.tag == S390_OPND_REG); | ||
2773 | 2750 | - vassert(insn->size == 8); | ||
2774 | 2751 | + vassert(insn->size >= 4); | ||
2775 | 2752 | UChar v1 = hregNumber(insn->variant.unop.dst); | ||
2776 | 2753 | UChar v2 = hregNumber(insn->variant.unop.src.variant.reg); | ||
2777 | 2754 | return s390_emit_VFPSO(buf, v1, v2, s390_getM_from_size(insn->size), 0, 0); | ||
2778 | 2755 | } | ||
2779 | 2756 | case S390_VEC_FLOAT_ABS: { | ||
2780 | 2757 | vassert(insn->variant.unop.src.tag == S390_OPND_REG); | ||
2781 | 2758 | - vassert(insn->size == 8); | ||
2782 | 2759 | + vassert(insn->size >= 4); | ||
2783 | 2760 | UChar v1 = hregNumber(insn->variant.unop.dst); | ||
2784 | 2761 | UChar v2 = hregNumber(insn->variant.unop.src.variant.reg); | ||
2785 | 2762 | return s390_emit_VFPSO(buf, v1, v2, s390_getM_from_size(insn->size), 0, 2); | ||
2786 | 2763 | } | ||
2787 | 2764 | + case S390_VEC_FLOAT_NABS: { | ||
2788 | 2765 | + vassert(insn->variant.unop.src.tag == S390_OPND_REG); | ||
2789 | 2766 | + vassert(insn->size >= 4); | ||
2790 | 2767 | + UChar v1 = hregNumber(insn->variant.unop.dst); | ||
2791 | 2768 | + UChar v2 = hregNumber(insn->variant.unop.src.variant.reg); | ||
2792 | 2769 | + return s390_emit_VFPSO(buf, v1, v2, s390_getM_from_size(insn->size), 0, 1); | ||
2793 | 2770 | + } | ||
2794 | 2771 | case S390_VEC_FLOAT_SQRT: { | ||
2795 | 2772 | vassert(insn->variant.unop.src.tag == S390_OPND_REG); | ||
2796 | 2773 | - vassert(insn->size == 8); | ||
2797 | 2774 | + vassert(insn->size >= 4); | ||
2798 | 2775 | UChar v1 = hregNumber(insn->variant.unop.dst); | ||
2799 | 2776 | UChar v2 = hregNumber(insn->variant.unop.src.variant.reg); | ||
2800 | 2777 | return s390_emit_VFSQ(buf, v1, v2, s390_getM_from_size(insn->size), 0); | ||
2801 | 2778 | --- a/VEX/priv/host_s390_defs.h | ||
2802 | 2779 | +++ b/VEX/priv/host_s390_defs.h | ||
2803 | 2780 | @@ -8,7 +8,7 @@ | ||
2804 | 2781 | This file is part of Valgrind, a dynamic binary instrumentation | ||
2805 | 2782 | framework. | ||
2806 | 2783 | |||
2807 | 2784 | - Copyright IBM Corp. 2010-2017 | ||
2808 | 2785 | + Copyright IBM Corp. 2010-2020 | ||
2809 | 2786 | |||
2810 | 2787 | This program is free software; you can redistribute it and/or | ||
2811 | 2788 | modify it under the terms of the GNU General Public License as | ||
2812 | 2789 | @@ -205,6 +205,7 @@ | ||
2813 | 2790 | S390_VEC_COUNT_ONES, | ||
2814 | 2791 | S390_VEC_FLOAT_NEG, | ||
2815 | 2792 | S390_VEC_FLOAT_ABS, | ||
2816 | 2793 | + S390_VEC_FLOAT_NABS, | ||
2817 | 2794 | S390_VEC_FLOAT_SQRT, | ||
2818 | 2795 | S390_UNOP_T_INVALID | ||
2819 | 2796 | } s390_unop_t; | ||
2820 | 2797 | @@ -931,6 +932,8 @@ | ||
2821 | 2798 | (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA5)) | ||
2822 | 2799 | #define s390_host_has_lsc2 \ | ||
2823 | 2800 | (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC2)) | ||
2824 | 2801 | +#define s390_host_has_vxe \ | ||
2825 | 2802 | + (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXE)) | ||
2826 | 2803 | #endif /* ndef __VEX_HOST_S390_DEFS_H */ | ||
2827 | 2804 | |||
2828 | 2805 | /*---------------------------------------------------------------*/ | ||
2829 | 2806 | --- a/VEX/priv/host_s390_isel.c | ||
2830 | 2807 | +++ b/VEX/priv/host_s390_isel.c | ||
2831 | 2808 | @@ -8,7 +8,7 @@ | ||
2832 | 2809 | This file is part of Valgrind, a dynamic binary instrumentation | ||
2833 | 2810 | framework. | ||
2834 | 2811 | |||
2835 | 2812 | - Copyright IBM Corp. 2010-2017 | ||
2836 | 2813 | + Copyright IBM Corp. 2010-2020 | ||
2837 | 2814 | Copyright (C) 2012-2017 Florian Krohm (britzel@acm.org) | ||
2838 | 2815 | |||
2839 | 2816 | This program is free software; you can redistribute it and/or | ||
2840 | 2817 | @@ -2362,9 +2362,10 @@ | ||
2841 | 2818 | case Iop_NegF128: | ||
2842 | 2819 | if (left->tag == Iex_Unop && | ||
2843 | 2820 | (left->Iex.Unop.op == Iop_AbsF32 || | ||
2844 | 2821 | - left->Iex.Unop.op == Iop_AbsF64)) | ||
2845 | 2822 | + left->Iex.Unop.op == Iop_AbsF64)) { | ||
2846 | 2823 | bfpop = S390_BFP_NABS; | ||
2847 | 2824 | - else | ||
2848 | 2825 | + left = left->Iex.Unop.arg; | ||
2849 | 2826 | + } else | ||
2850 | 2827 | bfpop = S390_BFP_NEG; | ||
2851 | 2828 | goto float128_opnd; | ||
2852 | 2829 | case Iop_AbsF128: bfpop = S390_BFP_ABS; goto float128_opnd; | ||
2853 | 2830 | @@ -2726,9 +2727,10 @@ | ||
2854 | 2831 | case Iop_NegF64: | ||
2855 | 2832 | if (left->tag == Iex_Unop && | ||
2856 | 2833 | (left->Iex.Unop.op == Iop_AbsF32 || | ||
2857 | 2834 | - left->Iex.Unop.op == Iop_AbsF64)) | ||
2858 | 2835 | + left->Iex.Unop.op == Iop_AbsF64)) { | ||
2859 | 2836 | bfpop = S390_BFP_NABS; | ||
2860 | 2837 | - else | ||
2861 | 2838 | + left = left->Iex.Unop.arg; | ||
2862 | 2839 | + } else | ||
2863 | 2840 | bfpop = S390_BFP_NEG; | ||
2864 | 2841 | break; | ||
2865 | 2842 | |||
2866 | 2843 | @@ -3944,11 +3946,27 @@ | ||
2867 | 2844 | vec_unop = S390_VEC_COUNT_ONES; | ||
2868 | 2845 | goto Iop_V_wrk; | ||
2869 | 2846 | |||
2870 | 2847 | + case Iop_Neg32Fx4: | ||
2871 | 2848 | + size = 4; | ||
2872 | 2849 | + vec_unop = S390_VEC_FLOAT_NEG; | ||
2873 | 2850 | + if (arg->tag == Iex_Unop && arg->Iex.Unop.op == Iop_Abs32Fx4) { | ||
2874 | 2851 | + vec_unop = S390_VEC_FLOAT_NABS; | ||
2875 | 2852 | + arg = arg->Iex.Unop.arg; | ||
2876 | 2853 | + } | ||
2877 | 2854 | + goto Iop_V_wrk; | ||
2878 | 2855 | case Iop_Neg64Fx2: | ||
2879 | 2856 | size = 8; | ||
2880 | 2857 | vec_unop = S390_VEC_FLOAT_NEG; | ||
2881 | 2858 | + if (arg->tag == Iex_Unop && arg->Iex.Unop.op == Iop_Abs64Fx2) { | ||
2882 | 2859 | + vec_unop = S390_VEC_FLOAT_NABS; | ||
2883 | 2860 | + arg = arg->Iex.Unop.arg; | ||
2884 | 2861 | + } | ||
2885 | 2862 | goto Iop_V_wrk; | ||
2886 | 2863 | |||
2887 | 2864 | + case Iop_Abs32Fx4: | ||
2888 | 2865 | + size = 4; | ||
2889 | 2866 | + vec_unop = S390_VEC_FLOAT_ABS; | ||
2890 | 2867 | + goto Iop_V_wrk; | ||
2891 | 2868 | case Iop_Abs64Fx2: | ||
2892 | 2869 | size = 8; | ||
2893 | 2870 | vec_unop = S390_VEC_FLOAT_ABS; | ||
2894 | 2871 | @@ -4474,17 +4492,29 @@ | ||
2895 | 2872 | vec_binop = S390_VEC_ELEM_ROLL_V; | ||
2896 | 2873 | goto Iop_VV_wrk; | ||
2897 | 2874 | |||
2898 | 2875 | + case Iop_CmpEQ32Fx4: | ||
2899 | 2876 | + size = 4; | ||
2900 | 2877 | + vec_binop = S390_VEC_FLOAT_COMPARE_EQUAL; | ||
2901 | 2878 | + goto Iop_VV_wrk; | ||
2902 | 2879 | case Iop_CmpEQ64Fx2: | ||
2903 | 2880 | size = 8; | ||
2904 | 2881 | vec_binop = S390_VEC_FLOAT_COMPARE_EQUAL; | ||
2905 | 2882 | goto Iop_VV_wrk; | ||
2906 | 2883 | |||
2907 | 2884 | + case Iop_CmpLE32Fx4: | ||
2908 | 2885 | + size = 4; | ||
2909 | 2886 | + vec_binop = S390_VEC_FLOAT_COMPARE_LESS_OR_EQUAL; | ||
2910 | 2887 | + goto Iop_VV_wrk; | ||
2911 | 2888 | case Iop_CmpLE64Fx2: { | ||
2912 | 2889 | size = 8; | ||
2913 | 2890 | vec_binop = S390_VEC_FLOAT_COMPARE_LESS_OR_EQUAL; | ||
2914 | 2891 | goto Iop_VV_wrk; | ||
2915 | 2892 | } | ||
2916 | 2893 | |||
2917 | 2894 | + case Iop_CmpLT32Fx4: | ||
2918 | 2895 | + size = 4; | ||
2919 | 2896 | + vec_binop = S390_VEC_FLOAT_COMPARE_LESS; | ||
2920 | 2897 | + goto Iop_VV_wrk; | ||
2921 | 2898 | case Iop_CmpLT64Fx2: { | ||
2922 | 2899 | size = 8; | ||
2923 | 2900 | vec_binop = S390_VEC_FLOAT_COMPARE_LESS; | ||
2924 | 2901 | @@ -4671,20 +4701,41 @@ | ||
2925 | 2902 | dst, reg1, reg2, reg3)); | ||
2926 | 2903 | return dst; | ||
2927 | 2904 | |||
2928 | 2905 | + case Iop_Add32Fx4: | ||
2929 | 2906 | + size = 4; | ||
2930 | 2907 | + vec_binop = S390_VEC_FLOAT_ADD; | ||
2931 | 2908 | + goto Iop_irrm_VV_wrk; | ||
2932 | 2909 | + | ||
2933 | 2910 | case Iop_Add64Fx2: | ||
2934 | 2911 | size = 8; | ||
2935 | 2912 | vec_binop = S390_VEC_FLOAT_ADD; | ||
2936 | 2913 | goto Iop_irrm_VV_wrk; | ||
2937 | 2914 | |||
2938 | 2915 | + case Iop_Sub32Fx4: | ||
2939 | 2916 | + size = 4; | ||
2940 | 2917 | + vec_binop = S390_VEC_FLOAT_SUB; | ||
2941 | 2918 | + goto Iop_irrm_VV_wrk; | ||
2942 | 2919 | + | ||
2943 | 2920 | case Iop_Sub64Fx2: | ||
2944 | 2921 | size = 8; | ||
2945 | 2922 | vec_binop = S390_VEC_FLOAT_SUB; | ||
2946 | 2923 | goto Iop_irrm_VV_wrk; | ||
2947 | 2924 | |||
2948 | 2925 | + case Iop_Mul32Fx4: | ||
2949 | 2926 | + size = 4; | ||
2950 | 2927 | + vec_binop = S390_VEC_FLOAT_MUL; | ||
2951 | 2928 | + goto Iop_irrm_VV_wrk; | ||
2952 | 2929 | + | ||
2953 | 2930 | case Iop_Mul64Fx2: | ||
2954 | 2931 | size = 8; | ||
2955 | 2932 | vec_binop = S390_VEC_FLOAT_MUL; | ||
2956 | 2933 | goto Iop_irrm_VV_wrk; | ||
2957 | 2934 | + | ||
2958 | 2935 | + case Iop_Div32Fx4: | ||
2959 | 2936 | + size = 4; | ||
2960 | 2937 | + vec_binop = S390_VEC_FLOAT_DIV; | ||
2961 | 2938 | + goto Iop_irrm_VV_wrk; | ||
2962 | 2939 | + | ||
2963 | 2940 | case Iop_Div64Fx2: | ||
2964 | 2941 | size = 8; | ||
2965 | 2942 | vec_binop = S390_VEC_FLOAT_DIV; | ||
2966 | 2943 | --- a/VEX/priv/main_main.c | ||
2967 | 2944 | +++ b/VEX/priv/main_main.c | ||
2968 | 2945 | @@ -1792,6 +1792,7 @@ | ||
2969 | 2946 | { VEX_HWCAPS_S390X_MSA5, "msa5" }, | ||
2970 | 2947 | { VEX_HWCAPS_S390X_MI2, "mi2" }, | ||
2971 | 2948 | { VEX_HWCAPS_S390X_LSC2, "lsc2" }, | ||
2972 | 2949 | + { VEX_HWCAPS_S390X_LSC2, "vxe" }, | ||
2973 | 2950 | }; | ||
2974 | 2951 | /* Allocate a large enough buffer */ | ||
2975 | 2952 | static HChar buf[sizeof prefix + | ||
2976 | 2953 | --- a/VEX/pub/libvex_emnote.h | ||
2977 | 2954 | +++ b/VEX/pub/libvex_emnote.h | ||
2978 | 2955 | @@ -124,6 +124,10 @@ | ||
2979 | 2956 | /* ppno insn is not supported on this host */ | ||
2980 | 2957 | EmFail_S390X_ppno, | ||
2981 | 2958 | |||
2982 | 2959 | + /* insn needs vector-enhancements facility which is not available on this | ||
2983 | 2960 | + host */ | ||
2984 | 2961 | + EmFail_S390X_vxe, | ||
2985 | 2962 | + | ||
2986 | 2963 | EmNote_NUMBER | ||
2987 | 2964 | } | ||
2988 | 2965 | VexEmNote; | ||
2989 | 2966 | --- a/VEX/pub/libvex.h | ||
2990 | 2967 | +++ b/VEX/pub/libvex.h | ||
2991 | 2968 | @@ -167,7 +167,7 @@ | ||
2992 | 2969 | #define VEX_HWCAPS_S390X_MSA5 (1<<19) /* message security assistance facility */ | ||
2993 | 2970 | #define VEX_HWCAPS_S390X_MI2 (1<<20) /* miscellaneous-instruction-extensions facility 2 */ | ||
2994 | 2971 | #define VEX_HWCAPS_S390X_LSC2 (1<<21) /* Conditional load/store facility2 */ | ||
2995 | 2972 | - | ||
2996 | 2973 | +#define VEX_HWCAPS_S390X_VXE (1<<22) /* Vector-enhancements facility */ | ||
2997 | 2974 | |||
2998 | 2975 | /* Special value representing all available s390x hwcaps */ | ||
2999 | 2976 | #define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_LDISP | \ | ||
3000 | 2977 | @@ -185,7 +185,8 @@ | ||
3001 | 2978 | VEX_HWCAPS_S390X_VX | \ | ||
3002 | 2979 | VEX_HWCAPS_S390X_MSA5 | \ | ||
3003 | 2980 | VEX_HWCAPS_S390X_MI2 | \ | ||
3004 | 2981 | - VEX_HWCAPS_S390X_LSC2) | ||
3005 | 2982 | + VEX_HWCAPS_S390X_LSC2 | \ | ||
3006 | 2983 | + VEX_HWCAPS_S390X_VXE) | ||
3007 | 2984 | |||
3008 | 2985 | #define VEX_HWCAPS_S390X(x) ((x) & ~VEX_S390X_MODEL_MASK) | ||
3009 | 2986 | #define VEX_S390X_MODEL(x) ((x) & VEX_S390X_MODEL_MASK) | ||
3010 | diff --git a/debian/patches/lp-1825343-Bug-428648-s390x-Force-12-bit-amode-for-vector-loads.patch b/debian/patches/lp-1825343-Bug-428648-s390x-Force-12-bit-amode-for-vector-loads.patch | |||
3011 | 0 | new file mode 100644 | 2987 | new file mode 100644 |
3012 | index 0000000..a62098a | |||
3013 | --- /dev/null | |||
3014 | +++ b/debian/patches/lp-1825343-Bug-428648-s390x-Force-12-bit-amode-for-vector-loads.patch | |||
3015 | @@ -0,0 +1,45 @@ | |||
3016 | 1 | From ba73f8d2ebe4b5fe8163ee5ab806f0e50961ebdf Mon Sep 17 00:00:00 2001 | ||
3017 | 2 | From: Andreas Arnez <arnez@linux.ibm.com> | ||
3018 | 3 | Date: Tue, 3 Nov 2020 18:17:30 +0100 | ||
3019 | 4 | Subject: [PATCH] Bug 428648 - s390x: Force 12-bit amode for vector loads in isel | ||
3020 | 5 | |||
3021 | 6 | Similar to Bug 417452, where the instruction selector sometimes attempted | ||
3022 | 7 | to generate vector stores with a 20-bit displacement, the same problem has | ||
3023 | 8 | now been reported with vector loads. | ||
3024 | 9 | |||
3025 | 10 | The problem is caused in s390_isel_vec_expr_wrk(), where the addressing | ||
3026 | 11 | mode is generated with s390_isel_amode() instead of | ||
3027 | 12 | s390_isel_amode_short(). This is fixed. | ||
3028 | 13 | |||
3029 | 14 | Author: Andreas Arnez <arnez@linux.ibm.com> | ||
3030 | 15 | Origin: backport, https://sourceware.org/git/?p=valgrind.git;a=commit;h=ba73f8d2e | ||
3031 | 16 | Bug-IBM: IBM Bugzilla 163660 | ||
3032 | 17 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1825343 | ||
3033 | 18 | Applied-Upstream: > v3.16.1 | ||
3034 | 19 | Reviewed-by: Frank Heimes <frank.heimes@canonical.com> | ||
3035 | 20 | Last-Update: 2021-02-10 | ||
3036 | 21 | |||
3037 | 22 | --- | ||
3038 | 23 | NEWS | 1 + | ||
3039 | 24 | VEX/priv/host_s390_isel.c | 2 +- | ||
3040 | 25 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
3041 | 26 | --- a/NEWS | ||
3042 | 27 | +++ b/NEWS | ||
3043 | 28 | @@ -1,4 +1,6 @@ | ||
3044 | 29 | |||
3045 | 30 | +428648 s390_emit_load_mem panics due to 20-bit offset for vector load | ||
3046 | 31 | + | ||
3047 | 32 | Release 3.16.1 (22 June 2020) | ||
3048 | 33 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3049 | 34 | |||
3050 | 35 | --- a/VEX/priv/host_s390_isel.c | ||
3051 | 36 | +++ b/VEX/priv/host_s390_isel.c | ||
3052 | 37 | @@ -3741,7 +3741,7 @@ | ||
3053 | 38 | /* --------- LOAD --------- */ | ||
3054 | 39 | case Iex_Load: { | ||
3055 | 40 | HReg dst = newVRegV(env); | ||
3056 | 41 | - s390_amode *am = s390_isel_amode(env, expr->Iex.Load.addr); | ||
3057 | 42 | + s390_amode *am = s390_isel_amode_short(env, expr->Iex.Load.addr); | ||
3058 | 43 | |||
3059 | 44 | if (expr->Iex.Load.end != Iend_BE) | ||
3060 | 45 | goto irreducible; | ||
3061 | diff --git a/debian/patches/lp-1825343-Bug-429864-s390-Use-Iop_CasCmp-to-fix-memcheck-false.patch b/debian/patches/lp-1825343-Bug-429864-s390-Use-Iop_CasCmp-to-fix-memcheck-false.patch | |||
3062 | 0 | new file mode 100644 | 46 | new file mode 100644 |
3063 | index 0000000..94c81f8 | |||
3064 | --- /dev/null | |||
3065 | +++ b/debian/patches/lp-1825343-Bug-429864-s390-Use-Iop_CasCmp-to-fix-memcheck-false.patch | |||
3066 | @@ -0,0 +1,155 @@ | |||
3067 | 1 | From 5adeafad7a60b63786d9545e6980de26c17cb0a6 Mon Sep 17 00:00:00 2001 | ||
3068 | 2 | From: Andreas Arnez <arnez@linux.ibm.com> | ||
3069 | 3 | Date: Thu, 3 Dec 2020 18:32:45 +0100 | ||
3070 | 4 | Subject: [PATCH] Bug 429864 - s390: Use Iop_CasCmp* to fix memcheck false | ||
3071 | 5 | positives | ||
3072 | 6 | |||
3073 | 7 | Compare-and-swap instructions can cause memcheck false positives when | ||
3074 | 8 | operating on partially uninitialized data. An example is where a 1-byte | ||
3075 | 9 | lock is allocated on the stack and then manipulated using CS on the | ||
3076 | 10 | surrounding word. This is correct, and the uninitialized data has no | ||
3077 | 11 | influence on the result, but memcheck still complains. | ||
3078 | 12 | |||
3079 | 13 | This is caused by logic in the s390 backend, where the expected and actual | ||
3080 | 14 | memory values are compared using Iop_Sub32. Fix this by using | ||
3081 | 15 | Iop_CasCmpNE32 instead. | ||
3082 | 16 | |||
3083 | 17 | Author: Andreas Arnez <arnez@linux.ibm.com> | ||
3084 | 18 | Origin: backport, https://sourceware.org/git/?p=valgrind.git;a=commit;h=5adeafad7 | ||
3085 | 19 | Bug-IBM: IBM Bugzilla 163660 | ||
3086 | 20 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1825343 | ||
3087 | 21 | Applied-Upstream: > v3.16.1 | ||
3088 | 22 | Reviewed-by: Frank Heimes <frank.heimes@canonical.com> | ||
3089 | 23 | Last-Update: 2021-02-10 | ||
3090 | 24 | |||
3091 | 25 | --- | ||
3092 | 26 | NEWS | 2 ++ | ||
3093 | 27 | VEX/priv/guest_s390_toIR.c | 31 ++++++++++++++----------------- | ||
3094 | 28 | 2 files changed, 16 insertions(+), 17 deletions(-) | ||
3095 | 29 | |||
3096 | 30 | --- a/NEWS | ||
3097 | 31 | +++ b/NEWS | ||
3098 | 32 | @@ -1,5 +1,7 @@ | ||
3099 | 33 | |||
3100 | 34 | 428648 s390_emit_load_mem panics due to 20-bit offset for vector load | ||
3101 | 35 | +429864 s390x: C++ atomic test_and_set yields false-positive memcheck | ||
3102 | 36 | + diagnostics | ||
3103 | 37 | |||
3104 | 38 | Release 3.16.1 (22 June 2020) | ||
3105 | 39 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3106 | 40 | --- a/VEX/priv/guest_s390_toIR.c | ||
3107 | 41 | +++ b/VEX/priv/guest_s390_toIR.c | ||
3108 | 42 | @@ -742,6 +742,9 @@ | ||
3109 | 43 | case Ity_I8: | ||
3110 | 44 | expr = unop(sign_extend ? Iop_8Sto64 : Iop_8Uto64, expr); | ||
3111 | 45 | break; | ||
3112 | 46 | + case Ity_I1: | ||
3113 | 47 | + expr = unop(sign_extend ? Iop_1Sto64 : Iop_1Uto64, expr); | ||
3114 | 48 | + break; | ||
3115 | 49 | default: | ||
3116 | 50 | vpanic("s390_cc_widen"); | ||
3117 | 51 | } | ||
3118 | 52 | @@ -7417,7 +7420,7 @@ | ||
3119 | 53 | |||
3120 | 54 | /* If old_mem contains the expected value, then the CAS succeeded. | ||
3121 | 55 | Otherwise, it did not */ | ||
3122 | 56 | - yield_if(binop(Iop_CmpNE32, mkexpr(old_mem), mkexpr(op2))); | ||
3123 | 57 | + yield_if(binop(Iop_CasCmpNE32, mkexpr(old_mem), mkexpr(op2))); | ||
3124 | 58 | put_gpr_w1(r1, mkexpr(old_mem)); | ||
3125 | 59 | } | ||
3126 | 60 | |||
3127 | 61 | @@ -7451,7 +7454,7 @@ | ||
3128 | 62 | |||
3129 | 63 | /* If old_mem contains the expected value, then the CAS succeeded. | ||
3130 | 64 | Otherwise, it did not */ | ||
3131 | 65 | - yield_if(binop(Iop_CmpNE64, mkexpr(old_mem), mkexpr(op2))); | ||
3132 | 66 | + yield_if(binop(Iop_CasCmpNE64, mkexpr(old_mem), mkexpr(op2))); | ||
3133 | 67 | put_gpr_dw0(r1, mkexpr(old_mem)); | ||
3134 | 68 | } | ||
3135 | 69 | |||
3136 | 70 | @@ -7481,7 +7484,7 @@ | ||
3137 | 71 | |||
3138 | 72 | /* If old_mem contains the expected value, then the CAS succeeded. | ||
3139 | 73 | Otherwise, it did not */ | ||
3140 | 74 | - yield_if(binop(Iop_CmpNE32, mkexpr(old_mem), mkexpr(op2))); | ||
3141 | 75 | + yield_if(binop(Iop_CasCmpNE32, mkexpr(old_mem), mkexpr(op2))); | ||
3142 | 76 | put_gpr_w1(r1, mkexpr(old_mem)); | ||
3143 | 77 | } | ||
3144 | 78 | |||
3145 | 79 | @@ -13864,7 +13867,6 @@ | ||
3146 | 80 | IRTemp op1 = newTemp(Ity_I32); | ||
3147 | 81 | IRTemp old_mem = newTemp(Ity_I32); | ||
3148 | 82 | IRTemp op3 = newTemp(Ity_I32); | ||
3149 | 83 | - IRTemp result = newTemp(Ity_I32); | ||
3150 | 84 | IRTemp nequal = newTemp(Ity_I1); | ||
3151 | 85 | |||
3152 | 86 | assign(op1, get_gpr_w1(r1)); | ||
3153 | 87 | @@ -13879,12 +13881,11 @@ | ||
3154 | 88 | stmt(IRStmt_CAS(cas)); | ||
3155 | 89 | |||
3156 | 90 | /* Set CC. Operands compared equal -> 0, else 1. */ | ||
3157 | 91 | - assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(old_mem))); | ||
3158 | 92 | - s390_cc_thunk_put1(S390_CC_OP_BITWISE, result, False); | ||
3159 | 93 | + assign(nequal, binop(Iop_CasCmpNE32, mkexpr(op1), mkexpr(old_mem))); | ||
3160 | 94 | + s390_cc_thunk_put1(S390_CC_OP_BITWISE, nequal, True); | ||
3161 | 95 | |||
3162 | 96 | /* If operands were equal (cc == 0) just store the old value op1 in r1. | ||
3163 | 97 | Otherwise, store the old_value from memory in r1 and yield. */ | ||
3164 | 98 | - assign(nequal, binop(Iop_CmpNE32, s390_call_calculate_cc(), mkU32(0))); | ||
3165 | 99 | put_gpr_w1(r1, mkite(mkexpr(nequal), mkexpr(old_mem), mkexpr(op1))); | ||
3166 | 100 | yield_if(mkexpr(nequal)); | ||
3167 | 101 | } | ||
3168 | 102 | @@ -13912,7 +13913,6 @@ | ||
3169 | 103 | IRTemp op1 = newTemp(Ity_I64); | ||
3170 | 104 | IRTemp old_mem = newTemp(Ity_I64); | ||
3171 | 105 | IRTemp op3 = newTemp(Ity_I64); | ||
3172 | 106 | - IRTemp result = newTemp(Ity_I64); | ||
3173 | 107 | IRTemp nequal = newTemp(Ity_I1); | ||
3174 | 108 | |||
3175 | 109 | assign(op1, get_gpr_dw0(r1)); | ||
3176 | 110 | @@ -13927,12 +13927,11 @@ | ||
3177 | 111 | stmt(IRStmt_CAS(cas)); | ||
3178 | 112 | |||
3179 | 113 | /* Set CC. Operands compared equal -> 0, else 1. */ | ||
3180 | 114 | - assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(old_mem))); | ||
3181 | 115 | - s390_cc_thunk_put1(S390_CC_OP_BITWISE, result, False); | ||
3182 | 116 | + assign(nequal, binop(Iop_CasCmpNE64, mkexpr(op1), mkexpr(old_mem))); | ||
3183 | 117 | + s390_cc_thunk_put1(S390_CC_OP_BITWISE, nequal, True); | ||
3184 | 118 | |||
3185 | 119 | /* If operands were equal (cc == 0) just store the old value op1 in r1. | ||
3186 | 120 | Otherwise, store the old_value from memory in r1 and yield. */ | ||
3187 | 121 | - assign(nequal, binop(Iop_CmpNE32, s390_call_calculate_cc(), mkU32(0))); | ||
3188 | 122 | put_gpr_dw0(r1, mkite(mkexpr(nequal), mkexpr(old_mem), mkexpr(op1))); | ||
3189 | 123 | yield_if(mkexpr(nequal)); | ||
3190 | 124 | |||
3191 | 125 | @@ -13950,7 +13949,6 @@ | ||
3192 | 126 | IRTemp old_mem_low = newTemp(Ity_I32); | ||
3193 | 127 | IRTemp op3_high = newTemp(Ity_I32); | ||
3194 | 128 | IRTemp op3_low = newTemp(Ity_I32); | ||
3195 | 129 | - IRTemp result = newTemp(Ity_I32); | ||
3196 | 130 | IRTemp nequal = newTemp(Ity_I1); | ||
3197 | 131 | |||
3198 | 132 | assign(op1_high, get_gpr_w1(r1)); | ||
3199 | 133 | @@ -13967,18 +13965,17 @@ | ||
3200 | 134 | stmt(IRStmt_CAS(cas)); | ||
3201 | 135 | |||
3202 | 136 | /* Set CC. Operands compared equal -> 0, else 1. */ | ||
3203 | 137 | - assign(result, unop(Iop_1Uto32, | ||
3204 | 138 | - binop(Iop_CmpNE32, | ||
3205 | 139 | + assign(nequal, | ||
3206 | 140 | + binop(Iop_CasCmpNE32, | ||
3207 | 141 | binop(Iop_Or32, | ||
3208 | 142 | binop(Iop_Xor32, mkexpr(op1_high), mkexpr(old_mem_high)), | ||
3209 | 143 | binop(Iop_Xor32, mkexpr(op1_low), mkexpr(old_mem_low))), | ||
3210 | 144 | - mkU32(0)))); | ||
3211 | 145 | + mkU32(0))); | ||
3212 | 146 | |||
3213 | 147 | - s390_cc_thunk_put1(S390_CC_OP_BITWISE, result, False); | ||
3214 | 148 | + s390_cc_thunk_put1(S390_CC_OP_BITWISE, nequal, True); | ||
3215 | 149 | |||
3216 | 150 | /* If operands were equal (cc == 0) just store the old value op1 in r1. | ||
3217 | 151 | Otherwise, store the old_value from memory in r1 and yield. */ | ||
3218 | 152 | - assign(nequal, binop(Iop_CmpNE32, s390_call_calculate_cc(), mkU32(0))); | ||
3219 | 153 | put_gpr_w1(r1, mkite(mkexpr(nequal), mkexpr(old_mem_high), mkexpr(op1_high))); | ||
3220 | 154 | put_gpr_w1(r1+1, mkite(mkexpr(nequal), mkexpr(old_mem_low), mkexpr(op1_low))); | ||
3221 | 155 | yield_if(mkexpr(nequal)); | ||
3222 | diff --git a/debian/patches/series b/debian/patches/series | |||
3223 | index bc89f83..36cbddd 100644 | |||
3224 | --- a/debian/patches/series | |||
3225 | +++ b/debian/patches/series | |||
3226 | @@ -9,3 +9,6 @@ | |||
3227 | 9 | 13_fix-path-to-vgdb.patch | 9 | 13_fix-path-to-vgdb.patch |
3228 | 10 | 14_fix-debuginfo-section-duplicates-a-section-in-the-main-ELF-file.patch | 10 | 14_fix-debuginfo-section-duplicates-a-section-in-the-main-ELF-file.patch |
3229 | 11 | armv7-illegal-opcode.patch | 11 | armv7-illegal-opcode.patch |
3230 | 12 | lp-1825343-Bug-428648-s390x-Force-12-bit-amode-for-vector-loads.patch | ||
3231 | 13 | lp-1825343-Bug-429864-s390-Use-Iop_CasCmp-to-fix-memcheck-false.patch | ||
3232 | 14 | lp-1825343-Bug-404076-s390x-Implement-z14-vector-instructions.patch |
Changelog:
- [✓] changelog entry correct version and targeted codename
- [✓] changelog entries correct
- [✓] update-maintainer has been run
New Delta: patches/ series
- [✓] new patches are good or match what was is merged upstream
- [✓] new patches correctly included in debian/
- [✓] new patches have correct DEP3 metadata
Build/Test:
- [✓] build is ok (the one warning is not related to the changed code)
- [✓] verified PPA package installs/uninstalls
- [✓] sanity checks test fine
Some code changes are too complex to fully sign off on, e,g. lp-1825343-Bug-404076-s390x- Implement- z14-vector- instructions. patch. There I have verified that it closely matches what went upstream and have to trust in them to be the subject matter experts.
Overall that looks like a good pre-FF Feature add pulled forward from the coming next version.
+1