powerpc/booke64: Align initial stack setting to match that of aim64's
Clang9/LLD9 appears to get quite confused with the instruction stream used to obtain the tmpstack pointer, almost as though it thinks this is a C function, so tries to optimize it. Since the AIM64 method doesn't use the TOC to obtain the tmpstack, just follow that model, and lld won't get confused. Reported by: bdragon MFC after: 2 weeks
This commit is contained in:
parent
4f0796edf8
commit
69cea06f34
@ -298,16 +298,18 @@ done_mapping:
|
||||
ld %r1,0(%r2)
|
||||
add %r2,%r1,%r2
|
||||
mtspr SPR_SPRG8, %r2
|
||||
nop
|
||||
|
||||
/* Get load offset */
|
||||
ld %r31,-0x8000(%r2) /* First TOC entry is TOC base */
|
||||
subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */
|
||||
|
||||
/* Set up the stack pointer */
|
||||
addis %r1,%r2,TOC_REF(tmpstack)@ha
|
||||
ld %r1,TOC_REF(tmpstack)@l(%r1)
|
||||
addi %r1,%r1,TMPSTACKSZ-96
|
||||
add %r1,%r1,%r31
|
||||
bl 1f
|
||||
.llong tmpstack + TMPSTACKSZ - 96 - .
|
||||
1: mflr %r3
|
||||
ld %r1,0(%r3)
|
||||
add %r1,%r1,%r3
|
||||
bl 1f
|
||||
.llong _DYNAMIC-.
|
||||
1: mflr %r3
|
||||
|
Loading…
Reference in New Issue
Block a user