diff options
author | Paul Mackerras <paulus@samba.org> | 2007-08-28 07:56:11 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-28 07:56:11 +0200 |
commit | 35438c4327df18dbf5e7f597b69299119f4a14de (patch) | |
tree | a4589d731015db93f2eba8f84ffb1f48a8084020 /arch/mips/lib/cmpdi2.c | |
parent | [POWERPC] Stop include asm-ppc when building ARCH=powerpc for ppc32 (diff) | |
parent | Linux 2.6.23-rc4 (diff) | |
download | linux-35438c4327df18dbf5e7f597b69299119f4a14de.tar.xz linux-35438c4327df18dbf5e7f597b69299119f4a14de.zip |
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'arch/mips/lib/cmpdi2.c')
-rw-r--r-- | arch/mips/lib/cmpdi2.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/lib/cmpdi2.c b/arch/mips/lib/cmpdi2.c new file mode 100644 index 000000000000..8c1306437ed1 --- /dev/null +++ b/arch/mips/lib/cmpdi2.c @@ -0,0 +1,27 @@ +#include <linux/module.h> + +#include "libgcc.h" + +word_type __cmpdi2(long long a, long long b) +{ + const DWunion au = { + .ll = a + }; + const DWunion bu = { + .ll = b + }; + + if (au.s.high < bu.s.high) + return 0; + else if (au.s.high > bu.s.high) + return 2; + + if ((unsigned int) au.s.low < (unsigned int) bu.s.low) + return 0; + else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) + return 2; + + return 1; +} + +EXPORT_SYMBOL(__cmpdi2); |