blob: 127a91af46f3adc2c502d674518dac7645b2bf7a [file] [log] [blame]
Nicolas Pitref741a1a2005-10-30 23:08:03 +00001/*
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.
11 */
12
13#include <linux/linkage.h>
Russell King6ebbf2c2014-06-30 16:29:12 +010014#include <asm/assembler.h>
Al Viro4dd18372016-01-13 13:46:22 -050015#include <asm/export.h>
Nicolas Pitref741a1a2005-10-30 23:08:03 +000016
17#ifdef __ARMEB__
18#define xh r0
19#define xl r1
20#define yh r2
21#define yl r3
22#else
23#define xl r0
24#define xh r1
25#define yl r2
26#define yh r3
27#endif
28
29ENTRY(__ucmpdi2)
30
31 cmp xh, yh
32 cmpeq xl, yl
33 movlo r0, #0
34 moveq r0, #1
35 movhi r0, #2
Russell King6ebbf2c2014-06-30 16:29:12 +010036 ret lr
Nicolas Pitref741a1a2005-10-30 23:08:03 +000037
Catalin Marinas93ed3972008-08-28 11:22:32 +010038ENDPROC(__ucmpdi2)
Al Viro4dd18372016-01-13 13:46:22 -050039EXPORT_SYMBOL(__ucmpdi2)
Catalin Marinas93ed3972008-08-28 11:22:32 +010040
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000041#ifdef CONFIG_AEABI
42
43ENTRY(__aeabi_ulcmp)
44
45 cmp xh, yh
46 cmpeq xl, yl
47 movlo r0, #-1
48 moveq r0, #0
49 movhi r0, #1
Russell King6ebbf2c2014-06-30 16:29:12 +010050 ret lr
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000051
Catalin Marinas93ed3972008-08-28 11:22:32 +010052ENDPROC(__aeabi_ulcmp)
Al Viro4dd18372016-01-13 13:46:22 -050053EXPORT_SYMBOL(__aeabi_ulcmp)
Catalin Marinas93ed3972008-08-28 11:22:32 +010054
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000055#endif
56