machinst ABI: Allow back-end to define stack alignment
The common gen_prologue code currently assumes that the stack pointer has to be aligned to twice the word size. While this is true for many ABIs, it does not hold universally. This patch adds a new callback stack_align that back-ends can provide to define the specific stack alignment required by the ABI on that platform.
This commit is contained in:
@@ -90,6 +90,11 @@ impl ABIMachineSpec for X64ABIMachineSpec {
|
||||
64
|
||||
}
|
||||
|
||||
/// Return required stack alignment in bytes.
|
||||
fn stack_align(_call_conv: isa::CallConv) -> u32 {
|
||||
16
|
||||
}
|
||||
|
||||
fn compute_arg_locs(
|
||||
call_conv: isa::CallConv,
|
||||
params: &[ir::AbiParam],
|
||||
|
||||
Reference in New Issue
Block a user