Skip to content

Commit

Permalink
Merge pull request #555 from Ziemas/crt0
Browse files Browse the repository at this point in the history
Fix crt0 inline asm
  • Loading branch information
rickgaiser authored Mar 12, 2024
2 parents f1d679a + e98275c commit 0101111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ee/startup/src/crt0.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ void __start(struct sargs_start *pargs)
"2: \n"
" \n"
"# Save first argument \n"
"la $2, %0 \n"
"sw $4, ($2) \n"
"sw %1, %0 \n"
" \n"
"# SetupThread \n"
"la $4, _gp \n"
"la $5, _stack \n"
"la $6, _stack_size \n"
"la $7, %1 \n"
"la $7, args \n"
"la $8, ExitThread \n"
"move $gp, $4 \n"
"addiu $3, $0, 60 \n"
Expand All @@ -76,7 +75,8 @@ void __start(struct sargs_start *pargs)
"j %2 \n"
".set at \n"
: /* No outputs. */
: "R"(args_start), "R"(args), "Csy"(_main));
: "m"(args_start), "r"(pargs), "Csy"(_main)
: "1", "2", "3", "4", "5", "6", "7", "8");
}

/*
Expand Down

0 comments on commit 0101111

Please sign in to comment.