summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/misc_32.S
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2013-10-09 10:41:17 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 16:49:27 +1100
commit41b93b238ab394c8cf0935ec3ba31c700a2b3b25 (patch)
tree13d3450edf167edb4c4114e025e69824aac38e96 /arch/powerpc/kernel/misc_32.S
parent8616dff5b0e969444cc8484875ebd936956b5c0d (diff)
powerpc: Added __cmpdi2 for signed 64bit comparision
This was missing on powerpc and I am getting compilation error drivers/vfio/pci/vfio_pci_rdwr.c:193: undefined reference to `__cmpdi2' drivers/vfio/pci/vfio_pci_rdwr.c:193: undefined reference to `__cmpdi2' Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/misc_32.S')
-rw-r--r--arch/powerpc/kernel/misc_32.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 2b0ad9845363..e47d268727a4 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -659,6 +659,20 @@ _GLOBAL(__lshrdi3)
blr
/*
+ * 64-bit comparison: __cmpdi2(s64 a, s64 b)
+ * Returns 0 if a < b, 1 if a == b, 2 if a > b.
+ */
+_GLOBAL(__cmpdi2)
+ cmpw r3,r5
+ li r3,1
+ bne 1f
+ cmplw r4,r6
+ beqlr
+1: li r3,0
+ bltlr
+ li r3,2
+ blr
+/*
* 64-bit comparison: __ucmpdi2(u64 a, u64 b)
* Returns 0 if a < b, 1 if a == b, 2 if a > b.
*/