All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: provide __bswapdi2
@ 2013-05-10 21:18 David Woodhouse
  2013-05-13  6:48 ` Anton Blanchard
  2013-05-13  7:09 ` Michael Neuling
  0 siblings, 2 replies; 18+ messages in thread
From: David Woodhouse @ 2013-05-10 21:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: viro

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

From: David Woodhouse <David.Woodhouse@intel.com>

Some versions of GCC apparently expect this to be provided by libgcc.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
Untested.

diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 19e096b..f077dc2 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -657,6 +657,17 @@ _GLOBAL(__ucmpdi2)
 	li	r3,2
 	blr
 
+_GLOBAL(__bswapdi2)
+	rlwinm	10,4,8,0xffffffff
+	rlwinm	11,3,8,0xffffffff
+	rlwimi	10,4,24,0,7
+	rlwimi	11,3,24,0,7
+	rlwimi	10,4,24,16,23
+	rlwimi	11,3,24,16,23
+	mr	4,11
+	mr	3,10
+	blr
+
 _GLOBAL(abs)
 	srawi	r4,r3,31
 	xor	r3,r3,r4
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 5cfa800..3b2e6e8 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -234,6 +234,18 @@ _GLOBAL(__flush_dcache_icache)
 	isync
 	blr
 
+_GLOBAL(__bswapdi2)
+	srdi	8,3,32
+	rlwinm	7,3,8,0xffffffff
+	rlwimi	7,3,24,0,7
+	rlwinm	9,8,8,0xffffffff
+	rlwimi	7,3,24,16,23
+	rlwimi	9,8,24,0,7
+	rlwimi	9,8,24,16,23
+	sldi	7,7,32
+	or	7,7,9
+	mr	3,7
+	blr
 
 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
 /*
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 78b8766..c296665 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -143,7 +143,8 @@ EXPORT_SYMBOL(__lshrdi3);
 int __ucmpdi2(unsigned long long, unsigned long long);
 EXPORT_SYMBOL(__ucmpdi2);
 #endif
-
+long long __bswapdi2(long long);
+EXPORT_SYMBOL(__bswapdi2);
 EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(memmove);

-- 
dwmw2


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-05-14  6:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10 21:18 [PATCH] powerpc: provide __bswapdi2 David Woodhouse
2013-05-13  6:48 ` Anton Blanchard
2013-05-13  7:20   ` Alan Modra
2013-05-13 10:27     ` David Woodhouse
2013-05-13 16:47       ` Segher Boessenkool
2013-05-13  7:09 ` Michael Neuling
2013-05-13  7:20   ` [PATCH v2] " Michael Neuling
2013-05-13  7:33   ` [PATCH] " Gabriel Paubert
2013-05-13 10:23     ` [PATCH v3] " Michael Neuling
2013-05-13 10:33   ` [PATCH] " David Woodhouse
2013-05-13 10:38     ` David Woodhouse
2013-05-13 10:51       ` Joakim Tjernlund
2013-05-13 11:12         ` Joakim Tjernlund
2013-05-13 13:12       ` Gabriel Paubert
2013-05-13 16:55     ` Segher Boessenkool
2013-05-14  1:09   ` Stephen Rothwell
2013-05-14  1:25     ` Michael Neuling
2013-05-14  6:59       ` David Woodhouse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.