Skip to content

Commit 239181b

Browse files
committed
Add support for stack-only constraints in fastalloc
1 parent 9e55e26 commit 239181b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/fastalloc/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,7 @@ impl<'a, F: Function> Env<'a, F> {
508508
unreachable!()
509509
}
510510

511-
OperandConstraint::Stack => {
512-
panic!("Stack constraints not supported in fastalloc");
513-
}
511+
OperandConstraint::Stack => self.edits.is_stack(alloc),
514512
}
515513
}
516514

@@ -668,9 +666,7 @@ impl<'a, F: Function> Env<'a, F> {
668666
unreachable!();
669667
}
670668

671-
OperandConstraint::Stack => {
672-
panic!("Stack operand constraints not supported in fastalloc");
673-
}
669+
OperandConstraint::Stack => Allocation::stack(self.get_spillslot(op.vreg())),
674670
};
675671
self.allocs[(inst.index(), op_idx)] = new_alloc;
676672
Ok(new_alloc)

0 commit comments

Comments
 (0)