1 /****************************************************************************
2 * Assembly testing and benchmarking tool
3 * Copyright (c) 2015 Martin Storsjo
4 * Copyright (c) 2015 Janne Grunau
6 * This file is part of FFmpeg.
8 * FFmpeg is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
21 *****************************************************************************/
23 #include "libavutil/arm/asm.S"
26 .quad 0x21f86d66c8ca00ce
27 .quad 0x75b6ba21077c48ad
28 .quad 0xed56bb2dcb3c7736
29 .quad 0x8bda43d3fd1a7e06
30 .quad 0xb64a9c9e5d318408
31 .quad 0xdf9a54b303f1d3a3
32 .quad 0x4a75479abd64e097
33 .quad 0x249214109d5d1c88
37 .asciz "failed to preserve register"
40 @ max number of args used by any asm function.
43 #define ARG_STACK 4*(MAX_ARGS - 2)
45 .macro clobbercheck variant
47 function checkasm_checked_call_\variant, export=1
53 .equ pushed, pushed + 16*4 + 4
56 movrel r12, register_init
62 sub sp, sp, #ARG_STACK
65 ldr r12, [sp, #ARG_STACK + pushed + 8 + pos]
73 ldrd r2, r3, [sp, #ARG_STACK + pushed]
75 add sp, sp, #ARG_STACK
78 movrel r12, register_init
81 .macro check_reg_vfp, dreg, inc=8
82 ldrd r0, r1, [r12], #\inc
90 .irp n, 8, 9, 10, 11, 12, 13, 14
93 check_reg_vfp d15, -56
99 @ Ignore changes in the topmost 5 bits
104 .macro check_reg reg1, reg2=
105 ldrd r0, r1, [r12], #8
115 @ r9 is a volatile register in the ios ABI
126 movrel r0, error_message
127 blx X(checkasm_fail_func)
139 #if HAVE_VFP || HAVE_NEON