Implement genAsm on aarch64

Add remaining PCS info: param and return registers in procedure calls.
This commit is contained in:
Jakub Konka
2020-10-31 23:52:48 +01:00
parent 5ad501c00b
commit d542e88706
2 changed files with 44 additions and 1 deletions

View File

@@ -59,6 +59,8 @@ pub const callee_preserved_regs = [_]Register{
.x19, .x20, .x21, .x22, .x23,
.x24, .x25, .x26, .x27, .x28,
};
pub const c_abi_int_param_regs = [_]Register{ .x0, .x1, .x2, .x3, .x4, .x5, .x6, .x7 };
pub const c_abi_int_return_regs = [_]Register{ .x0, .x1 };
test "Register.id" {
testing.expectEqual(@as(u5, 0), Register.x0.id());
@@ -215,7 +217,7 @@ pub const Instruction = union(enum) {
// Supervisor Call
fn svc(imm16: u16) Instruction {
pub fn svc(imm16: u16) Instruction {
return supervisorCall(imm16);
}
};