[PATCH] Add GCC's byteswap intrinsics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
---
I'm about to make the kernel use these:
 http://git.infradead.org/users/dwmw2/byteswap.git

 lib.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib.c b/lib.c
index 396e9f1..d747a3e 100644
--- a/lib.c
+++ b/lib.c
@@ -698,6 +698,11 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern int __builtin_popcountl(unsigned long);\n");
 	add_pre_buffer("extern int __builtin_popcountll(unsigned long long);\n");
 
+	/* And byte-swapping operations.. */
+	add_pre_buffer("extern short __builtin_bswap16(short);\n");
+	add_pre_buffer("extern int __builtin_bswap32(int);\n");
+	add_pre_buffer("extern long long __builtin_bswap64(long long);\n");
+
 	/* And some random ones.. */
 	add_pre_buffer("extern void *__builtin_return_address(unsigned int);\n");
 	add_pre_buffer("extern void *__builtin_extract_return_addr(void *);\n");
-- 
1.8.0.1


-- 
dwmw2

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux