riscv: improve startup assembly

Now that we've switched to LLVM 9, we don't need a workaround anymore
for the 'la' pseudo-instruction.
Этот коммит содержится в:
Ayke van Laethem 2019-12-23 21:48:54 +01:00 коммит произвёл Ron Evans
родитель 699312f477
коммит 08f01ba3ff

Просмотреть файл

@ -3,11 +3,10 @@
.type _start,@function .type _start,@function
_start: _start:
// Workaround for missing support of the la pseudo-instruction in Clang 8: // Load the stack pointer.
// https://reviews.llvm.org/D55325 la sp, _stack_top
lui sp, %hi(_stack_top) // Load the globals pointer. The program will load pointers relative to this
addi sp, sp, %lo(_stack_top) // register, so it must be set to the right value on startup.
// see https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#the-gp-global-pointer-register // See: https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#the-gp-global-pointer-register
lui gp, %hi(__global_pointer$) la gp, __global_pointer$
addi gp, gp, %lo(__global_pointer$)
call main call main