summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorKim Nguyen <kim@nguyen.vg>2011-06-21 00:18:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-21 03:06:54 +0200
commit2d16394f972dca8cc5e5b5bf9ab0b343a6239b76 (patch)
treebb156381209270da9fe579429e16215ba83f53c0 /libavcodec
parent093768c9a4855b82c13124f835b655dd70883012 (diff)
ppc32: Fix movrel
Fixes ticket272
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ppc/asm.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S
index e372d53c60..2706d6b1d8 100644
--- a/libavcodec/ppc/asm.S
+++ b/libavcodec/ppc/asm.S
@@ -67,7 +67,11 @@ X(\name):
.macro movrel rd, sym
#if CONFIG_PIC
- lwz \rd, \sym@got(r2)
+ bcl 20, 31, lab_pic_\@
+lab_pic_\@:
+ mflr \rd
+ addis \rd, \rd, (\sym - lab_pic_\@)@ha
+ addi \rd, \rd, (\sym - lab_pic_\@)@l
#else
lis \rd, \sym@ha
la \rd, \sym@l(\rd)