diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-27 12:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-27 12:42:43 -0400 |
commit | 88ede8209efd01b4a557ddd588875544954e170a (patch) | |
tree | faa926f325a2c6c04a48793cf734502c8a078ea1 /arch/mips/lib/cmpdi2.c | |
parent | 96665822dc43957d4337509e138017dc1cb960b1 (diff) | |
parent | 23dd6d351a2f8157602e854e3a147a04cf7279a1 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (60 commits)
[MIPS] Fulong doesn't need ISA DMA.
[MIPS] IP27: intr_sconnect_level: don't disable interrupts.
[MIPS] IP27: startup_bridge_irq: connect interrupt.
[MIPS] IP27: shutdown_bridge_irq: don't free irq.
[MIPS] Sort out handling of ISA-less PCI systems.
[MIPS] Add __cmpdi2
[MIPS] HOTPLUG: Make register_pci_controller __devinit.
[MIPS] PCI: Remove __devinit attribute from pcibios_fixup_bus.
[MIPS] PCI: Remove __devinit attribute from pcibios_fixup_bus.
[MIPS] Delete duplicate inclusion of <linux/delay.h>.
[MIPS] Polish <asm/edac.h>.
[MIPS] IP22: Export sgi_gfxaddr for use by the Newport console driver.
[MIPS] Maintain si_code field properly for FP exceptions
[MIPS] SMTC: Fix duplicate status dumps on NMI
[MIPS] Unconditionally writeback and invalidate caches on kexec.
[PATCH] rtc: Make rtc-rs5c348 driver hotplug-aware
[MIPS] Fix gcc 3.3 warning.
[MIPS] Fix invalid semicolon after if statement
[MIPS] Update Cobalt defconfig
[MIPS] Update workpad_defconfig
...
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 @@ | |||
1 | #include <linux/module.h> | ||
2 | |||
3 | #include "libgcc.h" | ||
4 | |||
5 | word_type __cmpdi2(long long a, long long b) | ||
6 | { | ||
7 | const DWunion au = { | ||
8 | .ll = a | ||
9 | }; | ||
10 | const DWunion bu = { | ||
11 | .ll = b | ||
12 | }; | ||
13 | |||
14 | if (au.s.high < bu.s.high) | ||
15 | return 0; | ||
16 | else if (au.s.high > bu.s.high) | ||
17 | return 2; | ||
18 | |||
19 | if ((unsigned int) au.s.low < (unsigned int) bu.s.low) | ||
20 | return 0; | ||
21 | else if ((unsigned int) au.s.low > (unsigned int) bu.s.low) | ||
22 | return 2; | ||
23 | |||
24 | return 1; | ||
25 | } | ||
26 | |||
27 | EXPORT_SYMBOL(__cmpdi2); | ||