tls: code shrink
function old new delta
xwrite_encrypted 599 585 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 @@
# 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 @@
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 */