OSDN Git Service

Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / bpabi.S
1 /* Miscellaneous BPABI functions.
2
3    Copyright (C) 2003, 2004, 2007, 2008, 2009  Free Software Foundation, Inc.
4    Contributed by CodeSourcery, LLC.
5
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 3, or (at your option) any
9    later version.
10
11    This file is distributed in the hope that it will be useful, but
12    WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    General Public License for more details.
15
16    Under Section 7 of GPL version 3, you are granted additional
17    permissions described in the GCC Runtime Library Exception, version
18    3.1, as published by the Free Software Foundation.
19
20    You should have received a copy of the GNU General Public License and
21    a copy of the GCC Runtime Library Exception along with this program;
22    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23    <http://www.gnu.org/licenses/>.  */
24
25 #ifdef L_aeabi_lcmp
26
27 ARM_FUNC_START aeabi_lcmp
28         cmp     xxh, yyh
29         do_it   lt
30         movlt   r0, #-1
31         do_it   gt
32         movgt   r0, #1
33         do_it   ne
34         RETc(ne)
35         subs    r0, xxl, yyl
36         do_it   lo
37         movlo   r0, #-1
38         do_it   hi
39         movhi   r0, #1
40         RET
41         FUNC_END aeabi_lcmp
42
43 #endif /* L_aeabi_lcmp */
44         
45 #ifdef L_aeabi_ulcmp
46
47 ARM_FUNC_START aeabi_ulcmp
48         cmp     xxh, yyh
49         do_it   lo
50         movlo   r0, #-1
51         do_it   hi
52         movhi   r0, #1
53         do_it   ne
54         RETc(ne)
55         cmp     xxl, yyl
56         do_it   lo
57         movlo   r0, #-1
58         do_it   hi
59         movhi   r0, #1
60         do_it   eq
61         moveq   r0, #0
62         RET
63         FUNC_END aeabi_ulcmp
64
65 #endif /* L_aeabi_ulcmp */
66
67 #ifdef L_aeabi_ldivmod
68
69 ARM_FUNC_START aeabi_ldivmod
70         sub sp, sp, #8
71 #if defined(__thumb2__)
72         mov ip, sp
73         push {ip, lr}
74 #else
75         do_push {sp, lr}
76 #endif
77         bl SYM(__gnu_ldivmod_helper) __PLT__
78         ldr lr, [sp, #4]
79         add sp, sp, #8
80         do_pop {r2, r3}
81         RET
82         
83 #endif /* L_aeabi_ldivmod */
84
85 #ifdef L_aeabi_uldivmod
86
87 ARM_FUNC_START aeabi_uldivmod
88         sub sp, sp, #8
89 #if defined(__thumb2__)
90         mov ip, sp
91         push {ip, lr}
92 #else
93         do_push {sp, lr}
94 #endif
95         bl SYM(__gnu_uldivmod_helper) __PLT__
96         ldr lr, [sp, #4]
97         add sp, sp, #8
98         do_pop {r2, r3}
99         RET
100         
101 #endif /* L_aeabi_divmod */
102