(
all_instructions: &mut AllInstructions,
formats: &Formats,
imm: &Immediates,
entities: &EntityRefs,
)
| 667 | } |
| 668 | |
| 669 | pub(crate) fn define( |
| 670 | all_instructions: &mut AllInstructions, |
| 671 | formats: &Formats, |
| 672 | imm: &Immediates, |
| 673 | entities: &EntityRefs, |
| 674 | ) { |
| 675 | let mut ig = InstructionGroupBuilder::new(all_instructions); |
| 676 | |
| 677 | define_control_flow(&mut ig, formats, imm, entities); |
| 678 | define_simd_lane_access(&mut ig, formats, imm, entities); |
| 679 | define_simd_arithmetic(&mut ig, formats, imm, entities); |
| 680 | |
| 681 | // Operand kind shorthands. |
| 682 | let i8: &TypeVar = &ValueType::from(LaneType::from(types::Int::I8)).into(); |
| 683 | let f16_: &TypeVar = &ValueType::from(LaneType::from(types::Float::F16)).into(); |
| 684 | let f32_: &TypeVar = &ValueType::from(LaneType::from(types::Float::F32)).into(); |
| 685 | let f64_: &TypeVar = &ValueType::from(LaneType::from(types::Float::F64)).into(); |
| 686 | let f128_: &TypeVar = &ValueType::from(LaneType::from(types::Float::F128)).into(); |
| 687 | |
| 688 | // Starting definitions. |
| 689 | let Int = &TypeVar::new( |
| 690 | "Int", |
| 691 | "A scalar or vector integer type", |
| 692 | TypeSetBuilder::new() |
| 693 | .ints(Interval::All) |
| 694 | .simd_lanes(Interval::All) |
| 695 | .dynamic_simd_lanes(Interval::All) |
| 696 | .build(), |
| 697 | ); |
| 698 | |
| 699 | let NarrowInt = &TypeVar::new( |
| 700 | "NarrowInt", |
| 701 | "An integer type of width up to `i64`", |
| 702 | TypeSetBuilder::new().ints(8..64).build(), |
| 703 | ); |
| 704 | |
| 705 | let ScalarTruthy = &TypeVar::new( |
| 706 | "ScalarTruthy", |
| 707 | "A scalar truthy type", |
| 708 | TypeSetBuilder::new().ints(Interval::All).build(), |
| 709 | ); |
| 710 | |
| 711 | let iB = &TypeVar::new( |
| 712 | "iB", |
| 713 | "A scalar integer type", |
| 714 | TypeSetBuilder::new().ints(Interval::All).build(), |
| 715 | ); |
| 716 | |
| 717 | let iSwappable = &TypeVar::new( |
| 718 | "iSwappable", |
| 719 | "A multi byte scalar integer type", |
| 720 | TypeSetBuilder::new().ints(16..128).build(), |
| 721 | ); |
| 722 | |
| 723 | let iAddr = &TypeVar::new( |
| 724 | "iAddr", |
| 725 | "An integer address type", |
| 726 | TypeSetBuilder::new().ints(32..64).build(), |
nothing calls this directly
no test coverage detected