From 71adf9cec30480cd79a6470f9ae8a90adaaa9096 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 24 Feb 2025 00:38:25 +0200 Subject: [PATCH] add some more termination sequences --- crates/vestal/src/call_sites.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/vestal/src/call_sites.rs b/crates/vestal/src/call_sites.rs index 1f1e2cc..89fc9a6 100644 --- a/crates/vestal/src/call_sites.rs +++ b/crates/vestal/src/call_sites.rs @@ -31,7 +31,13 @@ impl Module { //println!("{:15} {} {instruction} {}", self.name, fmt_num(address as usize), fmt_bytes(opcodes)); // Ascend on RET if let Some(depth) = recurse { - if depth > 0 && opcodes == &[0xc3] { + if depth > 0 && opcodes[0] == 0xc3 { + break + } + if depth > 0 && opcodes == &[0x66, 0x90] { + break + } + if depth > 0 && opcodes == &[0x90] { break } }