2008-10-27 02:25:06 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2008-12-30 05:13:52 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2009-07-27 15:53:44 +03:00
|
|
|
#ifdef __ELF__
|
2009-07-28 01:55:55 +03:00
|
|
|
# define ELF
|
|
|
|
#else
|
|
|
|
# define ELF @
|
2009-07-27 15:53:44 +03:00
|
|
|
#endif
|
2009-07-28 01:55:55 +03:00
|
|
|
|
|
|
|
.macro require8, val=1
|
|
|
|
ELF .eabi_attribute 24, \val
|
2008-10-27 02:25:06 +02:00
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro preserve8, val=1
|
2009-07-28 01:55:55 +03:00
|
|
|
ELF .eabi_attribute 25, \val
|
2008-10-27 02:25:06 +02:00
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro function name, export=0
|
|
|
|
.if \export
|
2009-10-02 11:42:00 +03:00
|
|
|
.global EXTERN_ASM\name
|
|
|
|
EXTERN_ASM\name:
|
2008-10-27 02:25:06 +02:00
|
|
|
.endif
|
2009-07-28 01:55:55 +03:00
|
|
|
ELF .type \name, %function
|
2008-10-27 02:25:06 +02:00
|
|
|
.func \name
|
|
|
|
\name:
|
|
|
|
.endm
|
2008-12-30 05:13:52 +02:00
|
|
|
|
|
|
|
.macro movrel rd, val
|
2009-10-11 13:15:48 +03:00
|
|
|
#if HAVE_ARMV6T2 && !CONFIG_PIC
|
2008-12-30 05:13:52 +02:00
|
|
|
movw \rd, #:lower16:\val
|
|
|
|
movt \rd, #:upper16:\val
|
|
|
|
#else
|
|
|
|
ldr \rd, =\val
|
|
|
|
#endif
|
|
|
|
.endm
|
2009-07-21 01:30:24 +03:00
|
|
|
|
|
|
|
#if HAVE_VFP_ARGS
|
|
|
|
.eabi_attribute 28, 1
|
|
|
|
# define VFP
|
|
|
|
# define NOVFP @
|
|
|
|
#else
|
|
|
|
# define VFP @
|
|
|
|
# define NOVFP
|
|
|
|
#endif
|
2009-10-02 11:42:00 +03:00
|
|
|
|
|
|
|
#define GLUE(a, b) a ## b
|
|
|
|
#define JOIN(a, b) GLUE(a, b)
|
|
|
|
#define X(s) JOIN(EXTERN_ASM, s)
|