1 /* -*- mode: C; c-basic-offset: 3; -*- */
2
3 #include <stdio.h> // fprintf
4 #include <stdlib.h> // exit
5 #include <assert.h> // assert
6 #if defined(__APPLE__)
7 #include <machine/endian.h>
8 #define __BYTE_ORDER BYTE_ORDER
9 #define __LITTLE_ENDIAN LITTLE_ENDIAN
10 #else
11 #include <endian.h>
12 #endif
13 #include <inttypes.h>
14 #include "vtest.h"
15
16
17 /* Something bad happened. Cannot continue. */
18 void __attribute__((noreturn))
panic(const char * string)19 panic(const char *string)
20 {
21 fprintf(stderr, "*** OOPS: %s\n", string);
22 exit(1);
23 }
24
25
26 /* Issue a complaint because the V-bits of the result of an operation
27 differ from what was expected. */
28 void
complain(const irop_t * op,const test_data_t * data,vbits_t expected)29 complain(const irop_t *op, const test_data_t *data, vbits_t expected)
30 {
31 fprintf(stderr, "*** Incorrect result for operator %s\n", op->name);
32
33 int num_operands = get_num_operands(op->op);
34
35 for (unsigned i = 0; i < num_operands; ++i) {
36 fprintf(stderr, " opnd %u: ", i);
37 print_opnd(stderr, &data->opnds[i]);
38 fprintf(stderr, "\n");
39 }
40 fprintf(stderr, " result: ");
41 print_opnd(stderr, &data->result);
42 fprintf(stderr, "\n");
43 fprintf(stderr, " expect: vbits = ");
44 print_vbits(stderr, expected);
45 fprintf(stderr, "\n");
46 }
47
48
49 static void
print_value(FILE * fp,value_t val,unsigned num_bits)50 print_value(FILE *fp, value_t val, unsigned num_bits)
51 {
52 switch (num_bits) {
53 case 1: fprintf(fp, "%02x", val.u8); break;
54 case 8: fprintf(fp, "%02x", val.u8); break;
55 case 16: fprintf(fp, "%04x", val.u16); break;
56 case 32: fprintf(fp, "%08x", val.u32); break;
57 case 64: fprintf(fp, "%016"PRIx64, val.u64); break;
58 case 128:
59 if (__BYTE_ORDER == __LITTLE_ENDIAN) {
60 fprintf(fp, "%016"PRIx64, val.u128[1]);
61 fprintf(fp, "%016"PRIx64, val.u128[0]);
62 } else {
63 fprintf(fp, "%016"PRIx64, val.u128[0]);
64 fprintf(fp, "%016"PRIx64, val.u128[1]);
65 }
66 break;
67 case 256:
68 if (__BYTE_ORDER == __LITTLE_ENDIAN) {
69 fprintf(fp, "%016"PRIx64, val.u256[3]);
70 fprintf(fp, "%016"PRIx64, val.u256[2]);
71 fprintf(fp, "%016"PRIx64, val.u256[1]);
72 fprintf(fp, "%016"PRIx64, val.u256[0]);
73 } else {
74 fprintf(fp, "%016"PRIx64, val.u256[0]);
75 fprintf(fp, "%016"PRIx64, val.u256[1]);
76 fprintf(fp, "%016"PRIx64, val.u256[2]);
77 fprintf(fp, "%016"PRIx64, val.u256[3]);
78 }
79 break;
80 default:
81 panic(__func__);
82 }
83 }
84
85
86 void
print_opnd(FILE * fp,const opnd_t * opnd)87 print_opnd(FILE *fp, const opnd_t *opnd)
88 {
89 fprintf(fp, "vbits = ");
90 print_vbits(fp, opnd->vbits);
91 /* Write the value only if it is defined. Otherwise, there will be error
92 messages about it being undefined */
93 if (equal_vbits(opnd->vbits, defined_vbits(opnd->vbits.num_bits))) {
94 fprintf(fp, " value = ");
95 print_value(fp, opnd->value, opnd->vbits.num_bits);
96 }
97 }
98
99
100 static int
is_floating_point_type(IRType type)101 is_floating_point_type(IRType type)
102 {
103 switch (type) {
104 case Ity_F32:
105 case Ity_F64:
106 case Ity_F128:
107 case Ity_D32:
108 case Ity_D64:
109 case Ity_D128:
110 return 1;
111
112 default:
113 return 0;
114 }
115 }
116
117
118 int
is_floating_point_op_with_rounding_mode(IROp op)119 is_floating_point_op_with_rounding_mode(IROp op)
120 {
121 IRType t_dst, t_arg1, t_arg2, t_arg3, t_arg4;
122
123 typeof_primop(op, &t_dst, &t_arg1, &t_arg2, &t_arg3, &t_arg4);
124
125 // A unary operator cannot have a rounding mode
126 if (t_arg2 == Ity_INVALID) return 0;
127
128 if (is_floating_point_type(t_dst) ||
129 is_floating_point_type(t_arg1) ||
130 is_floating_point_type(t_arg2) ||
131 is_floating_point_type(t_arg3) ||
132 is_floating_point_type(t_arg4)) {
133 // Rounding mode, if present, is the 1st operand
134 return t_arg1 == Ity_I32;
135 }
136 return 0;
137 }
138
139
140 /* Return the number of operands for which input values can
141 be freely chosen. For floating point ops, the rounding mode
142 is not counted here, as it is restricted. */
143 int
get_num_operands(IROp op)144 get_num_operands(IROp op)
145 {
146 IRType unused, t1, t2, t3, t4;
147
148 typeof_primop(op, &unused, &t1, &t2, &t3, &t4);
149
150 int num_operands = 4;
151 if (t4 == Ity_INVALID) num_operands = 3;
152 if (t3 == Ity_INVALID) num_operands = 2;
153 if (t2 == Ity_INVALID) num_operands = 1;
154
155 if (is_floating_point_op_with_rounding_mode(op))
156 -- num_operands;
157
158 return num_operands;
159 }
160
161
162 /* ---------------------------------------------------------------- */
163
164 /* The functions below have been imported from VEX/pric/ir_defs.c.
165 This is more convenient because
166 (1) Don't have to figure out the Makefile machinery to pick up the
167 correct VEX library (platform specific)
168 (2) Would have to export typeofIRType in VEX
169 (3) There is no worry that these functions get out of synch because
170 the test harness will iterate over all IROps in libvex_ir.h.
171 So if a new one was added there, we would assert here and elsewhere.
172 */
173
174 // Taken from VEX/priv/ir_defs.c: function sizeofIRType
175 unsigned
sizeof_irtype(IRType ty)176 sizeof_irtype(IRType ty)
177 {
178 switch (ty) {
179 case Ity_I8: return 1;
180 case Ity_I16: return 2;
181 case Ity_I32: return 4;
182 case Ity_I64: return 8;
183 case Ity_I128: return 16;
184 case Ity_F32: return 4;
185 case Ity_F64: return 8;
186 case Ity_F128: return 16;
187 case Ity_D32: return 4;
188 case Ity_D64: return 8;
189 case Ity_D128: return 16;
190 case Ity_V128: return 16;
191 case Ity_V256: return 32;
192 default:
193 panic(__func__);
194 }
195 }
196
197
198 // Taken from VEX/priv/ir_defs.c: function typeOfPrimop
199 // Modified minimally to break dependencies on VEX infrastructure.
200 void
typeof_primop(IROp op,IRType * t_dst,IRType * t_arg1,IRType * t_arg2,IRType * t_arg3,IRType * t_arg4)201 typeof_primop(IROp op, IRType *t_dst, IRType *t_arg1, IRType *t_arg2,
202 IRType *t_arg3, IRType *t_arg4)
203 {
204 # define UNARY(_ta1,_td) \
205 *t_dst = (_td); *t_arg1 = (_ta1); break
206 # define BINARY(_ta1,_ta2,_td) \
207 *t_dst = (_td); *t_arg1 = (_ta1); *t_arg2 = (_ta2); break
208 # define TERNARY(_ta1,_ta2,_ta3,_td) \
209 *t_dst = (_td); *t_arg1 = (_ta1); \
210 *t_arg2 = (_ta2); *t_arg3 = (_ta3); break
211 # define QUATERNARY(_ta1,_ta2,_ta3,_ta4,_td) \
212 *t_dst = (_td); *t_arg1 = (_ta1); \
213 *t_arg2 = (_ta2); *t_arg3 = (_ta3); \
214 *t_arg4 = (_ta4); break
215 # define COMPARISON(_ta) \
216 *t_dst = Ity_I1; *t_arg1 = *t_arg2 = (_ta); break;
217 # define UNARY_COMPARISON(_ta) \
218 *t_dst = Ity_I1; *t_arg1 = (_ta); break;
219
220 /* Rounding mode values are always Ity_I32, encoded as per
221 IRRoundingMode */
222 const IRType ity_RMode = Ity_I32;
223
224 *t_dst = Ity_INVALID;
225 *t_arg1 = Ity_INVALID;
226 *t_arg2 = Ity_INVALID;
227 *t_arg3 = Ity_INVALID;
228 *t_arg4 = Ity_INVALID;
229 switch (op) {
230 case Iop_Add8: case Iop_Sub8: case Iop_Mul8:
231 case Iop_Or8: case Iop_And8: case Iop_Xor8:
232 BINARY(Ity_I8,Ity_I8, Ity_I8);
233
234 case Iop_Add16: case Iop_Sub16: case Iop_Mul16:
235 case Iop_Or16: case Iop_And16: case Iop_Xor16:
236 BINARY(Ity_I16,Ity_I16, Ity_I16);
237
238 case Iop_CmpORD32U:
239 case Iop_CmpORD32S:
240 case Iop_Add32: case Iop_Sub32: case Iop_Mul32:
241 case Iop_Or32: case Iop_And32: case Iop_Xor32:
242 case Iop_Max32U:
243 case Iop_QAdd32S: case Iop_QSub32S:
244 case Iop_Add16x2: case Iop_Sub16x2:
245 case Iop_QAdd16Sx2: case Iop_QAdd16Ux2:
246 case Iop_QSub16Sx2: case Iop_QSub16Ux2:
247 case Iop_HAdd16Ux2: case Iop_HAdd16Sx2:
248 case Iop_HSub16Ux2: case Iop_HSub16Sx2:
249 case Iop_Add8x4: case Iop_Sub8x4:
250 case Iop_QAdd8Sx4: case Iop_QAdd8Ux4:
251 case Iop_QSub8Sx4: case Iop_QSub8Ux4:
252 case Iop_HAdd8Ux4: case Iop_HAdd8Sx4:
253 case Iop_HSub8Ux4: case Iop_HSub8Sx4:
254 case Iop_Sad8Ux4:
255 BINARY(Ity_I32,Ity_I32, Ity_I32);
256
257 case Iop_Add64: case Iop_Sub64: case Iop_Mul64:
258 case Iop_Or64: case Iop_And64: case Iop_Xor64:
259 case Iop_CmpORD64U:
260 case Iop_CmpORD64S:
261 case Iop_Avg8Ux8: case Iop_Avg16Ux4:
262 case Iop_Add8x8: case Iop_Add16x4: case Iop_Add32x2:
263 case Iop_Add32Fx2: case Iop_Sub32Fx2:
264 case Iop_CmpEQ8x8: case Iop_CmpEQ16x4: case Iop_CmpEQ32x2:
265 case Iop_CmpGT8Sx8: case Iop_CmpGT16Sx4: case Iop_CmpGT32Sx2:
266 case Iop_CmpGT8Ux8: case Iop_CmpGT16Ux4: case Iop_CmpGT32Ux2:
267 case Iop_CmpGT32Fx2: case Iop_CmpEQ32Fx2: case Iop_CmpGE32Fx2:
268 case Iop_InterleaveHI8x8: case Iop_InterleaveLO8x8:
269 case Iop_InterleaveHI16x4: case Iop_InterleaveLO16x4:
270 case Iop_InterleaveHI32x2: case Iop_InterleaveLO32x2:
271 case Iop_CatOddLanes8x8: case Iop_CatEvenLanes8x8:
272 case Iop_CatOddLanes16x4: case Iop_CatEvenLanes16x4:
273 case Iop_InterleaveOddLanes8x8: case Iop_InterleaveEvenLanes8x8:
274 case Iop_InterleaveOddLanes16x4: case Iop_InterleaveEvenLanes16x4:
275 case Iop_Perm8x8:
276 case Iop_Max8Ux8: case Iop_Max16Ux4: case Iop_Max32Ux2:
277 case Iop_Max8Sx8: case Iop_Max16Sx4: case Iop_Max32Sx2:
278 case Iop_Max32Fx2: case Iop_Min32Fx2:
279 case Iop_PwMax32Fx2: case Iop_PwMin32Fx2:
280 case Iop_Min8Ux8: case Iop_Min16Ux4: case Iop_Min32Ux2:
281 case Iop_Min8Sx8: case Iop_Min16Sx4: case Iop_Min32Sx2:
282 case Iop_PwMax8Ux8: case Iop_PwMax16Ux4: case Iop_PwMax32Ux2:
283 case Iop_PwMax8Sx8: case Iop_PwMax16Sx4: case Iop_PwMax32Sx2:
284 case Iop_PwMin8Ux8: case Iop_PwMin16Ux4: case Iop_PwMin32Ux2:
285 case Iop_PwMin8Sx8: case Iop_PwMin16Sx4: case Iop_PwMin32Sx2:
286 case Iop_Mul8x8: case Iop_Mul16x4: case Iop_Mul32x2:
287 case Iop_Mul32Fx2:
288 case Iop_PolynomialMul8x8:
289 case Iop_MulHi16Sx4: case Iop_MulHi16Ux4:
290 case Iop_QDMulHi16Sx4: case Iop_QDMulHi32Sx2:
291 case Iop_QRDMulHi16Sx4: case Iop_QRDMulHi32Sx2:
292 case Iop_QAdd8Sx8: case Iop_QAdd16Sx4:
293 case Iop_QAdd32Sx2: case Iop_QAdd64Sx1:
294 case Iop_QAdd8Ux8: case Iop_QAdd16Ux4:
295 case Iop_QAdd32Ux2: case Iop_QAdd64Ux1:
296 case Iop_PwAdd8x8: case Iop_PwAdd16x4: case Iop_PwAdd32x2:
297 case Iop_PwAdd32Fx2:
298 case Iop_QNarrowBin32Sto16Sx4:
299 case Iop_QNarrowBin16Sto8Sx8: case Iop_QNarrowBin16Sto8Ux8:
300 case Iop_NarrowBin16to8x8: case Iop_NarrowBin32to16x4:
301 case Iop_Sub8x8: case Iop_Sub16x4: case Iop_Sub32x2:
302 case Iop_QSub8Sx8: case Iop_QSub16Sx4:
303 case Iop_QSub32Sx2: case Iop_QSub64Sx1:
304 case Iop_QSub8Ux8: case Iop_QSub16Ux4:
305 case Iop_QSub32Ux2: case Iop_QSub64Ux1:
306 case Iop_Shl8x8: case Iop_Shl16x4: case Iop_Shl32x2:
307 case Iop_Shr8x8: case Iop_Shr16x4: case Iop_Shr32x2:
308 case Iop_Sar8x8: case Iop_Sar16x4: case Iop_Sar32x2:
309 case Iop_Sal8x8: case Iop_Sal16x4: case Iop_Sal32x2: case Iop_Sal64x1:
310 case Iop_QShl8x8: case Iop_QShl16x4: case Iop_QShl32x2: case Iop_QShl64x1:
311 case Iop_QSal8x8: case Iop_QSal16x4: case Iop_QSal32x2: case Iop_QSal64x1:
312 case Iop_Recps32Fx2:
313 case Iop_Rsqrts32Fx2:
314 BINARY(Ity_I64,Ity_I64, Ity_I64);
315
316 case Iop_ShlN32x2: case Iop_ShlN16x4: case Iop_ShlN8x8:
317 case Iop_ShrN32x2: case Iop_ShrN16x4: case Iop_ShrN8x8:
318 case Iop_SarN32x2: case Iop_SarN16x4: case Iop_SarN8x8:
319 case Iop_QShlN8x8: case Iop_QShlN16x4:
320 case Iop_QShlN32x2: case Iop_QShlN64x1:
321 case Iop_QShlN8Sx8: case Iop_QShlN16Sx4:
322 case Iop_QShlN32Sx2: case Iop_QShlN64Sx1:
323 case Iop_QSalN8x8: case Iop_QSalN16x4:
324 case Iop_QSalN32x2: case Iop_QSalN64x1:
325 BINARY(Ity_I64,Ity_I8, Ity_I64);
326
327 case Iop_Shl8: case Iop_Shr8: case Iop_Sar8:
328 BINARY(Ity_I8,Ity_I8, Ity_I8);
329 case Iop_Shl16: case Iop_Shr16: case Iop_Sar16:
330 BINARY(Ity_I16,Ity_I8, Ity_I16);
331 case Iop_Shl32: case Iop_Shr32: case Iop_Sar32:
332 BINARY(Ity_I32,Ity_I8, Ity_I32);
333 case Iop_Shl64: case Iop_Shr64: case Iop_Sar64:
334 BINARY(Ity_I64,Ity_I8, Ity_I64);
335
336 case Iop_Not8:
337 UNARY(Ity_I8, Ity_I8);
338 case Iop_Not16:
339 UNARY(Ity_I16, Ity_I16);
340 case Iop_Not32:
341 case Iop_CmpNEZ16x2: case Iop_CmpNEZ8x4:
342 UNARY(Ity_I32, Ity_I32);
343
344 case Iop_Not64:
345 case Iop_CmpNEZ32x2: case Iop_CmpNEZ16x4: case Iop_CmpNEZ8x8:
346 case Iop_Cnt8x8:
347 case Iop_Clz8Sx8: case Iop_Clz16Sx4: case Iop_Clz32Sx2:
348 case Iop_Cls8Sx8: case Iop_Cls16Sx4: case Iop_Cls32Sx2:
349 case Iop_PwAddL8Ux8: case Iop_PwAddL16Ux4: case Iop_PwAddL32Ux2:
350 case Iop_PwAddL8Sx8: case Iop_PwAddL16Sx4: case Iop_PwAddL32Sx2:
351 case Iop_Reverse64_8x8: case Iop_Reverse64_16x4: case Iop_Reverse64_32x2:
352 case Iop_Reverse32_8x8: case Iop_Reverse32_16x4:
353 case Iop_Reverse16_8x8:
354 case Iop_FtoI32Sx2_RZ: case Iop_FtoI32Ux2_RZ:
355 case Iop_I32StoFx2: case Iop_I32UtoFx2:
356 case Iop_Recip32x2: case Iop_Recip32Fx2:
357 case Iop_Abs32Fx2:
358 case Iop_Rsqrte32Fx2:
359 case Iop_Rsqrte32x2:
360 case Iop_Neg32Fx2:
361 case Iop_Abs8x8: case Iop_Abs16x4: case Iop_Abs32x2:
362 UNARY(Ity_I64, Ity_I64);
363
364 case Iop_CmpEQ8: case Iop_CmpNE8:
365 case Iop_CasCmpEQ8: case Iop_CasCmpNE8:
366 COMPARISON(Ity_I8);
367 case Iop_CmpEQ16: case Iop_CmpNE16:
368 case Iop_CasCmpEQ16: case Iop_CasCmpNE16:
369 COMPARISON(Ity_I16);
370 case Iop_CmpEQ32: case Iop_CmpNE32:
371 case Iop_CasCmpEQ32: case Iop_CasCmpNE32:
372 case Iop_CmpLT32S: case Iop_CmpLE32S:
373 case Iop_CmpLT32U: case Iop_CmpLE32U:
374 COMPARISON(Ity_I32);
375 case Iop_CmpEQ64: case Iop_CmpNE64:
376 case Iop_CasCmpEQ64: case Iop_CasCmpNE64:
377 case Iop_CmpLT64S: case Iop_CmpLE64S:
378 case Iop_CmpLT64U: case Iop_CmpLE64U:
379 COMPARISON(Ity_I64);
380
381 case Iop_CmpNEZ8: UNARY_COMPARISON(Ity_I8);
382 case Iop_CmpNEZ16: UNARY_COMPARISON(Ity_I16);
383 case Iop_CmpNEZ32: UNARY_COMPARISON(Ity_I32);
384 case Iop_CmpNEZ64: UNARY_COMPARISON(Ity_I64);
385
386 case Iop_Left8: UNARY(Ity_I8, Ity_I8);
387 case Iop_Left16: UNARY(Ity_I16,Ity_I16);
388 case Iop_CmpwNEZ32: case Iop_Left32: UNARY(Ity_I32,Ity_I32);
389 case Iop_CmpwNEZ64: case Iop_Left64: UNARY(Ity_I64,Ity_I64);
390
391 case Iop_MullU8: case Iop_MullS8:
392 BINARY(Ity_I8,Ity_I8, Ity_I16);
393 case Iop_MullU16: case Iop_MullS16:
394 BINARY(Ity_I16,Ity_I16, Ity_I32);
395 case Iop_MullU32: case Iop_MullS32:
396 BINARY(Ity_I32,Ity_I32, Ity_I64);
397 case Iop_MullU64: case Iop_MullS64:
398 BINARY(Ity_I64,Ity_I64, Ity_I128);
399
400 case Iop_Clz32: case Iop_Ctz32:
401 UNARY(Ity_I32, Ity_I32);
402
403 case Iop_Clz64: case Iop_Ctz64:
404 UNARY(Ity_I64, Ity_I64);
405
406 case Iop_DivU32: case Iop_DivS32: case Iop_DivU32E: case Iop_DivS32E:
407 BINARY(Ity_I32,Ity_I32, Ity_I32);
408
409 case Iop_DivU64: case Iop_DivS64: case Iop_DivS64E: case Iop_DivU64E:
410 BINARY(Ity_I64,Ity_I64, Ity_I64);
411
412 case Iop_DivModU64to32: case Iop_DivModS64to32:
413 BINARY(Ity_I64,Ity_I32, Ity_I64);
414
415 case Iop_DivModU128to64: case Iop_DivModS128to64:
416 BINARY(Ity_I128,Ity_I64, Ity_I128);
417
418 case Iop_DivModS64to64:
419 BINARY(Ity_I64,Ity_I64, Ity_I128);
420
421 case Iop_16HIto8: case Iop_16to8:
422 UNARY(Ity_I16, Ity_I8);
423 case Iop_8HLto16:
424 BINARY(Ity_I8,Ity_I8, Ity_I16);
425
426 case Iop_32HIto16: case Iop_32to16:
427 UNARY(Ity_I32, Ity_I16);
428 case Iop_16HLto32:
429 BINARY(Ity_I16,Ity_I16, Ity_I32);
430
431 case Iop_64HIto32: case Iop_64to32:
432 UNARY(Ity_I64, Ity_I32);
433 case Iop_32HLto64:
434 BINARY(Ity_I32,Ity_I32, Ity_I64);
435
436 case Iop_128HIto64: case Iop_128to64:
437 UNARY(Ity_I128, Ity_I64);
438 case Iop_64HLto128:
439 BINARY(Ity_I64,Ity_I64, Ity_I128);
440
441 case Iop_Not1: UNARY(Ity_I1, Ity_I1);
442 case Iop_1Uto8: UNARY(Ity_I1, Ity_I8);
443 case Iop_1Sto8: UNARY(Ity_I1, Ity_I8);
444 case Iop_1Sto16: UNARY(Ity_I1, Ity_I16);
445 case Iop_1Uto32: case Iop_1Sto32: UNARY(Ity_I1, Ity_I32);
446 case Iop_1Sto64: case Iop_1Uto64: UNARY(Ity_I1, Ity_I64);
447 case Iop_32to1: UNARY(Ity_I32, Ity_I1);
448 case Iop_64to1: UNARY(Ity_I64, Ity_I1);
449
450 case Iop_8Uto32: case Iop_8Sto32:
451 UNARY(Ity_I8, Ity_I32);
452
453 case Iop_8Uto16: case Iop_8Sto16:
454 UNARY(Ity_I8, Ity_I16);
455
456 case Iop_16Uto32: case Iop_16Sto32:
457 UNARY(Ity_I16, Ity_I32);
458
459 case Iop_32Sto64: case Iop_32Uto64:
460 UNARY(Ity_I32, Ity_I64);
461
462 case Iop_8Uto64: case Iop_8Sto64:
463 UNARY(Ity_I8, Ity_I64);
464
465 case Iop_16Uto64: case Iop_16Sto64:
466 UNARY(Ity_I16, Ity_I64);
467 case Iop_64to16:
468 UNARY(Ity_I64, Ity_I16);
469
470 case Iop_32to8: UNARY(Ity_I32, Ity_I8);
471 case Iop_64to8: UNARY(Ity_I64, Ity_I8);
472
473 case Iop_AddF64: case Iop_SubF64:
474 case Iop_MulF64: case Iop_DivF64:
475 case Iop_AddF64r32: case Iop_SubF64r32:
476 case Iop_MulF64r32: case Iop_DivF64r32:
477 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_F64);
478
479 case Iop_AddF32: case Iop_SubF32:
480 case Iop_MulF32: case Iop_DivF32:
481 TERNARY(ity_RMode,Ity_F32,Ity_F32, Ity_F32);
482
483 case Iop_NegF64: case Iop_AbsF64:
484 UNARY(Ity_F64, Ity_F64);
485
486 case Iop_NegF32: case Iop_AbsF32:
487 UNARY(Ity_F32, Ity_F32);
488
489 case Iop_SqrtF64:
490 BINARY(ity_RMode,Ity_F64, Ity_F64);
491
492 case Iop_SqrtF32:
493 case Iop_RoundF32toInt:
494 BINARY(ity_RMode,Ity_F32, Ity_F32);
495
496 case Iop_CmpF32:
497 BINARY(Ity_F32,Ity_F32, Ity_I32);
498
499 case Iop_CmpF64:
500 BINARY(Ity_F64,Ity_F64, Ity_I32);
501
502 case Iop_CmpF128:
503 BINARY(Ity_F128,Ity_F128, Ity_I32);
504
505 case Iop_F64toI16S: BINARY(ity_RMode,Ity_F64, Ity_I16);
506 case Iop_F64toI32S: BINARY(ity_RMode,Ity_F64, Ity_I32);
507 case Iop_F64toI64S: case Iop_F64toI64U:
508 BINARY(ity_RMode,Ity_F64, Ity_I64);
509
510 case Iop_F64toI32U: BINARY(ity_RMode,Ity_F64, Ity_I32);
511
512 case Iop_I32StoF64: UNARY(Ity_I32, Ity_F64);
513 case Iop_I64StoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
514 case Iop_I64UtoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
515 case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F32);
516
517 case Iop_I32UtoF64: UNARY(Ity_I32, Ity_F64);
518
519 case Iop_F32toI32S: BINARY(ity_RMode,Ity_F32, Ity_I32);
520 case Iop_F32toI64S: BINARY(ity_RMode,Ity_F32, Ity_I64);
521 case Iop_F32toI32U: BINARY(ity_RMode,Ity_F32, Ity_I32);
522 case Iop_F32toI64U: BINARY(ity_RMode,Ity_F32, Ity_I64);
523
524 case Iop_I32UtoF32: BINARY(ity_RMode,Ity_I32, Ity_F32);
525 case Iop_I32StoF32: BINARY(ity_RMode,Ity_I32, Ity_F32);
526 case Iop_I64StoF32: BINARY(ity_RMode,Ity_I64, Ity_F32);
527
528 case Iop_F32toF64: UNARY(Ity_F32, Ity_F64);
529 case Iop_F64toF32: BINARY(ity_RMode,Ity_F64, Ity_F32);
530
531 case Iop_ReinterpI64asF64: UNARY(Ity_I64, Ity_F64);
532 case Iop_ReinterpF64asI64: UNARY(Ity_F64, Ity_I64);
533 case Iop_ReinterpI32asF32: UNARY(Ity_I32, Ity_F32);
534 case Iop_ReinterpF32asI32: UNARY(Ity_F32, Ity_I32);
535
536 case Iop_AtanF64: case Iop_Yl2xF64: case Iop_Yl2xp1F64:
537 case Iop_ScaleF64: case Iop_PRemF64: case Iop_PRem1F64:
538 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_F64);
539
540 case Iop_PRemC3210F64: case Iop_PRem1C3210F64:
541 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_I32);
542
543 case Iop_SinF64: case Iop_CosF64: case Iop_TanF64:
544 case Iop_2xm1F64:
545 case Iop_RoundF64toInt: BINARY(ity_RMode,Ity_F64, Ity_F64);
546
547 case Iop_MAddF64: case Iop_MSubF64:
548 case Iop_MAddF64r32: case Iop_MSubF64r32:
549 QUATERNARY(ity_RMode,Ity_F64,Ity_F64,Ity_F64, Ity_F64);
550
551 case Iop_Est5FRSqrt:
552 case Iop_RoundF64toF64_NEAREST: case Iop_RoundF64toF64_NegINF:
553 case Iop_RoundF64toF64_PosINF: case Iop_RoundF64toF64_ZERO:
554 UNARY(Ity_F64, Ity_F64);
555 case Iop_RoundF64toF32:
556 BINARY(ity_RMode,Ity_F64, Ity_F64);
557 case Iop_TruncF64asF32:
558 UNARY(Ity_F64, Ity_F32);
559
560 case Iop_I32UtoFx4:
561 case Iop_I32StoFx4:
562 case Iop_QFtoI32Ux4_RZ:
563 case Iop_QFtoI32Sx4_RZ:
564 case Iop_FtoI32Ux4_RZ:
565 case Iop_FtoI32Sx4_RZ:
566 case Iop_RoundF32x4_RM:
567 case Iop_RoundF32x4_RP:
568 case Iop_RoundF32x4_RN:
569 case Iop_RoundF32x4_RZ:
570 case Iop_Abs32Fx4:
571 case Iop_Rsqrte32Fx4:
572 case Iop_Rsqrte32x4:
573 UNARY(Ity_V128, Ity_V128);
574
575 case Iop_64HLtoV128:
576 BINARY(Ity_I64,Ity_I64, Ity_V128);
577
578 case Iop_V128to64: case Iop_V128HIto64:
579 case Iop_NarrowUn16to8x8:
580 case Iop_NarrowUn32to16x4:
581 case Iop_NarrowUn64to32x2:
582 case Iop_QNarrowUn16Uto8Ux8:
583 case Iop_QNarrowUn32Uto16Ux4:
584 case Iop_QNarrowUn64Uto32Ux2:
585 case Iop_QNarrowUn16Sto8Sx8:
586 case Iop_QNarrowUn32Sto16Sx4:
587 case Iop_QNarrowUn64Sto32Sx2:
588 case Iop_QNarrowUn16Sto8Ux8:
589 case Iop_QNarrowUn32Sto16Ux4:
590 case Iop_QNarrowUn64Sto32Ux2:
591 case Iop_F32toF16x4:
592 UNARY(Ity_V128, Ity_I64);
593
594 case Iop_Widen8Uto16x8:
595 case Iop_Widen16Uto32x4:
596 case Iop_Widen32Uto64x2:
597 case Iop_Widen8Sto16x8:
598 case Iop_Widen16Sto32x4:
599 case Iop_Widen32Sto64x2:
600 case Iop_F16toF32x4:
601 UNARY(Ity_I64, Ity_V128);
602
603 case Iop_V128to32: UNARY(Ity_V128, Ity_I32);
604 case Iop_32UtoV128: UNARY(Ity_I32, Ity_V128);
605 case Iop_64UtoV128: UNARY(Ity_I64, Ity_V128);
606 case Iop_SetV128lo32: BINARY(Ity_V128,Ity_I32, Ity_V128);
607 case Iop_SetV128lo64: BINARY(Ity_V128,Ity_I64, Ity_V128);
608
609 case Iop_Dup8x16: UNARY(Ity_I8, Ity_V128);
610 case Iop_Dup16x8: UNARY(Ity_I16, Ity_V128);
611 case Iop_Dup32x4: UNARY(Ity_I32, Ity_V128);
612 case Iop_Dup8x8: UNARY(Ity_I8, Ity_I64);
613 case Iop_Dup16x4: UNARY(Ity_I16, Ity_I64);
614 case Iop_Dup32x2: UNARY(Ity_I32, Ity_I64);
615
616 case Iop_CmpEQ32Fx4: case Iop_CmpLT32Fx4:
617 case Iop_CmpEQ64Fx2: case Iop_CmpLT64Fx2:
618 case Iop_CmpLE32Fx4: case Iop_CmpUN32Fx4:
619 case Iop_CmpLE64Fx2: case Iop_CmpUN64Fx2:
620 case Iop_CmpGT32Fx4: case Iop_CmpGE32Fx4:
621 case Iop_CmpEQ32F0x4: case Iop_CmpLT32F0x4:
622 case Iop_CmpEQ64F0x2: case Iop_CmpLT64F0x2:
623 case Iop_CmpLE32F0x4: case Iop_CmpUN32F0x4:
624 case Iop_CmpLE64F0x2: case Iop_CmpUN64F0x2:
625 case Iop_Add32Fx4: case Iop_Add32F0x4:
626 case Iop_Add64Fx2: case Iop_Add64F0x2:
627 case Iop_Div32Fx4: case Iop_Div32F0x4:
628 case Iop_Div64Fx2: case Iop_Div64F0x2:
629 case Iop_Max32Fx4: case Iop_Max32F0x4:
630 case Iop_PwMax32Fx4: case Iop_PwMin32Fx4:
631 case Iop_Max64Fx2: case Iop_Max64F0x2:
632 case Iop_Min32Fx4: case Iop_Min32F0x4:
633 case Iop_Min64Fx2: case Iop_Min64F0x2:
634 case Iop_Mul32Fx4: case Iop_Mul32F0x4:
635 case Iop_Mul64Fx2: case Iop_Mul64F0x2:
636 case Iop_Sub32Fx4: case Iop_Sub32F0x4:
637 case Iop_Sub64Fx2: case Iop_Sub64F0x2:
638 case Iop_AndV128: case Iop_OrV128: case Iop_XorV128:
639 case Iop_Add8x16: case Iop_Add16x8:
640 case Iop_Add32x4: case Iop_Add64x2:
641 case Iop_QAdd8Ux16: case Iop_QAdd16Ux8:
642 case Iop_QAdd32Ux4: //case Iop_QAdd64Ux2:
643 case Iop_QAdd8Sx16: case Iop_QAdd16Sx8:
644 case Iop_QAdd32Sx4: case Iop_QAdd64Sx2:
645 case Iop_PwAdd8x16: case Iop_PwAdd16x8: case Iop_PwAdd32x4:
646 case Iop_Sub8x16: case Iop_Sub16x8:
647 case Iop_Sub32x4: case Iop_Sub64x2:
648 case Iop_QSub8Ux16: case Iop_QSub16Ux8:
649 case Iop_QSub32Ux4: //case Iop_QSub64Ux2:
650 case Iop_QSub8Sx16: case Iop_QSub16Sx8:
651 case Iop_QSub32Sx4: case Iop_QSub64Sx2:
652 case Iop_Mul8x16: case Iop_Mul16x8: case Iop_Mul32x4:
653 case Iop_PolynomialMul8x16:
654 case Iop_MulHi16Ux8: case Iop_MulHi32Ux4:
655 case Iop_MulHi16Sx8: case Iop_MulHi32Sx4:
656 case Iop_QDMulHi16Sx8: case Iop_QDMulHi32Sx4:
657 case Iop_QRDMulHi16Sx8: case Iop_QRDMulHi32Sx4:
658 case Iop_MullEven8Ux16: case Iop_MullEven16Ux8:
659 case Iop_MullEven8Sx16: case Iop_MullEven16Sx8:
660 case Iop_Avg8Ux16: case Iop_Avg16Ux8: case Iop_Avg32Ux4:
661 case Iop_Avg8Sx16: case Iop_Avg16Sx8: case Iop_Avg32Sx4:
662 case Iop_Max8Sx16: case Iop_Max16Sx8: case Iop_Max32Sx4:
663 case Iop_Max8Ux16: case Iop_Max16Ux8: case Iop_Max32Ux4:
664 case Iop_Min8Sx16: case Iop_Min16Sx8: case Iop_Min32Sx4:
665 case Iop_Min8Ux16: case Iop_Min16Ux8: case Iop_Min32Ux4:
666 case Iop_CmpEQ8x16: case Iop_CmpEQ16x8: case Iop_CmpEQ32x4:
667 case Iop_CmpEQ64x2:
668 case Iop_CmpGT8Sx16: case Iop_CmpGT16Sx8: case Iop_CmpGT32Sx4:
669 case Iop_CmpGT64Sx2:
670 case Iop_CmpGT8Ux16: case Iop_CmpGT16Ux8: case Iop_CmpGT32Ux4:
671 case Iop_Shl8x16: case Iop_Shl16x8: case Iop_Shl32x4: case Iop_Shl64x2:
672 case Iop_QShl8x16: case Iop_QShl16x8:
673 case Iop_QShl32x4: case Iop_QShl64x2:
674 case Iop_QSal8x16: case Iop_QSal16x8:
675 case Iop_QSal32x4: case Iop_QSal64x2:
676 case Iop_Shr8x16: case Iop_Shr16x8: case Iop_Shr32x4: case Iop_Shr64x2:
677 case Iop_Sar8x16: case Iop_Sar16x8: case Iop_Sar32x4: case Iop_Sar64x2:
678 case Iop_Sal8x16: case Iop_Sal16x8: case Iop_Sal32x4: case Iop_Sal64x2:
679 case Iop_Rol8x16: case Iop_Rol16x8: case Iop_Rol32x4:
680 case Iop_QNarrowBin16Sto8Ux16: case Iop_QNarrowBin32Sto16Ux8:
681 case Iop_QNarrowBin16Sto8Sx16: case Iop_QNarrowBin32Sto16Sx8:
682 case Iop_QNarrowBin16Uto8Ux16: case Iop_QNarrowBin32Uto16Ux8:
683 case Iop_NarrowBin16to8x16: case Iop_NarrowBin32to16x8:
684 case Iop_InterleaveHI8x16: case Iop_InterleaveHI16x8:
685 case Iop_InterleaveHI32x4: case Iop_InterleaveHI64x2:
686 case Iop_InterleaveLO8x16: case Iop_InterleaveLO16x8:
687 case Iop_InterleaveLO32x4: case Iop_InterleaveLO64x2:
688 case Iop_CatOddLanes8x16: case Iop_CatEvenLanes8x16:
689 case Iop_CatOddLanes16x8: case Iop_CatEvenLanes16x8:
690 case Iop_CatOddLanes32x4: case Iop_CatEvenLanes32x4:
691 case Iop_InterleaveOddLanes8x16: case Iop_InterleaveEvenLanes8x16:
692 case Iop_InterleaveOddLanes16x8: case Iop_InterleaveEvenLanes16x8:
693 case Iop_InterleaveOddLanes32x4: case Iop_InterleaveEvenLanes32x4:
694 case Iop_Perm8x16: case Iop_Perm32x4:
695 case Iop_Recps32Fx4:
696 case Iop_Rsqrts32Fx4:
697 BINARY(Ity_V128,Ity_V128, Ity_V128);
698
699 case Iop_PolynomialMull8x8:
700 case Iop_Mull8Ux8: case Iop_Mull8Sx8:
701 case Iop_Mull16Ux4: case Iop_Mull16Sx4:
702 case Iop_Mull32Ux2: case Iop_Mull32Sx2:
703 BINARY(Ity_I64, Ity_I64, Ity_V128);
704
705 case Iop_NotV128:
706 case Iop_Recip32Fx4: case Iop_Recip32F0x4:
707 case Iop_Recip32x4:
708 case Iop_Recip64Fx2: case Iop_Recip64F0x2:
709 case Iop_RSqrt32Fx4: case Iop_RSqrt32F0x4:
710 case Iop_RSqrt64Fx2: case Iop_RSqrt64F0x2:
711 case Iop_Sqrt32Fx4: case Iop_Sqrt32F0x4:
712 case Iop_Sqrt64Fx2: case Iop_Sqrt64F0x2:
713 case Iop_CmpNEZ8x16: case Iop_CmpNEZ16x8:
714 case Iop_CmpNEZ32x4: case Iop_CmpNEZ64x2:
715 case Iop_Cnt8x16:
716 case Iop_Clz8Sx16: case Iop_Clz16Sx8: case Iop_Clz32Sx4:
717 case Iop_Cls8Sx16: case Iop_Cls16Sx8: case Iop_Cls32Sx4:
718 case Iop_PwAddL8Ux16: case Iop_PwAddL16Ux8: case Iop_PwAddL32Ux4:
719 case Iop_PwAddL8Sx16: case Iop_PwAddL16Sx8: case Iop_PwAddL32Sx4:
720 case Iop_Reverse64_8x16: case Iop_Reverse64_16x8: case Iop_Reverse64_32x4:
721 case Iop_Reverse32_8x16: case Iop_Reverse32_16x8:
722 case Iop_Reverse16_8x16:
723 case Iop_Neg32Fx4:
724 case Iop_Abs8x16: case Iop_Abs16x8: case Iop_Abs32x4:
725 UNARY(Ity_V128, Ity_V128);
726
727 case Iop_ShlV128: case Iop_ShrV128:
728 case Iop_ShlN8x16: case Iop_ShlN16x8:
729 case Iop_ShlN32x4: case Iop_ShlN64x2:
730 case Iop_ShrN8x16: case Iop_ShrN16x8:
731 case Iop_ShrN32x4: case Iop_ShrN64x2:
732 case Iop_SarN8x16: case Iop_SarN16x8:
733 case Iop_SarN32x4: case Iop_SarN64x2:
734 case Iop_QShlN8x16: case Iop_QShlN16x8:
735 case Iop_QShlN32x4: case Iop_QShlN64x2:
736 case Iop_QShlN8Sx16: case Iop_QShlN16Sx8:
737 case Iop_QShlN32Sx4: case Iop_QShlN64Sx2:
738 case Iop_QSalN8x16: case Iop_QSalN16x8:
739 case Iop_QSalN32x4: case Iop_QSalN64x2:
740 BINARY(Ity_V128,Ity_I8, Ity_V128);
741
742 case Iop_F32ToFixed32Ux4_RZ:
743 case Iop_F32ToFixed32Sx4_RZ:
744 case Iop_Fixed32UToF32x4_RN:
745 case Iop_Fixed32SToF32x4_RN:
746 BINARY(Ity_V128, Ity_I8, Ity_V128);
747
748 case Iop_F32ToFixed32Ux2_RZ:
749 case Iop_F32ToFixed32Sx2_RZ:
750 case Iop_Fixed32UToF32x2_RN:
751 case Iop_Fixed32SToF32x2_RN:
752 BINARY(Ity_I64, Ity_I8, Ity_I64);
753
754 case Iop_GetElem8x16:
755 BINARY(Ity_V128, Ity_I8, Ity_I8);
756 case Iop_GetElem16x8:
757 BINARY(Ity_V128, Ity_I8, Ity_I16);
758 case Iop_GetElem32x4:
759 BINARY(Ity_V128, Ity_I8, Ity_I32);
760 case Iop_GetElem64x2:
761 BINARY(Ity_V128, Ity_I8, Ity_I64);
762 case Iop_GetElem8x8:
763 BINARY(Ity_I64, Ity_I8, Ity_I8);
764 case Iop_GetElem16x4:
765 BINARY(Ity_I64, Ity_I8, Ity_I16);
766 case Iop_GetElem32x2:
767 BINARY(Ity_I64, Ity_I8, Ity_I32);
768 case Iop_SetElem8x8:
769 TERNARY(Ity_I64, Ity_I8, Ity_I8, Ity_I64);
770 case Iop_SetElem16x4:
771 TERNARY(Ity_I64, Ity_I8, Ity_I16, Ity_I64);
772 case Iop_SetElem32x2:
773 TERNARY(Ity_I64, Ity_I8, Ity_I32, Ity_I64);
774
775 case Iop_Extract64:
776 TERNARY(Ity_I64, Ity_I64, Ity_I8, Ity_I64);
777 case Iop_ExtractV128:
778 TERNARY(Ity_V128, Ity_V128, Ity_I8, Ity_V128);
779
780 case Iop_QDMulLong16Sx4: case Iop_QDMulLong32Sx2:
781 BINARY(Ity_I64, Ity_I64, Ity_V128);
782
783 /* s390 specific */
784 case Iop_MAddF32:
785 case Iop_MSubF32:
786 QUATERNARY(ity_RMode,Ity_F32,Ity_F32,Ity_F32, Ity_F32);
787
788 case Iop_F64HLtoF128:
789 BINARY(Ity_F64,Ity_F64, Ity_F128);
790
791 case Iop_F128HItoF64:
792 case Iop_F128LOtoF64:
793 UNARY(Ity_F128, Ity_F64);
794
795 case Iop_AddF128:
796 case Iop_SubF128:
797 case Iop_MulF128:
798 case Iop_DivF128:
799 TERNARY(ity_RMode,Ity_F128,Ity_F128, Ity_F128);
800
801 case Iop_NegF128:
802 case Iop_AbsF128:
803 UNARY(Ity_F128, Ity_F128);
804
805 case Iop_SqrtF128:
806 BINARY(ity_RMode,Ity_F128, Ity_F128);
807
808 case Iop_I32StoF128: UNARY(Ity_I32, Ity_F128);
809 case Iop_I64StoF128: UNARY(Ity_I64, Ity_F128);
810
811 case Iop_I32UtoF128: UNARY(Ity_I32, Ity_F128);
812 case Iop_I64UtoF128: UNARY(Ity_I64, Ity_F128);
813
814 case Iop_F128toI32S: BINARY(ity_RMode,Ity_F128, Ity_I32);
815 case Iop_F128toI64S: BINARY(ity_RMode,Ity_F128, Ity_I64);
816
817 case Iop_F128toI32U: BINARY(ity_RMode,Ity_F128, Ity_I32);
818 case Iop_F128toI64U: BINARY(ity_RMode,Ity_F128, Ity_I64);
819
820 case Iop_F32toF128: UNARY(Ity_F32, Ity_F128);
821 case Iop_F64toF128: UNARY(Ity_F64, Ity_F128);
822
823 case Iop_F128toF32: BINARY(ity_RMode,Ity_F128, Ity_F32);
824 case Iop_F128toF64: BINARY(ity_RMode,Ity_F128, Ity_F64);
825
826 case Iop_D32toD64:
827 UNARY(Ity_D32, Ity_D64);
828
829 case Iop_ExtractExpD64:
830 UNARY(Ity_D64, Ity_I64);
831
832 case Iop_ExtractSigD64:
833 UNARY(Ity_D64, Ity_I64);
834
835 case Iop_InsertExpD64:
836 BINARY(Ity_I64,Ity_D64, Ity_D64);
837
838 case Iop_ExtractExpD128:
839 UNARY(Ity_D128, Ity_I64);
840
841 case Iop_ExtractSigD128:
842 UNARY(Ity_D128, Ity_I64);
843
844 case Iop_InsertExpD128:
845 BINARY(Ity_I64,Ity_D128, Ity_D128);
846
847 case Iop_D64toD128:
848 UNARY(Ity_D64, Ity_D128);
849
850 case Iop_ReinterpD64asI64:
851 UNARY(Ity_D64, Ity_I64);
852
853 case Iop_ReinterpI64asD64:
854 UNARY(Ity_I64, Ity_D64);
855
856 case Iop_RoundD64toInt:
857 BINARY(ity_RMode,Ity_D64, Ity_D64);
858
859 case Iop_RoundD128toInt:
860 BINARY(ity_RMode,Ity_D128, Ity_D128);
861
862 case Iop_I32StoD128:
863 case Iop_I32UtoD128:
864 UNARY(Ity_I32, Ity_D128);
865
866 case Iop_I64StoD128:
867 UNARY(Ity_I64, Ity_D128);
868
869 case Iop_I64UtoD128:
870 UNARY(Ity_I64, Ity_D128);
871
872 case Iop_F32toD32:
873 BINARY(ity_RMode, Ity_F32, Ity_D32);
874
875 case Iop_F32toD64:
876 BINARY(ity_RMode, Ity_F32, Ity_D64);
877
878 case Iop_F32toD128:
879 BINARY(ity_RMode, Ity_F32, Ity_D128);
880
881 case Iop_F64toD32:
882 BINARY(ity_RMode, Ity_F64, Ity_D32);
883
884 case Iop_F64toD64:
885 BINARY(ity_RMode, Ity_F64, Ity_D64);
886
887 case Iop_F64toD128:
888 BINARY(ity_RMode, Ity_F64, Ity_D128);
889
890 case Iop_F128toD32:
891 BINARY(ity_RMode, Ity_F128, Ity_D32);
892
893 case Iop_F128toD64:
894 BINARY(ity_RMode, Ity_F128, Ity_D64);
895
896 case Iop_F128toD128:
897 BINARY(ity_RMode, Ity_F128, Ity_D128);
898
899 case Iop_D32toF32:
900 BINARY(ity_RMode, Ity_D32, Ity_F32);
901
902 case Iop_D32toF64:
903 BINARY(ity_RMode, Ity_D32, Ity_F64);
904
905 case Iop_D32toF128:
906 BINARY(ity_RMode, Ity_D32, Ity_F128);
907
908 case Iop_D64toF32:
909 BINARY(ity_RMode, Ity_D64, Ity_F32);
910
911 case Iop_D64toF64:
912 BINARY(ity_RMode, Ity_D64, Ity_F64);
913
914 case Iop_D64toF128:
915 BINARY(ity_RMode, Ity_D64, Ity_F128);
916
917 case Iop_D128toF32:
918 BINARY(ity_RMode, Ity_D128, Ity_F32);
919
920 case Iop_D128toF64:
921 BINARY(ity_RMode, Ity_D128, Ity_F64);
922
923 case Iop_D128toF128:
924 BINARY(ity_RMode, Ity_D128, Ity_F128);
925
926 case Iop_DPBtoBCD:
927 case Iop_BCDtoDPB:
928 UNARY(Ity_I64, Ity_I64);
929
930 case Iop_D128HItoD64:
931 case Iop_D128LOtoD64:
932 UNARY(Ity_D128, Ity_D64);
933
934 case Iop_D128toI32S:
935 case Iop_D128toI32U:
936 BINARY(ity_RMode, Ity_D128, Ity_I32);
937
938 case Iop_D128toI64S:
939 BINARY(ity_RMode, Ity_D128, Ity_I64);
940
941 case Iop_D128toI64U:
942 BINARY(ity_RMode, Ity_D128, Ity_I64);
943
944 case Iop_D64HLtoD128:
945 BINARY(Ity_D64, Ity_D64, Ity_D128);
946
947 case Iop_ShlD64:
948 case Iop_ShrD64:
949 BINARY(Ity_D64, Ity_I8, Ity_D64 );
950
951 case Iop_D64toD32:
952 BINARY(ity_RMode, Ity_D64, Ity_D32);
953
954 case Iop_D64toI32S:
955 case Iop_D64toI32U:
956 BINARY(ity_RMode, Ity_D64, Ity_I32);
957
958 case Iop_D64toI64S:
959 case Iop_D64toI64U:
960 BINARY(ity_RMode, Ity_D64, Ity_I64);
961
962 case Iop_I32StoD64:
963 case Iop_I32UtoD64:
964 UNARY(Ity_I32, Ity_D64);
965
966 case Iop_I64StoD64:
967 case Iop_I64UtoD64:
968 BINARY(ity_RMode, Ity_I64, Ity_D64);
969
970 case Iop_CmpD64:
971 case Iop_CmpExpD64:
972 BINARY(Ity_D64,Ity_D64, Ity_I32);
973
974 case Iop_CmpD128:
975 case Iop_CmpExpD128:
976 BINARY(Ity_D128,Ity_D128, Ity_I32);
977
978 case Iop_QuantizeD64:
979 TERNARY(ity_RMode,Ity_D64,Ity_D64, Ity_D64);
980
981 case Iop_SignificanceRoundD64:
982 TERNARY(ity_RMode,Ity_I8,Ity_D64, Ity_D64);
983
984 case Iop_QuantizeD128:
985 TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128);
986
987 case Iop_SignificanceRoundD128:
988 TERNARY(ity_RMode,Ity_I8,Ity_D128, Ity_D128);
989
990 case Iop_ShlD128:
991 case Iop_ShrD128:
992 BINARY(Ity_D128, Ity_I8, Ity_D128 );
993
994 case Iop_AddD64:
995 case Iop_SubD64:
996 case Iop_MulD64:
997 case Iop_DivD64:
998 TERNARY( ity_RMode, Ity_D64, Ity_D64, Ity_D64 );
999
1000 case Iop_D128toD64:
1001 BINARY( ity_RMode, Ity_D128, Ity_D64 );
1002
1003 case Iop_AddD128:
1004 case Iop_SubD128:
1005 case Iop_MulD128:
1006 case Iop_DivD128:
1007 TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128);
1008
1009 case Iop_V256to64_0: case Iop_V256to64_1:
1010 case Iop_V256to64_2: case Iop_V256to64_3:
1011 UNARY(Ity_V256, Ity_I64);
1012
1013 case Iop_64x4toV256:
1014 QUATERNARY(Ity_I64, Ity_I64, Ity_I64, Ity_I64, Ity_V256);
1015
1016 case Iop_Add64Fx4: case Iop_Sub64Fx4:
1017 case Iop_Mul64Fx4: case Iop_Div64Fx4:
1018 case Iop_Add32Fx8: case Iop_Sub32Fx8:
1019 case Iop_Mul32Fx8: case Iop_Div32Fx8:
1020 case Iop_AndV256: case Iop_OrV256:
1021 case Iop_XorV256:
1022 case Iop_Max32Fx8: case Iop_Min32Fx8:
1023 case Iop_Max64Fx4: case Iop_Min64Fx4:
1024 BINARY(Ity_V256,Ity_V256, Ity_V256);
1025
1026 case Iop_V256toV128_1: case Iop_V256toV128_0:
1027 UNARY(Ity_V256, Ity_V128);
1028
1029 case Iop_V128HLtoV256:
1030 BINARY(Ity_V128,Ity_V128, Ity_V256);
1031
1032 case Iop_NotV256:
1033 case Iop_RSqrt32Fx8:
1034 case Iop_Sqrt32Fx8:
1035 case Iop_Sqrt64Fx4:
1036 case Iop_Recip32Fx8:
1037 case Iop_CmpNEZ64x4: case Iop_CmpNEZ32x8:
1038 UNARY(Ity_V256, Ity_V256);
1039
1040 default:
1041 panic(__func__);
1042 }
1043 # undef UNARY
1044 # undef BINARY
1045 # undef TERNARY
1046 # undef COMPARISON
1047 # undef UNARY_COMPARISON
1048 }
1049