blob: ad4a6309141a59c0ba3534795b93c5dbe7876814 [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>
Nicolas Pitref741a1a2005-10-30 23:08:03 +000015
16#ifdef __ARMEB__
17#define xh r0
18#define xl r1
19#define yh r2
20#define yl r3
21#else
22#define xl r0
23#define xh r1
24#define yl r2
25#define yh r3
26#endif
27
28ENTRY(__ucmpdi2)
29
30 cmp xh, yh
31 cmpeq xl, yl
32 movlo r0, #0
33 moveq r0, #1
34 movhi r0, #2
Russell King6ebbf2c2014-06-30 16:29:12 +010035 ret lr
Nicolas Pitref741a1a2005-10-30 23:08:03 +000036
Catalin Marinas93ed3972008-08-28 11:22:32 +010037ENDPROC(__ucmpdi2)
38
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000039#ifdef CONFIG_AEABI
40
41ENTRY(__aeabi_ulcmp)
42
43 cmp xh, yh
44 cmpeq xl, yl
45 movlo r0, #-1
46 moveq r0, #0
47 movhi r0, #1
Russell King6ebbf2c2014-06-30 16:29:12 +010048 ret lr
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000049
Catalin Marinas93ed3972008-08-28 11:22:32 +010050ENDPROC(__aeabi_ulcmp)
51
Nicolas Pitreba95e4e2006-01-14 16:18:29 +000052#endif
53