Sean McGovern <[email protected]> writes: > On Saturday, September 24, 2011, Måns Rullgård <[email protected]> wrote: >> Mans Rullgard <[email protected]> writes: >> >>> On 32-bit ppc, the GOT pointer must be loaded manually. >>> This adds a "get_got" assembler macro to compute the >>> GOT address. The "movrel" macro is updated to take an >>> additional parameter containing the GOT address since >>> no registers is reserved for this purpose on ppc32. >>> These changes have no effect on ppc64 builds. >>> >>> Signed-off-by: Mans Rullgard <[email protected]> >>> --- >>> libavcodec/ppc/asm.S | 17 ++++++++++++++--- >>> libavcodec/ppc/fft_altivec_s.S | 7 ++++--- >>> 2 files changed, 18 insertions(+), 6 deletions(-) >>> >>> +.macro get_got rd >>> + bcl 20, 31, .Lgot\@ >>> +.Lgot\@: >>> + mflr \rd >>> + addis \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@ha >>> + addi \rd, \rd, _GLOBAL_OFFSET_TABLE_ - .Lgot\@@l >>> +.endm >> >> Come to think of it, this should probably be made conditional on PIC. >> Simply making the macro a no-op in non-PIC mode will of course work, >> since the only uses of the value it computes use the same condition. >> It is, however, slightly fragile, should someone need the GOT value for >> something else at some point. >> >> Opinions? > > I guess the non-PIC ppc32 ABI doesn't have anything to say about this?
If the value is never used, there is no need to compute it. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
