aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/platform.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 6c7d03dc7..8210e5c49 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -247,6 +247,12 @@ typedef uint64_t bb__aliased_uint64_t FIX_ALIASING;
247} while (0) 247} while (0)
248#endif 248#endif
249 249
250/* Unaligned, fixed-endian accessors */
251#define get_unaligned_le32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_LE32(v); })
252#define get_unaligned_be32(buf) ({ uint32_t v; move_from_unaligned32(v, buf); SWAP_BE32(v); })
253#define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val))
254#define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val))
255
250 256
251/* ---- Size-saving "small" ints (arch-dependent) ----------- */ 257/* ---- Size-saving "small" ints (arch-dependent) ----------- */
252 258