From 483b47474dc21210338da21c1dab91378f1d9778 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 16 Mar 2020 09:51:18 -0700 Subject: [PATCH] ARM64 stuff --- node/Utils.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/node/Utils.hpp b/node/Utils.hpp index 0c3c8c3d0..99d24be8f 100644 --- a/node/Utils.hpp +++ b/node/Utils.hpp @@ -433,11 +433,11 @@ template static ZT_INLINE I loadAsIsEndian(const void *const p) noexcept { #ifdef ZT_NO_UNALIGNED_ACCESS -#if __BYTE_ORDER == __LITTLE_ENDIAN - return _load_le_bysize::l(reinterpret_cast(p)); -#else - return _load_be_bysize::l(reinterpret_cast(p)); -#endif + I tmp; +#pragma unroll + for(int i=0;i<(int)sizeof(I);++i) + reinterpret_cast(&tmp)[i] = reinterpret_cast(p)[i]; + return tmp; #else return *reinterpret_cast(p); #endif @@ -454,6 +454,7 @@ template static ZT_INLINE void storeAsIsEndian(void *const p,const I i) noexcept { #ifdef ZT_NO_UNALIGNED_ACCESS +#pragma unroll for(unsigned int k=0;k(p)[k] = reinterpret_cast(&i)[k]; #else