aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc/asm.S
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-25 23:30:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-25 23:30:25 +0200
commit537a9e5cc28fe55deedc30953737cff124ac570f (patch)
tree3ebcc12011b67905d09f439dc85421cb1834927c /libavcodec/ppc/asm.S
parent508e47a5751b063e5b3d1d6aceda8a19ad8b1d37 (diff)
parentd853e571ad5e7e12c6a68cfde390daced7d85fbb (diff)
downloadffmpeg-537a9e5cc28fe55deedc30953737cff124ac570f.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: ppc: fix some pointer to integer casts ppc: fix 32-bit PIC build vmdaudio: fix decoding of 16-bit audio format. lavf: do not set codec_tag for rawvideo h264: check for out of bounds reads in ff_h264_decode_extradata(). flvdec: Check for overflow before allocating arrays avconv: use correct output stream index when checking max_frames avconv: remove fake coded_frame on streamcopy hack Conflicts: avconv.c libavcodec/h264.c libavcodec/ppc/asm.S libavcodec/vmdav.c libavformat/flvdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ppc/asm.S')
-rw-r--r--libavcodec/ppc/asm.S23
1 files changed, 16 insertions, 7 deletions
diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S
index 2706d6b1d8..bbbf8a4a66 100644
--- a/libavcodec/ppc/asm.S
+++ b/libavcodec/ppc/asm.S
@@ -44,10 +44,13 @@ X(\name):
L(\name):
.endm
-.macro movrel rd, sym
+.macro movrel rd, sym, gp
ld \rd, \sym@got(r2)
.endm
+.macro get_got rd
+.endm
+
#else /* ARCH_PPC64 */
#define PTR .int
@@ -65,19 +68,25 @@ X(\name):
\name:
.endm
-.macro movrel rd, sym
+.macro movrel rd, sym, gp
#if CONFIG_PIC
- bcl 20, 31, lab_pic_\@
-lab_pic_\@:
- mflr \rd
- addis \rd, \rd, (\sym - lab_pic_\@)@ha
- addi \rd, \rd, (\sym - lab_pic_\@)@l
+ lwz \rd, \sym@got(\gp)
#else
lis \rd, \sym@ha
la \rd, \sym@l(\rd)
#endif
.endm
+.macro get_got rd
+#if CONFIG_PIC
+ bcl 20, 31, .Lgot\@
+.Lgot\@:
+ mflr \rd
+ addis \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@ha
+ addi \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@l
+#endif
+.endm
+
#endif /* ARCH_PPC64 */
#if HAVE_IBM_ASM