powerpc: create 32 bit LOADADDR macro
and use it in misc_32.S Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
This commit is contained in:
parent
4920960f57
commit
7062018687
@ -43,8 +43,7 @@ _GLOBAL(reloc_offset)
|
|||||||
mflr r0
|
mflr r0
|
||||||
bl 1f
|
bl 1f
|
||||||
1: mflr r3
|
1: mflr r3
|
||||||
lis r4,1b@ha
|
LOADADDR(r4,1b)
|
||||||
addi r4,r4,1b@l
|
|
||||||
subf r3,r4,r3
|
subf r3,r4,r3
|
||||||
mtlr r0
|
mtlr r0
|
||||||
blr
|
blr
|
||||||
@ -56,8 +55,7 @@ _GLOBAL(add_reloc_offset)
|
|||||||
mflr r0
|
mflr r0
|
||||||
bl 1f
|
bl 1f
|
||||||
1: mflr r5
|
1: mflr r5
|
||||||
lis r4,1b@ha
|
LOADADDR(r4,1b)
|
||||||
addi r4,r4,1b@l
|
|
||||||
subf r5,r4,r5
|
subf r5,r4,r5
|
||||||
add r3,r3,r5
|
add r3,r3,r5
|
||||||
mtlr r0
|
mtlr r0
|
||||||
|
@ -193,6 +193,10 @@ n:
|
|||||||
#define CMPI cmpdi
|
#define CMPI cmpdi
|
||||||
|
|
||||||
#else /* 32-bit */
|
#else /* 32-bit */
|
||||||
|
#define LOADADDR(rn,name) \
|
||||||
|
lis rn,name@ha \
|
||||||
|
addi rn,rn,name@l
|
||||||
|
|
||||||
#define LOADBASE(rn,name) \
|
#define LOADBASE(rn,name) \
|
||||||
lis rn,name@ha
|
lis rn,name@ha
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user