426 case T_INT: // fall-through
427 case T_LONG: // fall-through
428 case T_FLOAT: // fall-through
429 case T_DOUBLE: return Op_VectorMaskTrueCount;
430 default: fatal("MASK_TRUECOUNT: %s", type2name(bt));
431 }
432 break;
433 }
434 case VECTOR_OP_MASK_TOLONG: {
435 switch (bt) {
436 case T_BYTE: // fall-through
437 case T_SHORT: // fall-through
438 case T_INT: // fall-through
439 case T_LONG: // fall-through
440 case T_FLOAT: // fall-through
441 case T_DOUBLE: return Op_VectorMaskToLong;
442 default: fatal("MASK_TOLONG: %s", type2name(bt));
443 }
444 break;
445 }
446 case VECTOR_OP_TAN:
447 case VECTOR_OP_TANH:
448 case VECTOR_OP_SIN:
449 case VECTOR_OP_SINH:
450 case VECTOR_OP_COS:
451 case VECTOR_OP_COSH:
452 case VECTOR_OP_ASIN:
453 case VECTOR_OP_ACOS:
454 case VECTOR_OP_ATAN:
455 case VECTOR_OP_ATAN2:
456 case VECTOR_OP_CBRT:
457 case VECTOR_OP_LOG:
458 case VECTOR_OP_LOG10:
459 case VECTOR_OP_LOG1P:
460 case VECTOR_OP_POW:
461 case VECTOR_OP_EXP:
462 case VECTOR_OP_EXPM1:
463 case VECTOR_OP_HYPOT:
464 return Op_CallLeafVector;
465 default: fatal("unknown op: %d", vop);
|
426 case T_INT: // fall-through
427 case T_LONG: // fall-through
428 case T_FLOAT: // fall-through
429 case T_DOUBLE: return Op_VectorMaskTrueCount;
430 default: fatal("MASK_TRUECOUNT: %s", type2name(bt));
431 }
432 break;
433 }
434 case VECTOR_OP_MASK_TOLONG: {
435 switch (bt) {
436 case T_BYTE: // fall-through
437 case T_SHORT: // fall-through
438 case T_INT: // fall-through
439 case T_LONG: // fall-through
440 case T_FLOAT: // fall-through
441 case T_DOUBLE: return Op_VectorMaskToLong;
442 default: fatal("MASK_TOLONG: %s", type2name(bt));
443 }
444 break;
445 }
446 case VECTOR_OP_EXPAND: {
447 switch (bt) {
448 case T_BYTE: // fall-through
449 case T_SHORT: // fall-through
450 case T_INT: // fall-through
451 case T_LONG: // fall-through
452 case T_FLOAT: // fall-through
453 case T_DOUBLE: return Op_ExpandV;
454 default: fatal("EXPAND: %s", type2name(bt));
455 }
456 break;
457 }
458 case VECTOR_OP_COMPRESS: {
459 switch (bt) {
460 case T_BYTE: // fall-through
461 case T_SHORT: // fall-through
462 case T_INT: // fall-through
463 case T_LONG: // fall-through
464 case T_FLOAT: // fall-through
465 case T_DOUBLE: return Op_CompressV;
466 default: fatal("COMPRESS: %s", type2name(bt));
467 }
468 break;
469 }
470 case VECTOR_OP_MASK_COMPRESS: {
471 switch (bt) {
472 case T_BYTE: // fall-through
473 case T_SHORT: // fall-through
474 case T_INT: // fall-through
475 case T_LONG: // fall-through
476 case T_FLOAT: // fall-through
477 case T_DOUBLE: return Op_CompressM;
478 default: fatal("MASK_COMPRESS: %s", type2name(bt));
479 }
480 break;
481 }
482 case VECTOR_OP_BIT_COUNT: {
483 switch (bt) {
484 case T_BYTE: // Returning Op_PopCountI
485 case T_SHORT: // for byte and short types temporarily
486 case T_INT: return Op_PopCountI;
487 case T_LONG: return Op_PopCountL;
488 default: fatal("BIT_COUNT: %s", type2name(bt));
489 }
490 break;
491 }
492 case VECTOR_OP_TZ_COUNT: {
493 switch (bt) {
494 case T_BYTE:
495 case T_SHORT:
496 case T_INT: return Op_CountTrailingZerosI;
497 case T_LONG: return Op_CountTrailingZerosL;
498 default: fatal("TZ_COUNT: %s", type2name(bt));
499 }
500 break;
501 }
502 case VECTOR_OP_LZ_COUNT: {
503 switch (bt) {
504 case T_BYTE:
505 case T_SHORT:
506 case T_INT: return Op_CountLeadingZerosI;
507 case T_LONG: return Op_CountLeadingZerosL;
508 default: fatal("LZ_COUNT: %s", type2name(bt));
509 }
510 break;
511 }
512 case VECTOR_OP_REVERSE: {
513 switch (bt) {
514 case T_BYTE: // Temporarily returning
515 case T_SHORT: // Op_ReverseI for byte and short
516 case T_INT: return Op_ReverseI;
517 case T_LONG: return Op_ReverseL;
518 default: fatal("REVERSE: %s", type2name(bt));
519 }
520 break;
521 }
522 case VECTOR_OP_REVERSE_BYTES: {
523 switch (bt) {
524 case T_BYTE:
525 case T_SHORT:
526 case T_INT: return Op_ReverseBytesI;
527 case T_LONG: return Op_ReverseBytesL;
528 default: fatal("REVERSE_BYTES: %s", type2name(bt));
529 }
530 break;
531 }
532 case VECTOR_OP_COMPRESS_BITS: {
533 switch (bt) {
534 case T_INT:
535 case T_LONG: return Op_CompressBits;
536 default: fatal("COMPRESS_BITS: %s", type2name(bt));
537 }
538 break;
539 }
540 case VECTOR_OP_EXPAND_BITS: {
541 switch (bt) {
542 case T_INT:
543 case T_LONG: return Op_ExpandBits;
544 default: fatal("EXPAND_BITS: %s", type2name(bt));
545 }
546 break;
547 }
548
549 case VECTOR_OP_TAN:
550 case VECTOR_OP_TANH:
551 case VECTOR_OP_SIN:
552 case VECTOR_OP_SINH:
553 case VECTOR_OP_COS:
554 case VECTOR_OP_COSH:
555 case VECTOR_OP_ASIN:
556 case VECTOR_OP_ACOS:
557 case VECTOR_OP_ATAN:
558 case VECTOR_OP_ATAN2:
559 case VECTOR_OP_CBRT:
560 case VECTOR_OP_LOG:
561 case VECTOR_OP_LOG10:
562 case VECTOR_OP_LOG1P:
563 case VECTOR_OP_POW:
564 case VECTOR_OP_EXP:
565 case VECTOR_OP_EXPM1:
566 case VECTOR_OP_HYPOT:
567 return Op_CallLeafVector;
568 default: fatal("unknown op: %d", vop);
|