Nicolas Pitre | f741a1a | 2005-10-30 23:08:03 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
Nicolas Pitre | ba95e4e | 2006-01-14 16:18:29 +0000 | [diff] [blame] | 13 | #include <linux/config.h> |
Nicolas Pitre | f741a1a | 2005-10-30 23:08:03 +0000 | [diff] [blame] | 14 | #include <linux/linkage.h> |
| 15 | |
| 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 | |
| 28 | ENTRY(__ucmpdi2) |
| 29 | |
| 30 | cmp xh, yh |
| 31 | cmpeq xl, yl |
| 32 | movlo r0, #0 |
| 33 | moveq r0, #1 |
| 34 | movhi r0, #2 |
| 35 | mov pc, lr |
| 36 | |
Nicolas Pitre | ba95e4e | 2006-01-14 16:18:29 +0000 | [diff] [blame] | 37 | #ifdef CONFIG_AEABI |
| 38 | |
| 39 | ENTRY(__aeabi_ulcmp) |
| 40 | |
| 41 | cmp xh, yh |
| 42 | cmpeq xl, yl |
| 43 | movlo r0, #-1 |
| 44 | moveq r0, #0 |
| 45 | movhi r0, #1 |
| 46 | mov pc, lr |
| 47 | |
| 48 | #endif |
| 49 | |