Skip to main content

gen_imm_inst_builder

Function gen_imm_inst_builder 

Source
fn gen_imm_inst_builder(inst: &Rc<InstructionContent>, fmt: &mut Formatter)
Expand description

Emit an additional {name}_imm convenience method for inst, requested via .inst_builder_imm_method(true).

The generated method has the same shape as inst’s normal builder method, except that its trailing value operand is taken as an Into<Imm64> immediate. That immediate is materialized as an iconst (sign- or zero-extended to the controlling type as needed, see InstBuilder::build_imm_const) and then inst is built with it.