powerpc: create 32 bit LOADADDR macro
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2005 07:44:55 +0000 (17:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2005 23:49:51 +0000 (09:49 +1000)
and use it in misc_32.S

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/kernel/misc_32.S
include/asm-powerpc/ppc_asm.h

index fa8c20ffec78b4dc29e43f87b7de574e450072aa..27274108116f670acdcbda37ce5c6683ae630d1a 100644 (file)
@@ -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
@@ -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
index e4350e406d2a14b524b57ae2b29b286f386e815e..6aae414a161b085f18cc9340e948a51479dc3745 100644 (file)
@@ -193,6 +193,10 @@ n:
 #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