authorgravatar for joachim.schmidt557@outlook.comJoachim Schmidt <joachim.schmidt557@outlook.com> 2021-02-08 22:29:41+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-02-09 23:57:43+01:00
logc2beaba85a87b5985fe9f1676ad2bc4888dd6c1a
tree690fb4576cf0eb250de74eec9fc328e59822731d
parent221f1d898c39e9ea25f1d7fc9642bfbb3c97e894

stage2 ARM: fix callee_preserved_regs

Previously, the registers included r0, r1, r2, r3 which are not included in the callee saved registers according to the Procedure Call Standard for the ARM Architecture.

1 files changed, 1 insertions(+), 1 deletions(-)

src/codegen/arm.zig+1-1
......@@ -186,7 +186,7 @@ pub const Psr = enum {
186186 spsr,
187187};
188188
189pub const callee_preserved_regs = [_]Register{ .r0, .r1, .r2, .r3, .r4, .r5, .r6, .r7, .r8, .r10 };
189pub const callee_preserved_regs = [_]Register{ .r4, .r5, .r6, .r7, .r8, .r10 };
190190pub const c_abi_int_param_regs = [_]Register{ .r0, .r1, .r2, .r3 };
191191pub const c_abi_int_return_regs = [_]Register{ .r0, .r1 };
192192