aarch64: suggest a scratch register that's not caller-saved;

If the scratch register is caller-saved, then it might appear in fixed
ranges because of call clobbers. Instead, use a register that's not
caller-saved and has no predefined use in the ABI.
This commit is contained in:
Benjamin Bouvier
2020-05-12 14:22:53 +02:00
parent 962f057c8a
commit 07c55fa50f

View File

@@ -206,7 +206,7 @@ pub fn create_reg_universe(flags: &settings::Flags) -> RealRegUniverse {
allocable_by_class[RegClass::I64.rc_to_usize()] = Some(RegClassInfo {
first: x_reg_base as usize,
last: x_reg_last as usize,
suggested_scratch: Some(XREG_INDICES[13] as usize),
suggested_scratch: Some(XREG_INDICES[19] as usize),
});
allocable_by_class[RegClass::V128.rc_to_usize()] = Some(RegClassInfo {
first: v_reg_base as usize,