aboutsummaryrefslogtreecommitdiff
path: root/libbb/bb_bswap_64.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-10-18 11:40:26 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-10-18 11:40:26 +0200
commit9ff50b869780aba131dc9b542ccd0f1a3959e920 (patch)
treea1f65f2a5f8c3aa1d6f51bc15c734f2b3ae46ead /libbb/bb_bswap_64.c
parentb102e12253078e8c0ebdeeb5e1893ea6a025a700 (diff)
downloadbusybox-9ff50b869780aba131dc9b542ccd0f1a3959e920.tar.gz
*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'libbb/bb_bswap_64.c')
-rw-r--r--libbb/bb_bswap_64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libbb/bb_bswap_64.c b/libbb/bb_bswap_64.c
new file mode 100644
index 000000000..ce9d53b7f
--- /dev/null
+++ b/libbb/bb_bswap_64.c
@@ -0,0 +1,16 @@
+/*
+ * Utility routines.
+ *
+ * Copyright (C) 2010 Denys Vlasenko
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+#include "libbb.h"
+
+#if !(ULONG_MAX > 0xffffffff)
+uint64_t FAST_FUNC bb_bswap_64(uint64_t x)
+{
+ return bswap_64(x);
+}
+#endif