Baldrdash: callee-saved are only JIT callee-saved, not "JIT or natives".
And don't mark SP as callee-preserved (it's implicitly preserved);
This commit is contained in:
@@ -58,7 +58,7 @@ static BALDRDASH_JIT_CALLEE_SAVED_GPR: &[bool] = &[
|
|||||||
/* 24 = */ false, false, false, false,
|
/* 24 = */ false, false, false, false,
|
||||||
// There should be 28, the pseudo stack pointer in this list, however the wasm stubs trash it
|
// There should be 28, the pseudo stack pointer in this list, however the wasm stubs trash it
|
||||||
// gladly right now.
|
// gladly right now.
|
||||||
/* 28 = */ false, false, true /* x30 = FP */, true /* x31 = SP */
|
/* 28 = */ false, false, true /* x30 = FP */, false /* x31 = SP */
|
||||||
];
|
];
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
@@ -314,17 +314,11 @@ fn is_callee_save(call_conv: isa::CallConv, r: RealReg) -> bool {
|
|||||||
match r.get_class() {
|
match r.get_class() {
|
||||||
RegClass::I64 => {
|
RegClass::I64 => {
|
||||||
let enc = r.get_hw_encoding();
|
let enc = r.get_hw_encoding();
|
||||||
if BALDRDASH_JIT_CALLEE_SAVED_GPR[enc] {
|
return BALDRDASH_JIT_CALLEE_SAVED_GPR[enc];
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// Otherwise, fall through to preserve native ABI registers.
|
|
||||||
}
|
}
|
||||||
RegClass::V128 => {
|
RegClass::V128 => {
|
||||||
let enc = r.get_hw_encoding();
|
let enc = r.get_hw_encoding();
|
||||||
if BALDRDASH_JIT_CALLEE_SAVED_FPU[enc] {
|
return BALDRDASH_JIT_CALLEE_SAVED_FPU[enc];
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// Otherwise, fall through to preserve native ABI registers.
|
|
||||||
}
|
}
|
||||||
_ => unimplemented!("baldrdash callee saved on non-i64 reg classes"),
|
_ => unimplemented!("baldrdash callee saved on non-i64 reg classes"),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user