This commit is contained in:
Jakub Doka 2024-11-17 21:27:30 +01:00
parent bc2dd82eb7
commit 37dd13cab2
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -301,10 +301,10 @@ impl HbvmBackend {
let bundle_count = self.ralloc.bundles.len() + (reg_offset as usize); let bundle_count = self.ralloc.bundles.len() + (reg_offset as usize);
( (
if tail { if tail {
bundle_count.saturating_sub(reg::RET_ADDR as _)
} else {
assert!(bundle_count < reg::STACK_PTR as usize, "TODO: spill memory"); assert!(bundle_count < reg::STACK_PTR as usize, "TODO: spill memory");
self.ralloc.bundles.len() self.ralloc.bundles.len()
} else {
bundle_count.saturating_sub(reg::RET_ADDR as _)
}, },
tail, tail,
) )