1 /****************************************************************************
2 * checkasm-arm.S: assembly check tool
3 *****************************************************************************
4 * Copyright (C) 2015 x264 project
6 * Authors: Martin Storsjo <martin@martin.st>
8 * This program 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 * This program 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.
22 * This program is also available under a commercial proprietary license.
23 * For more information, contact us at licensing@x264.com.
24 *****************************************************************************/
26 #include "../common/arm/asm.S"
31 .quad 0x21f86d66c8ca00ce
32 .quad 0x75b6ba21077c48ad
33 .quad 0xed56bb2dcb3c7736
34 .quad 0x8bda43d3fd1a7e06
35 .quad 0xb64a9c9e5d318408
36 .quad 0xdf9a54b303f1d3a3
37 .quad 0x4a75479abd64e097
38 .quad 0x249214109d5d1c88
41 .asciz "failed to preserve register"
45 @ max number of args used by any x264 asm function.
48 #define ARG_STACK 4*(MAX_ARGS - 2)
50 .macro clobbercheck variant
52 function x264_checkasm_call_\variant
56 .equ pushed, pushed + 16*4
59 movrel r12, register_init
67 sub sp, sp, #ARG_STACK
70 ldr r12, [sp, #ARG_STACK + pushed + 8 + pos]
78 ldrd r2, r3, [sp, #ARG_STACK + pushed]
80 add sp, sp, #ARG_STACK
84 movrel r12, register_init
102 .macro check_reg reg1, reg2=
103 ldrd r0, r1, [r12], #8
113 @ r9 is a volatile register in the ios ABI
127 movrel r0, error_message