Skip to content

Commit e459e06

Browse files
committed
use continue instead
1 parent 4355ea8 commit e459e06

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

cranelift/codegen/src/machinst/vcode.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,18 +1274,21 @@ impl<I: VCodeInst> VCode<I> {
12741274
let loc = if let Some(preg) = alloc.as_reg() {
12751275
LabelValueLoc::Reg(Reg::from(preg))
12761276
} else {
1277-
let slot = alloc.as_stack().unwrap();
1278-
let slot_offset = self.abi.get_spillslot_offset(slot);
1279-
let slot_base_to_caller_sp_offset = self.abi.slot_base_to_caller_sp_offset();
12801277
#[cfg(not(feature = "unwind"))]
1281-
let caller_sp_to_cfa_offset = 0;
1278+
continue;
1279+
12821280
#[cfg(feature = "unwind")]
1283-
let caller_sp_to_cfa_offset =
1284-
crate::isa::unwind::systemv::caller_sp_to_cfa_offset();
1285-
// NOTE: this is a negative offset because it's relative to the caller's SP
1286-
let cfa_to_sp_offset =
1287-
-((slot_base_to_caller_sp_offset + caller_sp_to_cfa_offset) as i64);
1288-
LabelValueLoc::CFAOffset(cfa_to_sp_offset + slot_offset)
1281+
{
1282+
let slot = alloc.as_stack().unwrap();
1283+
let slot_offset = self.abi.get_spillslot_offset(slot);
1284+
let slot_base_to_caller_sp_offset = self.abi.slot_base_to_caller_sp_offset();
1285+
let caller_sp_to_cfa_offset =
1286+
crate::isa::unwind::systemv::caller_sp_to_cfa_offset();
1287+
// NOTE: this is a negative offset because it's relative to the caller's SP
1288+
let cfa_to_sp_offset =
1289+
-((slot_base_to_caller_sp_offset + caller_sp_to_cfa_offset) as i64);
1290+
LabelValueLoc::CFAOffset(cfa_to_sp_offset + slot_offset)
1291+
}
12891292
};
12901293

12911294
// Coalesce adjacent ranges that for the same location

0 commit comments

Comments
 (0)