nengel@2: /* nengel@2: * Copyright (c) 2008 Mans Rullgard nengel@2: * nengel@2: * This file is part of FFmpeg. nengel@2: * nengel@2: * FFmpeg is free software; you can redistribute it and/or nengel@2: * modify it under the terms of the GNU Lesser General Public nengel@2: * License as published by the Free Software Foundation; either nengel@2: * version 2.1 of the License, or (at your option) any later version. nengel@2: * nengel@2: * FFmpeg is distributed in the hope that it will be useful, nengel@2: * but WITHOUT ANY WARRANTY; without even the implied warranty of nengel@2: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU nengel@2: * Lesser General Public License for more details. nengel@2: * nengel@2: * You should have received a copy of the GNU Lesser General Public nengel@2: * License along with FFmpeg; if not, write to the Free Software nengel@2: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA nengel@2: */ nengel@2: nengel@2: #include "config.h" nengel@2: nengel@2: #ifdef __ELF__ nengel@2: # define ELF nengel@2: #else nengel@2: # define ELF @ nengel@2: #endif nengel@2: nengel@2: .macro require8, val=1 nengel@2: ELF .eabi_attribute 24, \val nengel@2: .endm nengel@2: nengel@2: .macro preserve8, val=1 nengel@2: ELF .eabi_attribute 25, \val nengel@2: .endm nengel@2: nengel@2: .macro function name, export=0 nengel@2: .macro endfunc nengel@2: ELF .size \name, . - \name nengel@2: .endfunc nengel@2: .purgem endfunc nengel@2: .endm nengel@2: .if \export nengel@2: .global EXTERN_ASM\name nengel@2: EXTERN_ASM\name: nengel@2: .endif nengel@2: ELF .type \name, %function nengel@2: .func \name nengel@2: \name: nengel@2: .endm nengel@2: nengel@2: .macro movrel rd, val nengel@2: #if HAVE_ARMV6T2 && !CONFIG_PIC nengel@2: movw \rd, #:lower16:\val nengel@2: movt \rd, #:upper16:\val nengel@2: #else nengel@2: ldr \rd, =\val nengel@2: #endif nengel@2: .endm nengel@2: nengel@2: #if HAVE_VFP_ARGS nengel@2: .eabi_attribute 28, 1 nengel@2: # define VFP nengel@2: # define NOVFP @ nengel@2: #else nengel@2: # define VFP @ nengel@2: # define NOVFP nengel@2: #endif nengel@2: nengel@2: #define GLUE(a, b) a ## b nengel@2: #define JOIN(a, b) GLUE(a, b) nengel@2: #define X(s) JOIN(EXTERN_ASM, s)