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)) 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 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 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 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 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 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 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 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 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_RecipStep32Fx2: 313 case Iop_RSqrtStep32Fx2: 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_QShlNsatUU8x8: case Iop_QShlNsatUU16x4: 320 case Iop_QShlNsatUU32x2: case Iop_QShlNsatUU64x1: 321 case Iop_QShlNsatSU8x8: case Iop_QShlNsatSU16x4: 322 case Iop_QShlNsatSU32x2: case Iop_QShlNsatSU64x1: 323 case Iop_QShlNsatSS8x8: case Iop_QShlNsatSS16x4: 324 case Iop_QShlNsatSS32x2: case Iop_QShlNsatSS64x1: 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_Clz8x8: case Iop_Clz16x4: case Iop_Clz32x2: 348 case Iop_Cls8x8: case Iop_Cls16x4: case Iop_Cls32x2: 349 case Iop_PwAddL8Ux8: case Iop_PwAddL16Ux4: case Iop_PwAddL32Ux2: 350 case Iop_PwAddL8Sx8: case Iop_PwAddL16Sx4: case Iop_PwAddL32Sx2: 351 case Iop_Reverse8sIn64_x1: case Iop_Reverse16sIn64_x1: 352 case Iop_Reverse32sIn64_x1: 353 case Iop_Reverse8sIn32_x2: case Iop_Reverse16sIn32_x2: 354 case Iop_Reverse8sIn16_x4: 355 case Iop_FtoI32Sx2_RZ: case Iop_FtoI32Ux2_RZ: 356 case Iop_I32StoFx2: case Iop_I32UtoFx2: 357 case Iop_RecipEst32Ux2: case Iop_RecipEst32Fx2: 358 case Iop_Abs32Fx2: 359 case Iop_RSqrtEst32Fx2: 360 case Iop_RSqrtEst32Ux2: 361 case Iop_Neg32Fx2: 362 case Iop_Abs8x8: case Iop_Abs16x4: case Iop_Abs32x2: 363 UNARY(Ity_I64, Ity_I64); 364 365 case Iop_CmpEQ8: case Iop_CmpNE8: 366 case Iop_CasCmpEQ8: case Iop_CasCmpNE8: 367 COMPARISON(Ity_I8); 368 case Iop_CmpEQ16: case Iop_CmpNE16: 369 case Iop_CasCmpEQ16: case Iop_CasCmpNE16: 370 COMPARISON(Ity_I16); 371 case Iop_CmpEQ32: case Iop_CmpNE32: 372 case Iop_CasCmpEQ32: case Iop_CasCmpNE32: 373 case Iop_CmpLT32S: case Iop_CmpLE32S: 374 case Iop_CmpLT32U: case Iop_CmpLE32U: 375 COMPARISON(Ity_I32); 376 case Iop_CmpEQ64: case Iop_CmpNE64: 377 case Iop_CasCmpEQ64: case Iop_CasCmpNE64: 378 case Iop_CmpLT64S: case Iop_CmpLE64S: 379 case Iop_CmpLT64U: case Iop_CmpLE64U: 380 COMPARISON(Ity_I64); 381 382 case Iop_CmpNEZ8: UNARY_COMPARISON(Ity_I8); 383 case Iop_CmpNEZ16: UNARY_COMPARISON(Ity_I16); 384 case Iop_CmpNEZ32: UNARY_COMPARISON(Ity_I32); 385 case Iop_CmpNEZ64: UNARY_COMPARISON(Ity_I64); 386 387 case Iop_Left8: UNARY(Ity_I8, Ity_I8); 388 case Iop_Left16: UNARY(Ity_I16,Ity_I16); 389 case Iop_CmpwNEZ32: case Iop_Left32: UNARY(Ity_I32,Ity_I32); 390 case Iop_CmpwNEZ64: case Iop_Left64: UNARY(Ity_I64,Ity_I64); 391 392 case Iop_MullU8: case Iop_MullS8: 393 BINARY(Ity_I8,Ity_I8, Ity_I16); 394 case Iop_MullU16: case Iop_MullS16: 395 BINARY(Ity_I16,Ity_I16, Ity_I32); 396 case Iop_MullU32: case Iop_MullS32: 397 BINARY(Ity_I32,Ity_I32, Ity_I64); 398 case Iop_MullU64: case Iop_MullS64: 399 BINARY(Ity_I64,Ity_I64, Ity_I128); 400 401 case Iop_Clz32: case Iop_Ctz32: 402 UNARY(Ity_I32, Ity_I32); 403 404 case Iop_Clz64: case Iop_Ctz64: 405 UNARY(Ity_I64, Ity_I64); 406 407 case Iop_DivU32: case Iop_DivS32: case Iop_DivU32E: case Iop_DivS32E: 408 BINARY(Ity_I32,Ity_I32, Ity_I32); 409 410 case Iop_DivU64: case Iop_DivS64: case Iop_DivS64E: case Iop_DivU64E: 411 BINARY(Ity_I64,Ity_I64, Ity_I64); 412 413 case Iop_DivModU64to32: case Iop_DivModS64to32: 414 BINARY(Ity_I64,Ity_I32, Ity_I64); 415 416 case Iop_DivModU128to64: case Iop_DivModS128to64: 417 BINARY(Ity_I128,Ity_I64, Ity_I128); 418 419 case Iop_DivModS64to64: 420 BINARY(Ity_I64,Ity_I64, Ity_I128); 421 422 case Iop_16HIto8: case Iop_16to8: 423 UNARY(Ity_I16, Ity_I8); 424 case Iop_8HLto16: 425 BINARY(Ity_I8,Ity_I8, Ity_I16); 426 427 case Iop_32HIto16: case Iop_32to16: 428 UNARY(Ity_I32, Ity_I16); 429 case Iop_16HLto32: 430 BINARY(Ity_I16,Ity_I16, Ity_I32); 431 432 case Iop_64HIto32: case Iop_64to32: 433 UNARY(Ity_I64, Ity_I32); 434 case Iop_32HLto64: 435 BINARY(Ity_I32,Ity_I32, Ity_I64); 436 437 case Iop_128HIto64: case Iop_128to64: 438 UNARY(Ity_I128, Ity_I64); 439 case Iop_64HLto128: 440 BINARY(Ity_I64,Ity_I64, Ity_I128); 441 442 case Iop_Not1: UNARY(Ity_I1, Ity_I1); 443 case Iop_1Uto8: UNARY(Ity_I1, Ity_I8); 444 case Iop_1Sto8: UNARY(Ity_I1, Ity_I8); 445 case Iop_1Sto16: UNARY(Ity_I1, Ity_I16); 446 case Iop_1Uto32: case Iop_1Sto32: UNARY(Ity_I1, Ity_I32); 447 case Iop_1Sto64: case Iop_1Uto64: UNARY(Ity_I1, Ity_I64); 448 case Iop_32to1: UNARY(Ity_I32, Ity_I1); 449 case Iop_64to1: UNARY(Ity_I64, Ity_I1); 450 451 case Iop_8Uto32: case Iop_8Sto32: 452 UNARY(Ity_I8, Ity_I32); 453 454 case Iop_8Uto16: case Iop_8Sto16: 455 UNARY(Ity_I8, Ity_I16); 456 457 case Iop_16Uto32: case Iop_16Sto32: 458 UNARY(Ity_I16, Ity_I32); 459 460 case Iop_32Sto64: case Iop_32Uto64: 461 UNARY(Ity_I32, Ity_I64); 462 463 case Iop_8Uto64: case Iop_8Sto64: 464 UNARY(Ity_I8, Ity_I64); 465 466 case Iop_16Uto64: case Iop_16Sto64: 467 UNARY(Ity_I16, Ity_I64); 468 case Iop_64to16: 469 UNARY(Ity_I64, Ity_I16); 470 471 case Iop_32to8: UNARY(Ity_I32, Ity_I8); 472 case Iop_64to8: UNARY(Ity_I64, Ity_I8); 473 474 case Iop_AddF64: case Iop_SubF64: 475 case Iop_MulF64: case Iop_DivF64: 476 case Iop_AddF64r32: case Iop_SubF64r32: 477 case Iop_MulF64r32: case Iop_DivF64r32: 478 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_F64); 479 480 case Iop_AddF32: case Iop_SubF32: 481 case Iop_MulF32: case Iop_DivF32: 482 TERNARY(ity_RMode,Ity_F32,Ity_F32, Ity_F32); 483 484 case Iop_NegF64: case Iop_AbsF64: 485 UNARY(Ity_F64, Ity_F64); 486 487 case Iop_NegF32: case Iop_AbsF32: 488 UNARY(Ity_F32, Ity_F32); 489 490 case Iop_SqrtF64: 491 BINARY(ity_RMode,Ity_F64, Ity_F64); 492 493 case Iop_SqrtF32: 494 case Iop_RoundF32toInt: 495 BINARY(ity_RMode,Ity_F32, Ity_F32); 496 497 case Iop_CmpF32: 498 BINARY(Ity_F32,Ity_F32, Ity_I32); 499 500 case Iop_CmpF64: 501 BINARY(Ity_F64,Ity_F64, Ity_I32); 502 503 case Iop_CmpF128: 504 BINARY(Ity_F128,Ity_F128, Ity_I32); 505 506 case Iop_F64toI16S: BINARY(ity_RMode,Ity_F64, Ity_I16); 507 case Iop_F64toI32S: BINARY(ity_RMode,Ity_F64, Ity_I32); 508 case Iop_F64toI64S: case Iop_F64toI64U: 509 BINARY(ity_RMode,Ity_F64, Ity_I64); 510 511 case Iop_F64toI32U: BINARY(ity_RMode,Ity_F64, Ity_I32); 512 513 case Iop_I32StoF64: UNARY(Ity_I32, Ity_F64); 514 case Iop_I64StoF64: BINARY(ity_RMode,Ity_I64, Ity_F64); 515 case Iop_I64UtoF64: BINARY(ity_RMode,Ity_I64, Ity_F64); 516 case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F32); 517 518 case Iop_I32UtoF64: UNARY(Ity_I32, Ity_F64); 519 520 case Iop_F32toI32S: BINARY(ity_RMode,Ity_F32, Ity_I32); 521 case Iop_F32toI64S: BINARY(ity_RMode,Ity_F32, Ity_I64); 522 case Iop_F32toI32U: BINARY(ity_RMode,Ity_F32, Ity_I32); 523 case Iop_F32toI64U: BINARY(ity_RMode,Ity_F32, Ity_I64); 524 525 case Iop_I32UtoF32: BINARY(ity_RMode,Ity_I32, Ity_F32); 526 case Iop_I32StoF32: BINARY(ity_RMode,Ity_I32, Ity_F32); 527 case Iop_I64StoF32: BINARY(ity_RMode,Ity_I64, Ity_F32); 528 529 case Iop_F32toF64: UNARY(Ity_F32, Ity_F64); 530 case Iop_F64toF32: BINARY(ity_RMode,Ity_F64, Ity_F32); 531 532 case Iop_ReinterpI64asF64: UNARY(Ity_I64, Ity_F64); 533 case Iop_ReinterpF64asI64: UNARY(Ity_F64, Ity_I64); 534 case Iop_ReinterpI32asF32: UNARY(Ity_I32, Ity_F32); 535 case Iop_ReinterpF32asI32: UNARY(Ity_F32, Ity_I32); 536 537 case Iop_AtanF64: case Iop_Yl2xF64: case Iop_Yl2xp1F64: 538 case Iop_ScaleF64: case Iop_PRemF64: case Iop_PRem1F64: 539 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_F64); 540 541 case Iop_PRemC3210F64: case Iop_PRem1C3210F64: 542 TERNARY(ity_RMode,Ity_F64,Ity_F64, Ity_I32); 543 544 case Iop_SinF64: case Iop_CosF64: case Iop_TanF64: 545 case Iop_2xm1F64: 546 case Iop_RoundF64toInt: BINARY(ity_RMode,Ity_F64, Ity_F64); 547 548 case Iop_MAddF64: case Iop_MSubF64: 549 case Iop_MAddF64r32: case Iop_MSubF64r32: 550 QUATERNARY(ity_RMode,Ity_F64,Ity_F64,Ity_F64, Ity_F64); 551 552 case Iop_RSqrtEst5GoodF64: 553 case Iop_RoundF64toF64_NEAREST: case Iop_RoundF64toF64_NegINF: 554 case Iop_RoundF64toF64_PosINF: case Iop_RoundF64toF64_ZERO: 555 UNARY(Ity_F64, Ity_F64); 556 case Iop_RoundF64toF32: 557 BINARY(ity_RMode,Ity_F64, Ity_F64); 558 case Iop_TruncF64asF32: 559 UNARY(Ity_F64, Ity_F32); 560 561 case Iop_I32UtoFx4: 562 case Iop_I32StoFx4: 563 case Iop_QFtoI32Ux4_RZ: 564 case Iop_QFtoI32Sx4_RZ: 565 case Iop_FtoI32Ux4_RZ: 566 case Iop_FtoI32Sx4_RZ: 567 case Iop_RoundF32x4_RM: 568 case Iop_RoundF32x4_RP: 569 case Iop_RoundF32x4_RN: 570 case Iop_RoundF32x4_RZ: 571 case Iop_Abs32Fx4: 572 case Iop_RSqrtEst32Fx4: 573 case Iop_RSqrtEst32Ux4: 574 UNARY(Ity_V128, Ity_V128); 575 576 case Iop_64HLtoV128: 577 BINARY(Ity_I64,Ity_I64, Ity_V128); 578 579 case Iop_V128to64: case Iop_V128HIto64: 580 case Iop_NarrowUn16to8x8: 581 case Iop_NarrowUn32to16x4: 582 case Iop_NarrowUn64to32x2: 583 case Iop_QNarrowUn16Uto8Ux8: 584 case Iop_QNarrowUn32Uto16Ux4: 585 case Iop_QNarrowUn64Uto32Ux2: 586 case Iop_QNarrowUn16Sto8Sx8: 587 case Iop_QNarrowUn32Sto16Sx4: 588 case Iop_QNarrowUn64Sto32Sx2: 589 case Iop_QNarrowUn16Sto8Ux8: 590 case Iop_QNarrowUn32Sto16Ux4: 591 case Iop_QNarrowUn64Sto32Ux2: 592 case Iop_F32toF16x4: 593 UNARY(Ity_V128, Ity_I64); 594 595 case Iop_Widen8Uto16x8: 596 case Iop_Widen16Uto32x4: 597 case Iop_Widen32Uto64x2: 598 case Iop_Widen8Sto16x8: 599 case Iop_Widen16Sto32x4: 600 case Iop_Widen32Sto64x2: 601 case Iop_F16toF32x4: 602 UNARY(Ity_I64, Ity_V128); 603 604 case Iop_V128to32: UNARY(Ity_V128, Ity_I32); 605 case Iop_32UtoV128: UNARY(Ity_I32, Ity_V128); 606 case Iop_64UtoV128: UNARY(Ity_I64, Ity_V128); 607 case Iop_SetV128lo32: BINARY(Ity_V128,Ity_I32, Ity_V128); 608 case Iop_SetV128lo64: BINARY(Ity_V128,Ity_I64, Ity_V128); 609 610 case Iop_Dup8x16: UNARY(Ity_I8, Ity_V128); 611 case Iop_Dup16x8: UNARY(Ity_I16, Ity_V128); 612 case Iop_Dup32x4: UNARY(Ity_I32, Ity_V128); 613 case Iop_Dup8x8: UNARY(Ity_I8, Ity_I64); 614 case Iop_Dup16x4: UNARY(Ity_I16, Ity_I64); 615 case Iop_Dup32x2: UNARY(Ity_I32, Ity_I64); 616 617 case Iop_CmpEQ32Fx4: case Iop_CmpLT32Fx4: 618 case Iop_CmpEQ64Fx2: case Iop_CmpLT64Fx2: 619 case Iop_CmpLE32Fx4: case Iop_CmpUN32Fx4: 620 case Iop_CmpLE64Fx2: case Iop_CmpUN64Fx2: 621 case Iop_CmpGT32Fx4: case Iop_CmpGE32Fx4: 622 case Iop_CmpEQ32F0x4: case Iop_CmpLT32F0x4: 623 case Iop_CmpEQ64F0x2: case Iop_CmpLT64F0x2: 624 case Iop_CmpLE32F0x4: case Iop_CmpUN32F0x4: 625 case Iop_CmpLE64F0x2: case Iop_CmpUN64F0x2: 626 case Iop_Add32Fx4: case Iop_Add32F0x4: 627 case Iop_Add64Fx2: case Iop_Add64F0x2: 628 case Iop_Div32Fx4: case Iop_Div32F0x4: 629 case Iop_Div64Fx2: case Iop_Div64F0x2: 630 case Iop_Max32Fx4: case Iop_Max32F0x4: 631 case Iop_PwMax32Fx4: case Iop_PwMin32Fx4: 632 case Iop_Max64Fx2: case Iop_Max64F0x2: 633 case Iop_Min32Fx4: case Iop_Min32F0x4: 634 case Iop_Min64Fx2: case Iop_Min64F0x2: 635 case Iop_Mul32Fx4: case Iop_Mul32F0x4: 636 case Iop_Mul64Fx2: case Iop_Mul64F0x2: 637 case Iop_Sub32Fx4: case Iop_Sub32F0x4: 638 case Iop_Sub64Fx2: case Iop_Sub64F0x2: 639 case Iop_AndV128: case Iop_OrV128: case Iop_XorV128: 640 case Iop_Add8x16: case Iop_Add16x8: 641 case Iop_Add32x4: case Iop_Add64x2: 642 case Iop_QAdd8Ux16: case Iop_QAdd16Ux8: 643 case Iop_QAdd32Ux4: //case Iop_QAdd64Ux2: 644 case Iop_QAdd8Sx16: case Iop_QAdd16Sx8: 645 case Iop_QAdd32Sx4: case Iop_QAdd64Sx2: 646 case Iop_PwAdd8x16: case Iop_PwAdd16x8: case Iop_PwAdd32x4: 647 case Iop_Sub8x16: case Iop_Sub16x8: 648 case Iop_Sub32x4: case Iop_Sub64x2: 649 case Iop_QSub8Ux16: case Iop_QSub16Ux8: 650 case Iop_QSub32Ux4: //case Iop_QSub64Ux2: 651 case Iop_QSub8Sx16: case Iop_QSub16Sx8: 652 case Iop_QSub32Sx4: case Iop_QSub64Sx2: 653 case Iop_Mul8x16: case Iop_Mul16x8: case Iop_Mul32x4: 654 case Iop_PolynomialMul8x16: 655 case Iop_MulHi16Ux8: case Iop_MulHi32Ux4: 656 case Iop_MulHi16Sx8: case Iop_MulHi32Sx4: 657 case Iop_QDMulHi16Sx8: case Iop_QDMulHi32Sx4: 658 case Iop_QRDMulHi16Sx8: case Iop_QRDMulHi32Sx4: 659 case Iop_MullEven8Ux16: case Iop_MullEven16Ux8: 660 case Iop_MullEven8Sx16: case Iop_MullEven16Sx8: 661 case Iop_Avg8Ux16: case Iop_Avg16Ux8: case Iop_Avg32Ux4: 662 case Iop_Avg8Sx16: case Iop_Avg16Sx8: case Iop_Avg32Sx4: 663 case Iop_Max8Sx16: case Iop_Max16Sx8: case Iop_Max32Sx4: 664 case Iop_Max8Ux16: case Iop_Max16Ux8: case Iop_Max32Ux4: 665 case Iop_Min8Sx16: case Iop_Min16Sx8: case Iop_Min32Sx4: 666 case Iop_Min8Ux16: case Iop_Min16Ux8: case Iop_Min32Ux4: 667 case Iop_CmpEQ8x16: case Iop_CmpEQ16x8: case Iop_CmpEQ32x4: 668 case Iop_CmpEQ64x2: 669 case Iop_CmpGT8Sx16: case Iop_CmpGT16Sx8: case Iop_CmpGT32Sx4: 670 case Iop_CmpGT64Sx2: 671 case Iop_CmpGT8Ux16: case Iop_CmpGT16Ux8: case Iop_CmpGT32Ux4: 672 case Iop_Shl8x16: case Iop_Shl16x8: case Iop_Shl32x4: case Iop_Shl64x2: 673 case Iop_QShl8x16: case Iop_QShl16x8: 674 case Iop_QShl32x4: case Iop_QShl64x2: 675 case Iop_QSal8x16: case Iop_QSal16x8: 676 case Iop_QSal32x4: case Iop_QSal64x2: 677 case Iop_Shr8x16: case Iop_Shr16x8: case Iop_Shr32x4: case Iop_Shr64x2: 678 case Iop_Sar8x16: case Iop_Sar16x8: case Iop_Sar32x4: case Iop_Sar64x2: 679 case Iop_Sal8x16: case Iop_Sal16x8: case Iop_Sal32x4: case Iop_Sal64x2: 680 case Iop_Rol8x16: case Iop_Rol16x8: case Iop_Rol32x4: 681 case Iop_QNarrowBin16Sto8Ux16: case Iop_QNarrowBin32Sto16Ux8: 682 case Iop_QNarrowBin16Sto8Sx16: case Iop_QNarrowBin32Sto16Sx8: 683 case Iop_QNarrowBin16Uto8Ux16: case Iop_QNarrowBin32Uto16Ux8: 684 case Iop_NarrowBin16to8x16: case Iop_NarrowBin32to16x8: 685 case Iop_InterleaveHI8x16: case Iop_InterleaveHI16x8: 686 case Iop_InterleaveHI32x4: case Iop_InterleaveHI64x2: 687 case Iop_InterleaveLO8x16: case Iop_InterleaveLO16x8: 688 case Iop_InterleaveLO32x4: case Iop_InterleaveLO64x2: 689 case Iop_CatOddLanes8x16: case Iop_CatEvenLanes8x16: 690 case Iop_CatOddLanes16x8: case Iop_CatEvenLanes16x8: 691 case Iop_CatOddLanes32x4: case Iop_CatEvenLanes32x4: 692 case Iop_InterleaveOddLanes8x16: case Iop_InterleaveEvenLanes8x16: 693 case Iop_InterleaveOddLanes16x8: case Iop_InterleaveEvenLanes16x8: 694 case Iop_InterleaveOddLanes32x4: case Iop_InterleaveEvenLanes32x4: 695 case Iop_Perm8x16: case Iop_Perm32x4: 696 case Iop_RecipStep32Fx4: 697 case Iop_RSqrtStep32Fx4: 698 BINARY(Ity_V128,Ity_V128, Ity_V128); 699 700 case Iop_PolynomialMull8x8: 701 case Iop_Mull8Ux8: case Iop_Mull8Sx8: 702 case Iop_Mull16Ux4: case Iop_Mull16Sx4: 703 case Iop_Mull32Ux2: case Iop_Mull32Sx2: 704 BINARY(Ity_I64, Ity_I64, Ity_V128); 705 706 case Iop_NotV128: 707 case Iop_RecipEst32Fx4: case Iop_RecipEst32F0x4: 708 case Iop_RecipEst32Ux4: 709 case Iop_RSqrtEst32F0x4: 710 case Iop_Sqrt32Fx4: case Iop_Sqrt32F0x4: 711 case Iop_Sqrt64Fx2: case Iop_Sqrt64F0x2: 712 case Iop_CmpNEZ8x16: case Iop_CmpNEZ16x8: 713 case Iop_CmpNEZ32x4: case Iop_CmpNEZ64x2: 714 case Iop_Cnt8x16: 715 case Iop_Clz8x16: case Iop_Clz16x8: case Iop_Clz32x4: 716 case Iop_Cls8x16: case Iop_Cls16x8: case Iop_Cls32x4: 717 case Iop_PwAddL8Ux16: case Iop_PwAddL16Ux8: case Iop_PwAddL32Ux4: 718 case Iop_PwAddL8Sx16: case Iop_PwAddL16Sx8: case Iop_PwAddL32Sx4: 719 case Iop_Reverse8sIn64_x2: case Iop_Reverse16sIn64_x2: 720 case Iop_Reverse32sIn64_x2: 721 case Iop_Reverse8sIn32_x4: case Iop_Reverse16sIn32_x4: 722 case Iop_Reverse8sIn16_x8: 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_QShlNsatUU8x16: case Iop_QShlNsatUU16x8: 735 case Iop_QShlNsatUU32x4: case Iop_QShlNsatUU64x2: 736 case Iop_QShlNsatSU8x16: case Iop_QShlNsatSU16x8: 737 case Iop_QShlNsatSU32x4: case Iop_QShlNsatSU64x2: 738 case Iop_QShlNsatSS8x16: case Iop_QShlNsatSS16x8: 739 case Iop_QShlNsatSS32x4: case Iop_QShlNsatSS64x2: 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_Slice64: 776 TERNARY(Ity_I64, Ity_I64, Ity_I8, Ity_I64); 777 case Iop_SliceV128: 778 TERNARY(Ity_V128, Ity_V128, Ity_I8, Ity_V128); 779 780 case Iop_QDMull16Sx4: case Iop_QDMull32Sx2: 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_RSqrtEst32Fx8: 1034 case Iop_Sqrt32Fx8: 1035 case Iop_Sqrt64Fx4: 1036 case Iop_RecipEst32Fx8: 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