Skip to content

Commit

Permalink
powerpc: create 32 bit LOADADDR macro
Browse files Browse the repository at this point in the history
and use it in misc_32.S

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
Stephen Rothwell committed Oct 12, 2005
1 parent 4920960 commit 7062018
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ _GLOBAL(reloc_offset)
mflr r0
bl 1f
1: mflr r3
lis r4,1b@ha
addi r4,r4,1b@l
LOADADDR(r4,1b)
subf r3,r4,r3
mtlr r0
blr
Expand All @@ -56,8 +55,7 @@ _GLOBAL(add_reloc_offset)
mflr r0
bl 1f
1: mflr r5
lis r4,1b@ha
addi r4,r4,1b@l
LOADADDR(r4,1b)
subf r5,r4,r5
add r3,r3,r5
mtlr r0
Expand Down
4 changes: 4 additions & 0 deletions include/asm-powerpc/ppc_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ GLUE(.,name):
#define CMPI cmpdi

#else /* 32-bit */
#define LOADADDR(rn,name) \
lis rn,name@ha \
addi rn,rn,name@l

#define LOADBASE(rn,name) \
lis rn,name@ha

Expand Down

0 comments on commit 7062018

Please sign in to comment.