1 /*****************************************************************************
2 * asm.S: AArch64 utility macros
3 *****************************************************************************
4 * Copyright (C) 2008-2014 x264 project
6 * Authors: Mans Rullgard <mans@mansr.com>
7 * David Conrad <lessen42@gmail.com>
8 * Janne Grunau <janne-x264@jannau.net>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
24 * This program is also available under a commercial proprietary license.
25 * For more information, contact us at licensing@x264.com.
26 *****************************************************************************/
54 .macro function name, export=0, align=2
56 ELF .size \name, . - \name
63 .global EXTERN_ASM\name
64 ELF .type EXTERN_ASM\name, %function
65 FUNC .func EXTERN_ASM\name
68 ELF .type \name, %function
74 .macro const name, align=2
76 ELF .size \name, . - \name
86 #if defined(PIC) && defined(__APPLE__)
88 add \rd, \rd, \val@PAGEOFF
91 add \rd, \rd, :lo12:\val
97 #define GLUE(a, b) a ## b
98 #define JOIN(a, b) GLUE(a, b)
99 #define X(s) JOIN(EXTERN_ASM, s)
101 #define FDEC_STRIDE 32
102 #define FENC_STRIDE 16
105 .macro SUMSUB_AB sum, sub, a, b
110 .macro transpose t1, t2, s1, s2