cranelift: Fix implicit pointer argument register use (#5301)
* Fix arg handling to write to VRegs instead of physical regs * Make is_included_in_clobbers required, and handle Args on x64 and riscv64
This commit is contained in:
@@ -1142,6 +1142,7 @@ impl MachInst for Inst {
|
||||
// See the note in [crate::isa::aarch64::abi::is_caller_save_reg] for
|
||||
// more information on this ABI-implementation hack.
|
||||
match self {
|
||||
&Inst::Args { .. } => false,
|
||||
&Inst::Call { ref info } => info.caller_callconv != info.callee_callconv,
|
||||
&Inst::CallInd { ref info } => info.caller_callconv != info.callee_callconv,
|
||||
_ => true,
|
||||
|
||||
@@ -657,7 +657,10 @@ impl MachInst for Inst {
|
||||
}
|
||||
|
||||
fn is_included_in_clobbers(&self) -> bool {
|
||||
true
|
||||
match self {
|
||||
&Inst::Args { .. } => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn is_args(&self) -> bool {
|
||||
|
||||
@@ -1109,6 +1109,7 @@ impl MachInst for Inst {
|
||||
// half-caller-save, half-callee-save SysV ABI for some vector
|
||||
// registers.
|
||||
match self {
|
||||
&Inst::Args { .. } => false,
|
||||
&Inst::Call { ref info, .. } => info.caller_callconv != info.callee_callconv,
|
||||
&Inst::CallInd { ref info, .. } => info.caller_callconv != info.callee_callconv,
|
||||
_ => true,
|
||||
|
||||
@@ -2236,6 +2236,13 @@ impl MachInst for Inst {
|
||||
}
|
||||
}
|
||||
|
||||
fn is_included_in_clobbers(&self) -> bool {
|
||||
match self {
|
||||
&Inst::Args { .. } => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn is_args(&self) -> bool {
|
||||
match self {
|
||||
Self::Args { .. } => true,
|
||||
|
||||
Reference in New Issue
Block a user