diff options
author | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-01-13 16:29:53 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-01-13 16:29:53 -0800 |
commit | b71e8ecfda6a75d4bcf240e61dbc3348e76af094 (patch) | |
tree | 7e50ac271e16414388e15e8a55e4312a2fbc008e /pk/pk.S | |
parent | 5cd583648dfcb1e36a0054efc910435293d216e3 (diff) | |
download | pk-b71e8ecfda6a75d4bcf240e61dbc3348e76af094.zip pk-b71e8ecfda6a75d4bcf240e61dbc3348e76af094.tar.gz pk-b71e8ecfda6a75d4bcf240e61dbc3348e76af094.tar.bz2 |
Assume pc-relative addressing
Diffstat (limited to 'pk/pk.S')
-rw-r--r-- | pk/pk.S | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -8,6 +8,7 @@ _start: la sp, stack_top la a0, trap_entry + la gp, _gp csrw evec, a0 li a0, SR_S | SR_PS | SR_EI | SR_S64 @@ -17,12 +18,11 @@ _start: csrw status, a0 and a2, a1, SR_EF - lui a0, %hi(have_fp) - sw a2, %lo(have_fp)(a0) + auipc a0, %pcrel_hi(have_fp) + sw a2, %lo(have_fp)(a0) - and a2, a1, SR_EA - lui a0, %hi(have_accelerator) - sw a2, %lo(have_accelerator)(a0) + and a2, a1, SR_EA + auipc a0, %pcrel_hi(have_accelerator) + sw a2, %lo(have_accelerator)(a0) - lui a0, %hi(boot) - jr a0, %lo(boot) + call boot |