Add fixed_nonallocatable constraints when appropriate (#5253)

Plumb the set of allocatable registers through the OperandCollector and use it validate uses of fixed-nonallocatable registers, like %rsp on x86_64.
This commit is contained in:
Trevor Elliott
2022-11-15 12:49:17 -08:00
committed by GitHub
parent f6ae67f3f0
commit a007e02bd2
13 changed files with 133 additions and 66 deletions

View File

@@ -60,15 +60,7 @@ impl S390xBackend {
let emit_info = EmitInfo::new(self.isa_flags.clone());
let sigs = SigSet::new::<abi::S390xMachineDeps>(func, &self.flags)?;
let abi = abi::S390xCallee::new(func, self, &self.isa_flags, &sigs)?;
compile::compile::<S390xBackend>(
func,
self.flags.clone(),
self,
abi,
&self.machine_env,
emit_info,
sigs,
)
compile::compile::<S390xBackend>(func, self, abi, emit_info, sigs)
}
}
@@ -117,6 +109,10 @@ impl TargetIsa for S390xBackend {
&self.flags
}
fn machine_env(&self) -> &MachineEnv {
&self.machine_env
}
fn isa_flags(&self) -> Vec<shared_settings::Value> {
self.isa_flags.iter().collect()
}