diff options
author | David Howells <dhowells@redhat.com> | 2008-07-04 12:59:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-04 13:40:07 -0400 |
commit | fc26361ef0fbcad0406475fc6006fa4f09e60dce (patch) | |
tree | 26c8b01954156e5fae34acb281093cc815e56edc /arch/mn10300/lib/__ucmpdi2.S | |
parent | 7fc7228c0be9007f0e6a32c8a8ae340ea6246056 (diff) |
mn10300: provide __ucmpdi2() for MN10300
Provide __ucmpdi2() for MN10300 so that allmodconfig can be built.
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/lib/__ucmpdi2.S')
-rw-r--r-- | arch/mn10300/lib/__ucmpdi2.S | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/mn10300/lib/__ucmpdi2.S b/arch/mn10300/lib/__ucmpdi2.S new file mode 100644 index 000000000000..60dcbdfe386c --- /dev/null +++ b/arch/mn10300/lib/__ucmpdi2.S | |||
@@ -0,0 +1,43 @@ | |||
1 | /* __ucmpdi2.S: 64-bit unsigned compare | ||
2 | * | ||
3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | |||
13 | .text | ||
14 | .p2align 4 | ||
15 | |||
16 | ############################################################################### | ||
17 | # | ||
18 | # int __ucmpdi2(unsigned long long a [D0:D1], | ||
19 | # unsigned long long b [(SP,12),(SP,16)]) | ||
20 | # | ||
21 | # - returns 0, 1, or 2 as a <, =, > b respectively. | ||
22 | # | ||
23 | ############################################################################### | ||
24 | .globl __ucmpdi2 | ||
25 | .type __ucmpdi2,@function | ||
26 | __ucmpdi2: | ||
27 | mov (12,sp),a0 # b.lsw | ||
28 | mov (16,sp),a1 # b.msw | ||
29 | |||
30 | sub a0,d0 | ||
31 | subc a1,d1 # may clear Z, never sets it | ||
32 | bne __ucmpdi2_differ # a.msw != b.msw | ||
33 | mov +1,d0 | ||
34 | rets | ||
35 | |||
36 | __ucmpdi2_differ: | ||
37 | # C flag is set if LE, clear if GE | ||
38 | subc d0,d0 # -1 if LE, 0 if GE | ||
39 | add +1,d0 # 0 if LE, 1 if GE | ||
40 | add d0,d0 # 0 if LE, 2 if GE | ||
41 | rets | ||
42 | |||
43 | .size __ucmpdi2, .-__ucmpdi2 | ||