diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 9a4f961462..c72395ea73 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -12,6 +12,40 @@ use std::ops; use std::rc::Rc; use std::slice; +pub struct InstructionGroupBuilder<'format_reg> { + _name: &'static str, + _doc: &'static str, + format_registry: &'format_reg FormatRegistry, + instructions: Vec, +} + +impl<'format_reg> InstructionGroupBuilder<'format_reg> { + pub fn new( + name: &'static str, + doc: &'static str, + format_registry: &'format_reg FormatRegistry, + ) -> Self { + Self { + _name: name, + _doc: doc, + format_registry, + instructions: Vec::new(), + } + } + + pub fn push(&mut self, builder: InstructionBuilder) { + self.instructions.push(builder.finish(self.format_registry)); + } + + pub fn finish(self) -> InstructionGroup { + InstructionGroup { + _name: self._name, + _doc: self._doc, + instructions: self.instructions, + } + } +} + /// Every instruction must belong to exactly one instruction group. A given /// target architecture can support instructions from multiple groups, and it /// does not necessarily support all instructions in a group. @@ -22,18 +56,6 @@ pub struct InstructionGroup { } impl InstructionGroup { - pub fn new(name: &'static str, doc: &'static str) -> Self { - Self { - _name: name, - _doc: doc, - instructions: Vec::new(), - } - } - - pub fn push(&mut self, inst: Instruction) { - self.instructions.push(inst); - } - pub fn iter(&self) -> slice::Iter { self.instructions.iter() } @@ -278,7 +300,7 @@ impl InstructionBuilder { self } - pub fn finish(self, format_registry: &FormatRegistry) -> Instruction { + fn finish(self, format_registry: &FormatRegistry) -> Instruction { let operands_in = self.operands_in.unwrap_or_else(Vec::new); let operands_out = self.operands_out.unwrap_or_else(Vec::new); diff --git a/cranelift/codegen/meta/src/cdsl/xform.rs b/cranelift/codegen/meta/src/cdsl/xform.rs index 224616f17a..811d4517cd 100644 --- a/cranelift/codegen/meta/src/cdsl/xform.rs +++ b/cranelift/codegen/meta/src/cdsl/xform.rs @@ -404,11 +404,14 @@ impl TransformGroups { #[should_panic] fn test_double_custom_legalization() { use crate::cdsl::formats::{FormatRegistry, InstructionFormatBuilder}; - use crate::cdsl::instructions::InstructionBuilder; + use crate::cdsl::instructions::{InstructionBuilder, InstructionGroupBuilder}; let mut format = FormatRegistry::new(); format.insert(InstructionFormatBuilder::new("nullary")); - let dummy_inst = InstructionBuilder::new("dummy", "doc").finish(&format); + let mut inst_group = InstructionGroupBuilder::new("test", "", &format); + inst_group.push(InstructionBuilder::new("dummy", "doc")); + let inst_group = inst_group.finish(); + let dummy_inst = inst_group.by_name("dummy"); let mut transform_group = TransformGroupBuilder::new("test", "doc"); transform_group.custom_legalize(&dummy_inst, "custom 1"); diff --git a/cranelift/codegen/meta/src/isa/arm32/mod.rs b/cranelift/codegen/meta/src/isa/arm32/mod.rs index 454318b8db..2115616c26 100644 --- a/cranelift/codegen/meta/src/isa/arm32/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm32/mod.rs @@ -1,5 +1,5 @@ use crate::cdsl::cpu_modes::CpuMode; -use crate::cdsl::instructions::InstructionGroup; +use crate::cdsl::instructions::InstructionGroupBuilder; use crate::cdsl::isa::TargetIsa; use crate::cdsl::regs::{IsaRegs, IsaRegsBuilder, RegBankBuilder, RegClassBuilder}; use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder}; @@ -52,7 +52,12 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa { let settings = define_settings(&shared_defs.settings); let regs = define_regs(); - let inst_group = InstructionGroup::new("arm32", "arm32 specific instruction set"); + let inst_group = InstructionGroupBuilder::new( + "arm32", + "arm32 specific instruction set", + &shared_defs.format_registry, + ) + .finish(); // CPU modes for 32-bit ARM and Thumb2. let mut a32 = CpuMode::new("A32"); diff --git a/cranelift/codegen/meta/src/isa/arm64/mod.rs b/cranelift/codegen/meta/src/isa/arm64/mod.rs index 1aac6b26ff..07518bf986 100644 --- a/cranelift/codegen/meta/src/isa/arm64/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm64/mod.rs @@ -1,5 +1,5 @@ use crate::cdsl::cpu_modes::CpuMode; -use crate::cdsl::instructions::InstructionGroup; +use crate::cdsl::instructions::InstructionGroupBuilder; use crate::cdsl::isa::TargetIsa; use crate::cdsl::regs::{IsaRegs, IsaRegsBuilder, RegBankBuilder, RegClassBuilder}; use crate::cdsl::settings::{SettingGroup, SettingGroupBuilder}; @@ -48,7 +48,12 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa { let settings = define_settings(&shared_defs.settings); let regs = define_registers(); - let inst_group = InstructionGroup::new("arm64", "arm64 specific instruction set"); + let inst_group = InstructionGroupBuilder::new( + "arm64", + "arm64 specific instruction set", + &shared_defs.format_registry, + ) + .finish(); let mut a64 = CpuMode::new("A64"); diff --git a/cranelift/codegen/meta/src/isa/riscv/mod.rs b/cranelift/codegen/meta/src/isa/riscv/mod.rs index db64c458b9..66390c4c43 100644 --- a/cranelift/codegen/meta/src/isa/riscv/mod.rs +++ b/cranelift/codegen/meta/src/isa/riscv/mod.rs @@ -1,5 +1,5 @@ use crate::cdsl::cpu_modes::CpuMode; -use crate::cdsl::instructions::InstructionGroup; +use crate::cdsl::instructions::InstructionGroupBuilder; use crate::cdsl::isa::TargetIsa; use crate::cdsl::regs::{IsaRegs, IsaRegsBuilder, RegBankBuilder, RegClassBuilder}; use crate::cdsl::settings::{PredicateNode, SettingGroup, SettingGroupBuilder}; @@ -86,7 +86,12 @@ pub fn define(shared_defs: &mut SharedDefinitions) -> TargetIsa { let settings = define_settings(&shared_defs.settings); let regs = define_registers(); - let inst_group = InstructionGroup::new("riscv", "riscv specific instruction set"); + let inst_group = InstructionGroupBuilder::new( + "riscv", + "riscv specific instruction set", + &shared_defs.format_registry, + ) + .finish(); // CPU modes for 32-bit and 64-bit operation. let mut rv_32 = CpuMode::new("RV32"); diff --git a/cranelift/codegen/meta/src/isa/x86/instructions.rs b/cranelift/codegen/meta/src/isa/x86/instructions.rs index 3255fc99c4..e66b7752f7 100644 --- a/cranelift/codegen/meta/src/isa/x86/instructions.rs +++ b/cranelift/codegen/meta/src/isa/x86/instructions.rs @@ -1,14 +1,17 @@ #![allow(non_snake_case)] use crate::cdsl::formats::FormatRegistry; -use crate::cdsl::instructions::{InstructionBuilder as Inst, InstructionGroup}; +use crate::cdsl::instructions::{ + InstructionBuilder as Inst, InstructionGroup, InstructionGroupBuilder, +}; use crate::cdsl::operands::{create_operand as operand, create_operand_doc as operand_doc}; use crate::cdsl::types::ValueType; use crate::cdsl::typevar::{Interval, TypeSetBuilder, TypeVar}; use crate::shared::types; pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { - let mut ig = InstructionGroup::new("x86", "x86 specific instruction set"); + let mut ig = + InstructionGroupBuilder::new("x86", "x86 specific instruction set", format_registry); let iflags: &TypeVar = &ValueType::Special(types::Flag::IFlags.into()).into(); @@ -39,8 +42,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { ) .operands_in(vec![nlo, nhi, d]) .operands_out(vec![q, r]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -59,8 +61,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { ) .operands_in(vec![nlo, nhi, d]) .operands_out(vec![q, r]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); let argL = &operand("argL", iWord); @@ -79,8 +80,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![argL, argR]) - .operands_out(vec![resLo, resHi]) - .finish(format_registry), + .operands_out(vec![resLo, resHi]), ); ig.push( @@ -94,8 +94,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![argL, argR]) - .operands_out(vec![resLo, resHi]) - .finish(format_registry), + .operands_out(vec![resLo, resHi]), ); let Float = &TypeVar::new( @@ -131,8 +130,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", Float); @@ -154,8 +152,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -173,8 +170,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", iWord); @@ -193,8 +189,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { ) .operands_in(vec![x]) .other_side_effects(true) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -212,8 +207,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { ) .operands_out(vec![x]) .other_side_effects(true) - .can_load(true) - .finish(format_registry), + .can_load(true), ); let y = &operand("y", iWord); @@ -233,8 +227,7 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![x]) - .operands_out(vec![y, rflags]) - .finish(format_registry), + .operands_out(vec![y, rflags]), ); ig.push( @@ -246,9 +239,8 @@ pub fn define(format_registry: &FormatRegistry) -> InstructionGroup { "#, ) .operands_in(vec![x]) - .operands_out(vec![y, rflags]) - .finish(format_registry), + .operands_out(vec![y, rflags]), ); - ig + ig.finish() } diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 65f8103672..5c810b9979 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -1,7 +1,9 @@ #![allow(non_snake_case)] use crate::cdsl::formats::FormatRegistry; -use crate::cdsl::instructions::{InstructionBuilder as Inst, InstructionGroup}; +use crate::cdsl::instructions::{ + InstructionBuilder as Inst, InstructionGroup, InstructionGroupBuilder, +}; use crate::cdsl::operands::{create_operand as operand, create_operand_doc as operand_doc}; use crate::cdsl::type_inference::Constraint::WiderOrEq; use crate::cdsl::types::{LaneType, ValueType}; @@ -13,7 +15,8 @@ pub fn define( immediates: &OperandKinds, entities: &OperandKinds, ) -> InstructionGroup { - let mut ig = InstructionGroup::new("base", "Shared base instruction set"); + let mut ig = + InstructionGroupBuilder::new("base", "Shared base instruction set", format_registry); // Operand kind shorthands. let intcc = immediates.by_name("intcc"); @@ -151,8 +154,7 @@ pub fn define( ) .operands_in(vec![EBB, args]) .is_terminator(true) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); ig.push( @@ -171,8 +173,7 @@ pub fn define( ) .operands_in(vec![EBB, args]) .is_terminator(true) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); ig.push( @@ -186,8 +187,7 @@ pub fn define( "#, ) .operands_in(vec![c, EBB, args]) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); ig.push( @@ -201,8 +201,7 @@ pub fn define( "#, ) .operands_in(vec![c, EBB, args]) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); ig.push( @@ -227,8 +226,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, x, y, EBB, args]) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); let f = &operand("f", iflags); @@ -241,8 +239,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f, EBB, args]) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); let Cond = &operand("Cond", floatcc); @@ -256,8 +253,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f, EBB, args]) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); let x = &operand_doc("x", iB, "index into jump table"); @@ -293,8 +289,7 @@ pub fn define( ) .operands_in(vec![x, EBB, JT]) .is_terminator(true) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); let Size = &operand_doc("Size", uimm8, "Size in bytes"); @@ -314,8 +309,7 @@ pub fn define( "#, ) .operands_in(vec![x, addr, Size, JT]) - .operands_out(vec![entry]) - .finish(format_registry), + .operands_out(vec![entry]), ); ig.push( @@ -331,8 +325,7 @@ pub fn define( "#, ) .operands_in(vec![JT]) - .operands_out(vec![addr]) - .finish(format_registry), + .operands_out(vec![addr]), ); ig.push( @@ -348,8 +341,7 @@ pub fn define( .operands_in(vec![addr, JT]) .is_indirect_branch(true) .is_terminator(true) - .is_branch(true) - .finish(format_registry), + .is_branch(true), ); ig.push( @@ -361,8 +353,7 @@ pub fn define( ) .other_side_effects(true) .can_load(true) - .can_store(true) - .finish(format_registry), + .can_store(true), ); let code = &operand("code", trapcode); @@ -376,8 +367,7 @@ pub fn define( ) .operands_in(vec![code]) .can_trap(true) - .is_terminator(true) - .finish(format_registry), + .is_terminator(true), ); ig.push( @@ -390,8 +380,7 @@ pub fn define( "#, ) .operands_in(vec![c, code]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -404,8 +393,7 @@ pub fn define( "#, ) .operands_in(vec![c, code]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); let Cond = &operand("Cond", intcc); @@ -419,8 +407,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f, code]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); let Cond = &operand("Cond", floatcc); @@ -434,8 +421,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f, code]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); let rvals = &operand_doc("rvals", variable_args, "return values"); @@ -453,8 +439,7 @@ pub fn define( ) .operands_in(vec![rvals]) .is_return(true) - .is_terminator(true) - .finish(format_registry), + .is_terminator(true), ); ig.push( @@ -470,8 +455,7 @@ pub fn define( ) .operands_in(vec![rvals]) .is_return(true) - .is_terminator(true) - .finish(format_registry), + .is_terminator(true), ); let FN = &operand_doc( @@ -493,8 +477,7 @@ pub fn define( ) .operands_in(vec![FN, args]) .operands_out(vec![rvals]) - .is_call(true) - .finish(format_registry), + .is_call(true), ); let SIG = &operand_doc("SIG", sig_ref, "function signature"); @@ -517,8 +500,7 @@ pub fn define( ) .operands_in(vec![SIG, callee, args]) .operands_out(vec![rvals]) - .is_call(true) - .finish(format_registry), + .is_call(true), ); ig.push( @@ -535,8 +517,7 @@ pub fn define( "#, ) .operands_in(vec![FN]) - .operands_out(vec![addr]) - .finish(format_registry), + .operands_out(vec![addr]), ); let SS = &operand("SS", stack_slot); @@ -559,8 +540,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -575,8 +555,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -590,8 +569,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, p, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -605,8 +583,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, args, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); let iExt8 = &TypeVar::new( @@ -628,8 +605,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -643,8 +619,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -658,8 +633,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -673,8 +647,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -687,8 +660,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, p, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -701,8 +673,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, args, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); let iExt16 = &TypeVar::new( @@ -724,8 +695,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -739,8 +709,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -754,8 +723,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -769,8 +737,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -783,8 +750,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, p, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -797,8 +763,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, args, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); let iExt32 = &TypeVar::new( @@ -820,8 +785,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -835,8 +799,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -850,8 +813,7 @@ pub fn define( ) .operands_in(vec![MemFlags, p, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -865,8 +827,7 @@ pub fn define( ) .operands_in(vec![MemFlags, args, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -879,8 +840,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, p, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -893,8 +853,7 @@ pub fn define( "#, ) .operands_in(vec![MemFlags, x, args, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); let x = &operand_doc("x", Mem, "Value to be stored"); @@ -917,8 +876,7 @@ pub fn define( ) .operands_in(vec![SS, Offset]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); ig.push( @@ -936,8 +894,7 @@ pub fn define( "#, ) .operands_in(vec![x, SS, Offset]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -952,8 +909,7 @@ pub fn define( "#, ) .operands_in(vec![SS, Offset]) - .operands_out(vec![addr]) - .finish(format_registry), + .operands_out(vec![addr]), ); let GV = &operand("GV", global_value); @@ -966,8 +922,7 @@ pub fn define( "#, ) .operands_in(vec![GV]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -978,8 +933,7 @@ pub fn define( "#, ) .operands_in(vec![GV]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let HeapOffset = &TypeVar::new( @@ -1008,8 +962,7 @@ pub fn define( "#, ) .operands_in(vec![H, p, Size]) - .operands_out(vec![addr]) - .finish(format_registry), + .operands_out(vec![addr]), ); let TableOffset = &TypeVar::new( @@ -1039,8 +992,7 @@ pub fn define( "#, ) .operands_in(vec![T, p, Offset]) - .operands_out(vec![addr]) - .finish(format_registry), + .operands_out(vec![addr]), ); let N = &operand("N", imm64); @@ -1057,8 +1009,7 @@ pub fn define( "#, ) .operands_in(vec![N]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let N = &operand("N", ieee32); @@ -1074,8 +1025,7 @@ pub fn define( "#, ) .operands_in(vec![N]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let N = &operand("N", ieee64); @@ -1091,8 +1041,7 @@ pub fn define( "#, ) .operands_in(vec![N]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let N = &operand("N", boolean); @@ -1109,21 +1058,17 @@ pub fn define( "#, ) .operands_in(vec![N]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); - ig.push( - Inst::new( - "nop", - r#" + ig.push(Inst::new( + "nop", + r#" Just a dummy instruction Note: this doesn't compile to a machine code nop "#, - ) - .finish(format_registry), - ); + )); let c = &operand_doc("c", Testable, "Controlling value to test"); let x = &operand_doc("x", Any, "Value to use when `c` is true"); @@ -1141,8 +1086,7 @@ pub fn define( "#, ) .operands_in(vec![c, x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let cc = &operand_doc("cc", intcc, "Controlling condition code"); @@ -1156,8 +1100,7 @@ pub fn define( "#, ) .operands_in(vec![cc, flags, x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", Any); @@ -1177,8 +1120,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1193,8 +1135,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .can_store(true) - .finish(format_registry), + .can_store(true), ); ig.push( @@ -1209,8 +1150,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .can_load(true) - .finish(format_registry), + .can_load(true), ); let src = &operand("src", regunit); @@ -1233,8 +1173,7 @@ pub fn define( "#, ) .operands_in(vec![x, src, dst]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); ig.push( @@ -1250,8 +1189,7 @@ pub fn define( "#, ) .operands_in(vec![src, dst]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); ig.push( @@ -1265,8 +1203,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let delta = &operand("delta", Int); @@ -1281,8 +1218,7 @@ pub fn define( "#, ) .operands_in(vec![delta]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); let Offset = &operand_doc("Offset", imm64, "Offset from current stack pointer"); @@ -1299,8 +1235,7 @@ pub fn define( "#, ) .operands_in(vec![Offset]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); let Offset = &operand_doc("Offset", imm64, "Offset from current stack pointer"); @@ -1318,8 +1253,7 @@ pub fn define( "#, ) .operands_in(vec![Offset]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); let f = &operand("f", iflags); @@ -1335,8 +1269,7 @@ pub fn define( "#, ) .operands_in(vec![addr]) - .operands_out(vec![f]) - .finish(format_registry), + .operands_out(vec![f]), ); ig.push( @@ -1354,8 +1287,7 @@ pub fn define( "#, ) .operands_in(vec![x, src, SS]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); ig.push( @@ -1373,8 +1305,7 @@ pub fn define( "#, ) .operands_in(vec![x, SS, dst]) - .other_side_effects(true) - .finish(format_registry), + .other_side_effects(true), ); let x = &operand_doc("x", TxN, "Vector to split"); @@ -1394,8 +1325,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![lo, hi]) - .is_ghost(true) - .finish(format_registry), + .is_ghost(true), ); let Any128 = &TypeVar::new( @@ -1430,8 +1360,7 @@ pub fn define( ) .operands_in(vec![x, y]) .operands_out(vec![a]) - .is_ghost(true) - .finish(format_registry), + .is_ghost(true), ); let c = &operand_doc("c", &TxN.as_bool(), "Controlling vector"); @@ -1450,8 +1379,7 @@ pub fn define( "#, ) .operands_in(vec![c, x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", &TxN.lane_of()); @@ -1466,8 +1394,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand_doc("x", TxN, "SIMD vector to modify"); @@ -1485,8 +1412,7 @@ pub fn define( "#, ) .operands_in(vec![x, Idx, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", TxN); @@ -1503,8 +1429,7 @@ pub fn define( "#, ) .operands_in(vec![x, Idx]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand("a", &Int.as_bool()); @@ -1537,8 +1462,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand("a", b1); @@ -1559,8 +1483,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let f = &operand("f", iflags); @@ -1578,8 +1501,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![f]) - .finish(format_registry), + .operands_out(vec![f]), ); ig.push( @@ -1593,8 +1515,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![f]) - .finish(format_registry), + .operands_out(vec![f]), ); let a = &operand("a", Int); @@ -1612,8 +1533,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1627,8 +1547,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1645,8 +1564,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1661,8 +1579,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1677,8 +1594,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1692,8 +1608,7 @@ pub fn define( ) .operands_in(vec![x, y]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -1710,8 +1625,7 @@ pub fn define( ) .operands_in(vec![x, y]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -1725,8 +1639,7 @@ pub fn define( ) .operands_in(vec![x, y]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -1740,8 +1653,7 @@ pub fn define( ) .operands_in(vec![x, y]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); let a = &operand("a", iB); @@ -1761,8 +1673,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1776,8 +1687,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1790,8 +1700,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1806,8 +1715,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1820,8 +1728,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1834,8 +1741,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1853,8 +1759,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand("a", iB); @@ -1882,8 +1787,7 @@ pub fn define( "#, ) .operands_in(vec![x, y, c_in]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1904,8 +1808,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a, c_out]) - .finish(format_registry), + .operands_out(vec![a, c_out]), ); ig.push( @@ -1926,8 +1829,7 @@ pub fn define( "#, ) .operands_in(vec![x, y, c_in]) - .operands_out(vec![a, c_out]) - .finish(format_registry), + .operands_out(vec![a, c_out]), ); ig.push( @@ -1947,8 +1849,7 @@ pub fn define( "#, ) .operands_in(vec![x, y, b_in]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -1969,8 +1870,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a, b_out]) - .finish(format_registry), + .operands_out(vec![a, b_out]), ); ig.push( @@ -1991,8 +1891,7 @@ pub fn define( "#, ) .operands_in(vec![x, y, b_in]) - .operands_out(vec![a, b_out]) - .finish(format_registry), + .operands_out(vec![a, b_out]), ); let bits = &TypeVar::new( @@ -2018,8 +1917,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2030,8 +1928,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2042,8 +1939,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2054,8 +1950,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2068,8 +1963,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2082,8 +1976,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2096,8 +1989,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", iB); @@ -2117,8 +2009,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2134,8 +2025,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2151,8 +2041,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand_doc("x", Int, "Scalar or vector value to shift"); @@ -2170,8 +2059,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2184,8 +2072,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2196,8 +2083,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2208,8 +2094,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2229,8 +2114,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2251,8 +2135,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2267,8 +2150,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2281,8 +2163,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2295,8 +2176,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2309,8 +2189,7 @@ pub fn define( "#, ) .operands_in(vec![x, Y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", iB); @@ -2326,8 +2205,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2342,8 +2220,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2358,8 +2235,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2374,8 +2250,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2388,8 +2263,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let Float = &TypeVar::new( @@ -2471,8 +2345,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let f = &operand("f", fflags); @@ -2488,8 +2361,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![f]) - .finish(format_registry), + .operands_out(vec![f]), ); let x = &operand("x", Float); @@ -2505,8 +2377,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2517,8 +2388,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2529,8 +2399,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2545,8 +2414,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2557,8 +2425,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2572,8 +2439,7 @@ pub fn define( "#, ) .operands_in(vec![x, y, z]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc("a", Float, "``x`` with its sign bit inverted"); @@ -2588,8 +2454,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc("a", Float, "``x`` with its sign bit cleared"); @@ -2604,8 +2469,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc( @@ -2625,8 +2489,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc("a", Float, "The smaller of ``x`` and ``y``"); @@ -2641,8 +2504,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc("a", Float, "The larger of ``x`` and ``y``"); @@ -2657,8 +2519,7 @@ pub fn define( "#, ) .operands_in(vec![x, y]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let a = &operand_doc("a", Float, "``x`` rounded to integral value"); @@ -2671,8 +2532,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2683,8 +2543,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2695,8 +2554,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2708,8 +2566,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let Cond = &operand("Cond", intcc); @@ -2727,8 +2584,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let Cond = &operand("Cond", floatcc); @@ -2745,8 +2601,7 @@ pub fn define( "#, ) .operands_in(vec![Cond, f]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", Mem); @@ -2764,8 +2619,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let Bool = &TypeVar::new( @@ -2802,8 +2656,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(Bool.clone(), BoolTo.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(Bool.clone(), BoolTo.clone())]), ); let BoolTo = &TypeVar::new( @@ -2830,8 +2683,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(BoolTo.clone(), Bool.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(BoolTo.clone(), Bool.clone())]), ); let IntTo = &TypeVar::new( @@ -2856,8 +2708,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -2871,8 +2722,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let Int = &TypeVar::new( @@ -2912,8 +2762,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(Int.clone(), IntTo.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(Int.clone(), IntTo.clone())]), ); let IntTo = &TypeVar::new( @@ -2944,8 +2793,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(IntTo.clone(), Int.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(IntTo.clone(), Int.clone())]), ); ig.push( @@ -2965,8 +2813,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(IntTo.clone(), Int.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(IntTo.clone(), Int.clone())]), ); let FloatTo = &TypeVar::new( @@ -2999,8 +2846,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(FloatTo.clone(), Float.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(FloatTo.clone(), Float.clone())]), ); ig.push( @@ -3022,8 +2868,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .constraints(vec![WiderOrEq(Float.clone(), FloatTo.clone())]) - .finish(format_registry), + .constraints(vec![WiderOrEq(Float.clone(), FloatTo.clone())]), ); let x = &operand("x", Float); @@ -3044,8 +2889,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -3058,8 +2902,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -3077,8 +2920,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![a]) - .can_trap(true) - .finish(format_registry), + .can_trap(true), ); ig.push( @@ -3090,8 +2932,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let x = &operand("x", Int); @@ -3110,8 +2951,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); ig.push( @@ -3127,8 +2967,7 @@ pub fn define( "#, ) .operands_in(vec![x]) - .operands_out(vec![a]) - .finish(format_registry), + .operands_out(vec![a]), ); let WideInt = &TypeVar::new( @@ -3158,8 +2997,7 @@ pub fn define( ) .operands_in(vec![x]) .operands_out(vec![lo, hi]) - .is_ghost(true) - .finish(format_registry), + .is_ghost(true), ); let NarrowInt = &TypeVar::new( @@ -3192,9 +3030,8 @@ pub fn define( ) .operands_in(vec![lo, hi]) .operands_out(vec![a]) - .is_ghost(true) - .finish(format_registry), + .is_ghost(true), ); - ig + ig.finish() }