File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 3
3
.type _start,@function
4
4
5
5
_start:
6
- // Workaround for missing support of the la pseudo-instruction in Clang 8:
7
- // https://reviews.llvm.org/D55325
8
- lui sp, %hi(_stack_top)
9
- addi sp, sp, %lo(_stack_top)
10
- // see https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#the-gp-global-pointer-register
11
- lui gp, %hi(__global_pointer$)
12
- addi gp, gp, %lo(__global_pointer$)
6
+ // Load the stack pointer.
7
+ la sp, _stack_top
8
+ // Load the globals pointer. The program will load pointers relative to this
9
+ // register, so it must be set to the right value on startup.
10
+ // See: https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#the-gp-global-pointer-register
11
+ la gp, __global_pointer$
13
12
call main
You can’t perform that action at this time.
0 commit comments