Add a TargetIsa::allocatable_registers() method.
This gives the target ISA a chance to reserve registers like the stack pointer or hard-wired 0 registers like %x0 on RISC-V.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use ir;
|
||||
use isa::RegClass;
|
||||
use regalloc::AllocatableSet;
|
||||
use settings as shared_settings;
|
||||
use super::registers::{GPR, FPR};
|
||||
|
||||
@@ -16,3 +17,8 @@ pub fn legalize_signature(_sig: &mut ir::Signature,
|
||||
pub fn regclass_for_abi_type(ty: ir::Type) -> RegClass {
|
||||
if ty.is_int() { GPR } else { FPR }
|
||||
}
|
||||
|
||||
/// Get the set of allocatable registers for `func`.
|
||||
pub fn allocatable_registers(_func: &ir::Function) -> AllocatableSet {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user