Skip to content

Commit

Permalink
Merge pull request #51 from DieracDelta/patch-1
Browse files Browse the repository at this point in the history
Slight change to riscv crt0 assembly
  • Loading branch information
bradjc authored Aug 12, 2019
2 parents 18dd2be + ca7452d commit dc87cc2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libtock/crt0.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,10 @@ void _start(void* app_start __attribute__((unused)),
"ecall\n" // memop
//
// Setup initial stack pointer for normal execution
"mv sp, s1\n" // sp = stacktop
"mv s0, sp\n" // Set the frame pointer to sp.
//
// Call into the rest of startup. This should never return.
"mv sp, s1\n" // sp = stacktop
"mv a0, s0\n" // first arg is app_start
"mv s0, sp\n" // Set the frame pointer to sp.
"mv a1, s1\n" // second arg is stacktop
"jal _c_start\n"
);
Expand Down

0 comments on commit dc87cc2

Please sign in to comment.