Created
September 25, 2024 10:45
-
-
Save gists-immunefi/764116c3a8e102c04e86b60789fd027b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Returns a list of all registers *read* by instruction `self`. | |
pub(crate) fn use_registers(&self) -> BTreeSet<&VirtualRegister> { | |
use VirtualOp::*; | |
(match self { | |
/* Arithmetic/Logic (ALU) Instructions */ | |
... | |
WQAM(_, r2, r3, r4) => vec![r2, r3, r4], | |
... | |
}) | |
.into_iter() | |
.collect() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment