Add fixed-non-allocatable operand support (#77)
This allows a non-allocatable `PReg` to be passed on directly to the allocations vector without any liverange tracking from the register allocator. The main intended use case is to support ISA-specific special registers such as a fixed zero register.
This commit is contained in:
@@ -460,19 +460,21 @@ impl CheckerState {
|
||||
return Err(CheckerError::MissingAllocation { inst, op });
|
||||
}
|
||||
|
||||
match val {
|
||||
CheckerValue::Universe => {
|
||||
return Err(CheckerError::UnknownValueInAllocation { inst, op, alloc });
|
||||
if op.as_fixed_nonallocatable().is_none() {
|
||||
match val {
|
||||
CheckerValue::Universe => {
|
||||
return Err(CheckerError::UnknownValueInAllocation { inst, op, alloc });
|
||||
}
|
||||
CheckerValue::VRegs(vregs) if !vregs.contains(&op.vreg()) => {
|
||||
return Err(CheckerError::IncorrectValuesInAllocation {
|
||||
inst,
|
||||
op,
|
||||
alloc,
|
||||
actual: vregs.clone(),
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
CheckerValue::VRegs(vregs) if !vregs.contains(&op.vreg()) => {
|
||||
return Err(CheckerError::IncorrectValuesInAllocation {
|
||||
inst,
|
||||
op,
|
||||
alloc,
|
||||
actual: vregs.clone(),
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
self.check_constraint(inst, op, alloc, allocs, checker)?;
|
||||
|
||||
Reference in New Issue
Block a user