]>
Commit | Line | Data |
---|---|---|
b3f8d95d MM |
1 | /* Miscellaneous BPABI functions. |
2 | ||
66647d44 | 3 | Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc. |
b3f8d95d MM |
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 2, or (at your option) any | |
9 | later version. | |
10 | ||
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.) | |
19 | ||
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. | |
24 | ||
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 | |
39d14dda KC |
27 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
28 | Boston, MA 02110-1301, USA. */ | |
b3f8d95d | 29 | |
b3f8d95d MM |
30 | #ifdef L_aeabi_lcmp |
31 | ||
32 | ARM_FUNC_START aeabi_lcmp | |
ad1ec76f PB |
33 | cmp xxh, yyh |
34 | do_it lt | |
35 | movlt r0, #-1 | |
36 | do_it gt | |
37 | movgt r0, #1 | |
38 | do_it ne | |
39 | RETc(ne) | |
40 | subs r0, xxl, yyl | |
41 | do_it lo | |
42 | movlo r0, #-1 | |
43 | do_it hi | |
44 | movhi r0, #1 | |
b3f8d95d MM |
45 | RET |
46 | FUNC_END aeabi_lcmp | |
47 | ||
48 | #endif /* L_aeabi_lcmp */ | |
49 | ||
50 | #ifdef L_aeabi_ulcmp | |
51 | ||
52 | ARM_FUNC_START aeabi_ulcmp | |
53 | cmp xxh, yyh | |
5b3e6663 | 54 | do_it lo |
b3f8d95d | 55 | movlo r0, #-1 |
5b3e6663 | 56 | do_it hi |
b3f8d95d | 57 | movhi r0, #1 |
5b3e6663 | 58 | do_it ne |
b3f8d95d MM |
59 | RETc(ne) |
60 | cmp xxl, yyl | |
5b3e6663 | 61 | do_it lo |
b3f8d95d | 62 | movlo r0, #-1 |
5b3e6663 | 63 | do_it hi |
b3f8d95d | 64 | movhi r0, #1 |
5b3e6663 | 65 | do_it eq |
b3f8d95d MM |
66 | moveq r0, #0 |
67 | RET | |
68 | FUNC_END aeabi_ulcmp | |
69 | ||
70 | #endif /* L_aeabi_ulcmp */ | |
71 | ||
72 | #ifdef L_aeabi_ldivmod | |
73 | ||
74 | ARM_FUNC_START aeabi_ldivmod | |
75 | sub sp, sp, #8 | |
5b3e6663 PB |
76 | #if defined(__thumb2__) |
77 | mov ip, sp | |
78 | push {ip, lr} | |
79 | #else | |
80 | do_push {sp, lr} | |
81 | #endif | |
b3f8d95d MM |
82 | bl SYM(__gnu_ldivmod_helper) __PLT__ |
83 | ldr lr, [sp, #4] | |
84 | add sp, sp, #8 | |
5b3e6663 | 85 | do_pop {r2, r3} |
b3f8d95d MM |
86 | RET |
87 | ||
88 | #endif /* L_aeabi_ldivmod */ | |
89 | ||
90 | #ifdef L_aeabi_uldivmod | |
91 | ||
92 | ARM_FUNC_START aeabi_uldivmod | |
93 | sub sp, sp, #8 | |
5b3e6663 PB |
94 | #if defined(__thumb2__) |
95 | mov ip, sp | |
96 | push {ip, lr} | |
97 | #else | |
98 | do_push {sp, lr} | |
99 | #endif | |
b3f8d95d MM |
100 | bl SYM(__gnu_uldivmod_helper) __PLT__ |
101 | ldr lr, [sp, #4] | |
102 | add sp, sp, #8 | |
5b3e6663 | 103 | do_pop {r2, r3} |
b3f8d95d MM |
104 | RET |
105 | ||
106 | #endif /* L_aeabi_divmod */ | |
107 |