minor tweaks
All checks were successful
CI / lint (push) Successful in 16s
CI / fuzz (push) Successful in 2m3s
CI / test (push) Successful in 25s

This commit is contained in:
Kamal Tufekcic 2026-08-03 03:59:53 +03:00
commit 22ab973f0c
13 changed files with 223 additions and 144 deletions

View file

@ -188,9 +188,6 @@ fn xmm(r: Register) -> Option<u8> {
.filter(|i| *i < 16)
}
/// Registers a call clobbers, so a value cannot survive across one and be attributed to the wrong record.
const CLOBBER: [usize; 9] = [0, 1, 2, 6, 7, 8, 9, 10, 11];
/// A field of a particular record: which record, and the displacement within it.
type Slot = (u32, i64);
@ -278,7 +275,10 @@ pub fn vscript_functions(img: &CodeImage) -> Vec<VScriptFunc> {
dec.decode_out(&mut insn);
if insn.flow_control() == FlowControl::Call {
for c in CLOBBER {
// Registers a call clobbers, so a value cannot survive one and be attributed to the wrong
// record. Taken from `abi`, not transcribed as raw GPR indices — a second copy of a fixed
// SysV fact is a copy that can drift.
for c in crate::abi::caller_saved_slots() {
val[c] = V::Unknown;
scaled[c] = false;
recid[c] = None;