Commit 25ca74d3 authored by Pavel Koshevoy's avatar Pavel Koshevoy Committed by Michael Niedermayer

Restore compatibility with powerpc-apple-darwin9-gcc-4.2.1

... and attempt to preserve compatibility with clang that was
introduced in 311a953c (untested)
Reviewed-by: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 77726d32
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
#define JOIN(a, b) GLUE(a, b) #define JOIN(a, b) GLUE(a, b)
#define X(s) JOIN(EXTERN_ASM, s) #define X(s) JOIN(EXTERN_ASM, s)
#if __APPLE__
#define R(n) r ## n
#else
#define R(n) n
#endif
#if ARCH_PPC64 #if ARCH_PPC64
#define PTR .quad #define PTR .quad
...@@ -53,7 +59,7 @@ L(\name): ...@@ -53,7 +59,7 @@ L(\name):
.endm .endm
.macro movrel rd, sym, gp .macro movrel rd, sym, gp
ld \rd, \sym@got(2) ld \rd, \sym@got(R(2))
.endm .endm
.macro get_got rd .macro get_got rd
......
...@@ -354,14 +354,18 @@ fft_data: ...@@ -354,14 +354,18 @@ fft_data:
.macro fft_calc interleave .macro fft_calc interleave
extfunc ff_fft_calc\interleave\()_altivec extfunc ff_fft_calc\interleave\()_altivec
mflr r0 mflr r0
stp r0, 2*PS(1) stp r0, 2*PS(R(1))
stpu r1, -(160+16*PS)(1) stpu r1, -(160+16*PS)(R(1))
get_got r11 get_got r11
addi r6, r1, 16*PS addi r6, r1, 16*PS
stvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 stvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29
mfvrsave r0 mfvrsave r0
stw r0, 15*PS(1) stw r0, 15*PS(R(1))
li r6, -4 #0xfffffffc #if __APPLE__
li r6, 0xfffffffc
#else
li r6, -4
#endif
mtvrsave r6 mtvrsave r6
movrel r6, fft_data, r11 movrel r6, fft_data, r11
...@@ -372,7 +376,7 @@ extfunc ff_fft_calc\interleave\()_altivec ...@@ -372,7 +376,7 @@ extfunc ff_fft_calc\interleave\()_altivec
movrel r12, X(ff_cos_tabs), r11 movrel r12, X(ff_cos_tabs), r11
movrel r6, fft_dispatch_tab\interleave\()_altivec, r11 movrel r6, fft_dispatch_tab\interleave\()_altivec, r11
lwz r3, 0(3) lwz r3, 0(R(3))
subi r3, r3, 2 subi r3, r3, 2
slwi r3, r3, 2+ARCH_PPC64 slwi r3, r3, 2+ARCH_PPC64
lpx r3, r3, r6 lpx r3, r3, r6
...@@ -382,10 +386,10 @@ extfunc ff_fft_calc\interleave\()_altivec ...@@ -382,10 +386,10 @@ extfunc ff_fft_calc\interleave\()_altivec
addi r6, r1, 16*PS addi r6, r1, 16*PS
lvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29 lvm r6, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29
lwz r6, 15*PS(1) lwz r6, 15*PS(R(1))
mtvrsave r6 mtvrsave r6
lp r1, 0(1) lp r1, 0(R(1))
lp r0, 2*PS(1) lp r0, 2*PS(R(1))
mtlr r0 mtlr r0
blr blr
.endm .endm
...@@ -393,15 +397,15 @@ extfunc ff_fft_calc\interleave\()_altivec ...@@ -393,15 +397,15 @@ extfunc ff_fft_calc\interleave\()_altivec
.macro DECL_FFT suffix, bits, n, n2, n4 .macro DECL_FFT suffix, bits, n, n2, n4
fft\n\suffix\()_altivec: fft\n\suffix\()_altivec:
mflr r0 mflr r0
stp r0,PS*(\bits-3)(1) stp r0,PS*(\bits-3)(R(1))
bl fft\n2\()_altivec bl fft\n2\()_altivec
addi2 r3,\n*4 addi2 r3,\n*4
bl fft\n4\()_altivec bl fft\n4\()_altivec
addi2 r3,\n*2 addi2 r3,\n*2
bl fft\n4\()_altivec bl fft\n4\()_altivec
addi2 r3,\n*-6 addi2 r3,\n*-6
lp r0,PS*(\bits-3)(1) lp r0,PS*(\bits-3)(R(1))
lp r4,\bits*PS(12) lp r4,\bits*PS(R(12))
mtlr r0 mtlr r0
li r5,\n/16 li r5,\n/16
b fft_pass\suffix\()_altivec b fft_pass\suffix\()_altivec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment