MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / decode_sub

Function decode_sub

crates/virtual-machine/tests/vm_decoder.rs:73–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72#[test]
73fn decode_sub() {
74 let encoded = Sub::new(3, 1, 2).encode();
75 let decoded = decode(encoded).expect("should decode SUB");
76 if let DecodedInsn::Alu { funct7, .. } = decoded {
77 assert_eq!(funct7, 0x20, "SUB funct7 must be 0x20");
78 } else {
79 panic!("expected DecodedInsn::Alu, got {decoded:?}");
80 }
81}
82
83#[test]
84fn decode_mul() {

Callers

nothing calls this directly

Calls 2

decodeFunction · 0.50
encodeMethod · 0.45

Tested by

no test coverage detected