Add support for fixed stack slots
This works by allowing a PReg to be marked as being a stack location instead of a physical register.
This commit is contained in:
@@ -102,6 +102,7 @@ impl<'a, F: Function> Env<'a, F> {
|
||||
PRegData {
|
||||
reg: PReg::invalid(),
|
||||
allocations: LiveRangeSet::new(),
|
||||
is_stack: false,
|
||||
},
|
||||
);
|
||||
for i in 0..=PReg::MAX {
|
||||
@@ -110,6 +111,9 @@ impl<'a, F: Function> Env<'a, F> {
|
||||
let preg_float = PReg::new(i, RegClass::Float);
|
||||
self.pregs[preg_float.index()].reg = preg_float;
|
||||
}
|
||||
for &preg in &self.env.fixed_stack_slots {
|
||||
self.pregs[preg.index()].is_stack = true;
|
||||
}
|
||||
// Create VRegs from the vreg count.
|
||||
for idx in 0..self.func.num_vregs() {
|
||||
// We'll fill in the real details when we see the def.
|
||||
|
||||
Reference in New Issue
Block a user