Skip to content

Commit 3bf742d

Browse files
committed
aarch64: Fix register order for thread arguments
1 parent 5d64ecf commit 3bf742d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cpu/aarch64/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ cpu_stack_init(uint64_t *stack, void *entry,
3636
stack[32] = 0x60000344;
3737
stack[0] = (intptr_t)thread_exit;
3838

39-
// x0 at [30], x1 at [31], x2 at [29], x3 at [28], ...
40-
static const int arg_idx[] = { 30, 31, 29, 28 };
39+
// x0 at [30], x1 at [31], x2 at [28], x3 at [29], ...
40+
static const uint8_t arg_idx[] = { 30, 31, 28, 29 };
4141
for(int i = 0; i < nargs; i++)
4242
stack[arg_idx[i]] = va_arg(ap, uintptr_t);
4343
return stack;

0 commit comments

Comments
 (0)