147 lines · 2.7 KB · Assembly
RawDownload
/* * Copyright (c) 2009 Loren Merritt * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "config.h" #define GLUE(a, b) a ## b#define JOIN(a, b) GLUE(a, b)#define X(s) JOIN(EXTERN_ASM, s) #if __APPLE__#define R(n) r ## n#else#define R(n) n#endif #if ARCH_PPC64 #define PTR  .quad#define lp   ld#define lpx  ldx#define stp  std#define stpu stdu#define PS   8#define L(s) JOIN(., s) .macro extfunc name    .global X(\name)#if _CALL_ELF == 2    .textX(\name):    addis %r2, %r12, .TOC.-X(\name)@ha    addi %r2, %r2, .TOC.-X(\name)@l    .localentry X(\name), .-X(\name)#else    .section .opd, "aw"X(\name):    .quad L(\name), .TOC.@tocbase, 0    .previous    .type X(\name), STT_FUNCL(\name):#endif.endm .macro movrel rd, sym, gp    ld      \rd, \sym@got(R(2)).endm .macro get_got rd.endm #else /* ARCH_PPC64 */ #define PTR  .int#define lp   lwz#define lpx  lwzx#define stp  stw#define stpu stwu#define PS   4#define L(s) s .macro extfunc name    .global X(\name)    .type   X(\name), STT_FUNCX(\name):\name:.endm .macro movrel rd, sym, gp#if CONFIG_PIC    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 .macro DEFINE_REG n    .equiv r\n, \n    .equiv f\n, \n    .equiv v\n, \n.endm DEFINE_REG 0DEFINE_REG 1DEFINE_REG 2DEFINE_REG 3DEFINE_REG 4DEFINE_REG 5DEFINE_REG 6DEFINE_REG 7DEFINE_REG 8DEFINE_REG 9DEFINE_REG 10DEFINE_REG 11DEFINE_REG 12DEFINE_REG 13DEFINE_REG 14DEFINE_REG 15DEFINE_REG 16DEFINE_REG 17DEFINE_REG 18DEFINE_REG 19DEFINE_REG 20DEFINE_REG 21DEFINE_REG 22DEFINE_REG 23DEFINE_REG 24DEFINE_REG 25DEFINE_REG 26DEFINE_REG 27DEFINE_REG 28DEFINE_REG 29DEFINE_REG 30DEFINE_REG 31 #endif /* HAVE_IBM_ASM */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t