* tree-ssa-loop-prefetch.c (determine_unroll_factor): Bound the unroll
[official-gcc.git] / gcc / config / arm / bpabi.S
blobc9f6d21c06dbd5fe3ca68d8fce5fd6e74978c1f9
1 /* Miscellaneous BPABI functions.
3    Copyright (C) 2003, 2004, 2007  Free Software Foundation, Inc.
4    Contributed by CodeSourcery, LLC.
6    This file is free software; you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published by the
8    Free Software Foundation; either version 2, or (at your option) any
9    later version.
11    In addition to the permissions in the GNU General Public License, the
12    Free Software Foundation gives you unlimited permission to link the
13    compiled version of this file into combinations with other programs,
14    and to distribute those combinations without any restriction coming
15    from the use of this file.  (The General Public License restrictions
16    do apply in other respects; for example, they cover modification of
17    the file, and distribution when not linked into a combine
18    executable.)
20    This file is distributed in the hope that it will be useful, but
21    WITHOUT ANY WARRANTY; without even the implied warranty of
22    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23    General Public License for more details.
25    You should have received a copy of the GNU General Public License
26    along with this program; see the file COPYING.  If not, write to
27    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
28    Boston, MA 02110-1301, USA.  */
30 #ifdef __ARMEB__
31 #define xxh r0
32 #define xxl r1
33 #define yyh r2
34 #define yyl r3
35 #else
36 #define xxh r1
37 #define xxl r0
38 #define yyh r3
39 #define yyl r2
40 #endif  
41         
42 #ifdef L_aeabi_lcmp
44 ARM_FUNC_START aeabi_lcmp
45         subs    ip, xxl, yyl
46         sbcs    ip, xxh, yyh
47         do_it   eq
48         COND(sub,s,eq)  ip, xxl, yyl
49         mov     r0, ip
50         RET
51         FUNC_END aeabi_lcmp
53 #endif /* L_aeabi_lcmp */
54         
55 #ifdef L_aeabi_ulcmp
57 ARM_FUNC_START aeabi_ulcmp
58         cmp     xxh, yyh
59         do_it   lo
60         movlo   r0, #-1
61         do_it   hi
62         movhi   r0, #1
63         do_it   ne
64         RETc(ne)
65         cmp     xxl, yyl
66         do_it   lo
67         movlo   r0, #-1
68         do_it   hi
69         movhi   r0, #1
70         do_it   eq
71         moveq   r0, #0
72         RET
73         FUNC_END aeabi_ulcmp
75 #endif /* L_aeabi_ulcmp */
77 #ifdef L_aeabi_ldivmod
79 ARM_FUNC_START aeabi_ldivmod
80         sub sp, sp, #8
81 #if defined(__thumb2__)
82         mov ip, sp
83         push {ip, lr}
84 #else
85         do_push {sp, lr}
86 #endif
87         bl SYM(__gnu_ldivmod_helper) __PLT__
88         ldr lr, [sp, #4]
89         add sp, sp, #8
90         do_pop {r2, r3}
91         RET
92         
93 #endif /* L_aeabi_ldivmod */
95 #ifdef L_aeabi_uldivmod
97 ARM_FUNC_START aeabi_uldivmod
98         sub sp, sp, #8
99 #if defined(__thumb2__)
100         mov ip, sp
101         push {ip, lr}
102 #else
103         do_push {sp, lr}
104 #endif
105         bl SYM(__gnu_uldivmod_helper) __PLT__
106         ldr lr, [sp, #4]
107         add sp, sp, #8
108         do_pop {r2, r3}
109         RET
110         
111 #endif /* L_aeabi_divmod */
112