mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Fix compilation of locore.S with clang
The branch from _start to mpentry has to cross a large section of data; an offset larger than can be specified with a 12-bit branch immediate. Fix this by converting the branch to an unconditional jump. The gcc assembler does this conversion silently but it is not done automatically by clang. Reported by: Jeremy Bennett <jeremy.bennett@embecosm.com> Reviewed by: markj Approved by: markj (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21437
This commit is contained in:
parent
5b4f0f860e
commit
c7ac71f2ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352036
@ -69,12 +69,18 @@ _start:
|
||||
la t0, hart_lottery
|
||||
li t1, 1
|
||||
amoadd.w t0, t1, 0(t0)
|
||||
bnez t0, mpentry
|
||||
|
||||
/*
|
||||
* We must jump to mpentry in the non-BSP case because the offset is
|
||||
* too large to fit in a 12-bit branch immediate.
|
||||
*/
|
||||
beqz t0, 1f
|
||||
j mpentry
|
||||
|
||||
/*
|
||||
* Page tables
|
||||
*/
|
||||
|
||||
1:
|
||||
/* Add L1 entry for kernel */
|
||||
la s1, pagetable_l1
|
||||
la s2, pagetable_l2 /* Link to next level PN */
|
||||
|
Loading…
Reference in New Issue
Block a user