bpabi.S revision 169690
1145171Sdas/* Miscellaneous BPABI functions. 2145171Sdas 3145171Sdas Copyright (C) 2003, 2004 Free Software Foundation, Inc. 4145171Sdas Contributed by CodeSourcery, LLC. 5145171Sdas 6145171Sdas This file is free software; you can redistribute it and/or modify it 7145171Sdas under the terms of the GNU General Public License as published by the 8145171Sdas Free Software Foundation; either version 2, or (at your option) any 9145171Sdas later version. 10145171Sdas 11145171Sdas In addition to the permissions in the GNU General Public License, the 12145171Sdas Free Software Foundation gives you unlimited permission to link the 13145171Sdas compiled version of this file into combinations with other programs, 14145171Sdas and to distribute those combinations without any restriction coming 15145171Sdas from the use of this file. (The General Public License restrictions 16145171Sdas do apply in other respects; for example, they cover modification of 17145171Sdas the file, and distribution when not linked into a combine 18145171Sdas executable.) 19145171Sdas 20145171Sdas This file is distributed in the hope that it will be useful, but 21145171Sdas WITHOUT ANY WARRANTY; without even the implied warranty of 22145171Sdas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23145171Sdas General Public License for more details. 24145171Sdas 25145171Sdas You should have received a copy of the GNU General Public License 26145171Sdas along with this program; see the file COPYING. If not, write to 27145171Sdas the Free Software Foundation, 51 Franklin Street, Fifth Floor, 28145171Sdas Boston, MA 02110-1301, USA. */ 29145171Sdas 30145171Sdas#ifdef __ARMEB__ 31145171Sdas#define xxh r0 32145171Sdas#define xxl r1 33145171Sdas#define yyh r2 34145171Sdas#define yyl r3 35145171Sdas#else 36145171Sdas#define xxh r1 37192760Sattilio#define xxl r0 38217108Skib#define yyh r3 39217108Skib#define yyl r2 40#endif 41 42#ifdef L_aeabi_lcmp 43 44ARM_FUNC_START aeabi_lcmp 45 subs ip, xxl, yyl 46 sbcs ip, xxh, yyh 47 subeqs ip, xxl, yyl 48 mov r0, ip 49 RET 50 FUNC_END aeabi_lcmp 51 52#endif /* L_aeabi_lcmp */ 53 54#ifdef L_aeabi_ulcmp 55 56ARM_FUNC_START aeabi_ulcmp 57 cmp xxh, yyh 58 movlo r0, #-1 59 movhi r0, #1 60 RETc(ne) 61 cmp xxl, yyl 62 movlo r0, #-1 63 movhi r0, #1 64 moveq r0, #0 65 RET 66 FUNC_END aeabi_ulcmp 67 68#endif /* L_aeabi_ulcmp */ 69 70#ifdef L_aeabi_ldivmod 71 72ARM_FUNC_START aeabi_ldivmod 73 sub sp, sp, #8 74 stmfd sp!, {sp, lr} 75 bl SYM(__gnu_ldivmod_helper) __PLT__ 76 ldr lr, [sp, #4] 77 add sp, sp, #8 78 ldmfd sp!, {r2, r3} 79 RET 80 81#endif /* L_aeabi_ldivmod */ 82 83#ifdef L_aeabi_uldivmod 84 85ARM_FUNC_START aeabi_uldivmod 86 sub sp, sp, #8 87 stmfd sp!, {sp, lr} 88 bl SYM(__gnu_uldivmod_helper) __PLT__ 89 ldr lr, [sp, #4] 90 add sp, sp, #8 91 ldmfd sp!, {r2, r3} 92 RET 93 94#endif /* L_aeabi_divmod */ 95 96