Adjust prologue/epilogue generation to work with 32-bit Intel arch.
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
e6481bb4eb
commit
daa7a21d05
@@ -15,9 +15,6 @@ static ARG_GPRS: [RU; 6] = [RU::rdi, RU::rsi, RU::rdx, RU::rcx, RU::r8, RU::r9];
|
||||
/// Return value registers.
|
||||
static RET_GPRS: [RU; 3] = [RU::rax, RU::rdx, RU::rcx];
|
||||
|
||||
/// Callee-saved registers
|
||||
pub static CSR_GPRS: [RU; 5] = [RU::rbx, RU::r12, RU::r13, RU::r14, RU::r15];
|
||||
|
||||
struct Args {
|
||||
pointer_bytes: u32,
|
||||
pointer_bits: u16,
|
||||
@@ -156,3 +153,11 @@ pub fn allocatable_registers(
|
||||
|
||||
regs
|
||||
}
|
||||
|
||||
pub fn callee_saved_registers(flags: &shared_settings::Flags) -> Vec<RU> {
|
||||
if flags.is_64bit() {
|
||||
return vec![RU::rbx, RU::r12, RU::r13, RU::r14, RU::r15];
|
||||
} else {
|
||||
return vec![RU::rbx, RU::rsi, RU::rdi];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user