summaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorDenys Vlasenko2018-11-23 18:48:20 +0100
committerDenys Vlasenko2018-11-23 18:48:20 +0100
commit219c9d4b5d12b3b965da838eb467b955ef928170 (patch)
tree12910b1dfa2c227edcc694abdb6db4b1daffe906 /include/platform.h
parentecc9090cfcccf412288147f385808f8f9df97ebe (diff)
downloadbusybox-219c9d4b5d12b3b965da838eb467b955ef928170.zip
busybox-219c9d4b5d12b3b965da838eb467b955ef928170.tar.gz
tls: code shrink
function old new delta xwrite_encrypted 599 585 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index c365d5c..50365a3 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -236,6 +236,7 @@ typedef uint64_t bb__aliased_uint64_t FIX_ALIASING;
# define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p))
# define move_to_unaligned16(u16p, v) (*(bb__aliased_uint16_t*)(u16p) = (v))
# define move_to_unaligned32(u32p, v) (*(bb__aliased_uint32_t*)(u32p) = (v))
+# define move_to_unaligned64(u64p, v) (*(bb__aliased_uint64_t*)(u64p) = (v))
/* #elif ... - add your favorite arch today! */
#else
# define BB_UNALIGNED_MEMACCESS_OK 0
@@ -252,6 +253,10 @@ typedef uint64_t bb__aliased_uint64_t FIX_ALIASING;
uint32_t __t = (v); \
memcpy((u32p), &__t, 4); \
} while (0)
+# define move_to_unaligned64(u64p, v) do { \
+ uint64_t __t = (v); \
+ memcpy((u64p), &__t, 8); \
+} while (0)
#endif
/* Unaligned, fixed-endian accessors */