MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / int_bin_op_32

Function int_bin_op_32

crates/parser/src/optimize.rs:590–605  ·  view source on GitHub ↗
(instr: Instruction)

Source from the content-addressed store, hash-verified

588}
589
590fn int_bin_op_32(instr: Instruction) -> Option<BinOp> {
591 Some(match instr {
592 Instruction::I32Add => BinOp::IAdd,
593 Instruction::I32Sub => BinOp::ISub,
594 Instruction::I32Mul => BinOp::IMul,
595 Instruction::I32And => BinOp::IAnd,
596 Instruction::I32Or => BinOp::IOr,
597 Instruction::I32Xor => BinOp::IXor,
598 Instruction::I32Shl => BinOp::IShl,
599 Instruction::I32ShrS => BinOp::IShrS,
600 Instruction::I32ShrU => BinOp::IShrU,
601 Instruction::I32Rotl => BinOp::IRotl,
602 Instruction::I32Rotr => BinOp::IRotr,
603 _ => return None,
604 })
605}
606
607fn int_bin_op_64(instr: Instruction) -> Option<BinOp> {
608 Some(match instr {

Callers 3

rewriteFunction · 0.85
scalar_bin_op_32Function · 0.85
scalar_const_32Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected