diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index c365d5c8c..50365a31c 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 */ |