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

Function inst_store_data

cranelift/codegen/src/inst_predicates.rs:139–146  ·  view source on GitHub ↗

Get the store data, if any, from an instruction.

(func: &Function, inst: Inst)

Source from the content-addressed store, hash-verified

137
138/// Get the store data, if any, from an instruction.
139pub fn inst_store_data(func: &Function, inst: Inst) -> Option<Value> {
140 match &func.dfg.insts[inst] {
141 InstructionData::Store { args, .. } | InstructionData::StoreNoOffset { args, .. } => {
142 Some(args[0])
143 }
144 _ => None,
145 }
146}
147
148/// Determine whether this opcode behaves as a memory fence, i.e.,
149/// prohibits any moving of memory accesses across it.

Callers 1

process_instMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected