MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / generate_rust_macro

Function generate_rust_macro

cranelift/codegen/meta/src/gen_asm.rs:232–247  ·  view source on GitHub ↗

Generate the `isle_assembler_methods!` macro.

(f: &mut Formatter, insts: &[Inst])

Source from the content-addressed store, hash-verified

230
231/// Generate the `isle_assembler_methods!` macro.
232pub fn generate_rust_macro(f: &mut Formatter, insts: &[Inst]) {
233 fmtln!(f, "#[doc(hidden)]");
234 fmtln!(f, "macro_rules! isle_assembler_methods {{");
235 f.indent(|f| {
236 fmtln!(f, "() => {{");
237 f.indent(|f| {
238 for inst in insts {
239 if include_inst(inst) {
240 generate_macro_inst_fn(f, inst);
241 }
242 }
243 });
244 fmtln!(f, "}};");
245 });
246 fmtln!(f, "}}");
247}
248
249/// Returns the type of this operand in ISLE as a part of the ISLE "raw"
250/// constructors. RegMem operand types are width-tagged based on the DSL

Callers 1

Calls 3

include_instFunction · 0.85
generate_macro_inst_fnFunction · 0.85
indentMethod · 0.45

Tested by

no test coverage detected