blob: 8b210431581d1eeb8ef5410dc6ca3c0a66511672 [file] [log] [blame]
Gabe Black169c0df2013-10-08 18:24:10 -07001/*
2 * linux/arch/arm/lib/ucmpdi2.S
3 *
4 * Author: Nicolas Pitre
5 * Created: Oct 19, 2005
6 * Copyright: Monta Vista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
Martin Roth4af58862016-01-21 13:15:16 -070011 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Gabe Black169c0df2013-10-08 18:24:10 -070016 */
17
18#if defined __GNUC__
19
20#include <arch/asm.h>
21
22#ifdef __ARMEB__
23#define xh r0
24#define xl r1
25#define yh r2
26#define yl r3
27#else
28#define xl r0
29#define xh r1
30#define yl r2
31#define yh r3
32#endif
33
34ENTRY(__ucmpdi2)
35
36 cmp xh, yh
37 cmpeq xl, yl
38 movlo r0, #0
39 moveq r0, #1
40 movhi r0, #2
41 mov pc, lr
42
43ENDPROC(__ucmpdi2)
44
45ENTRY(__aeabi_ulcmp)
46
47 cmp xh, yh
48 cmpeq xl, yl
49 movlo r0, #-1
50 moveq r0, #0
51 movhi r0, #1
52 mov pc, lr
53
54ENDPROC(__aeabi_ulcmp)
55
56#endif