From 6c9d66ed4b686dcfaa02f9c89fcc3812a0acedf8 Mon Sep 17 00:00:00 2001 From: Kenzi Jeanis Date: Mon, 3 Feb 2020 09:26:37 -0600 Subject: [PATCH] LibC: Add byteswap.h, forwarding bswap_N to GCC builtins --- Libraries/LibC/byteswap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Libraries/LibC/byteswap.h diff --git a/Libraries/LibC/byteswap.h b/Libraries/LibC/byteswap.h new file mode 100644 index 00000000000..b3af26d439d --- /dev/null +++ b/Libraries/LibC/byteswap.h @@ -0,0 +1,11 @@ +#include + +#pragma once + +__BEGIN_DECLS + +#define bswap_16(x) (__builtin_bswap16(x)) +#define bswap_32(x) (__builtin_bswap32(x)) +#define bswap_64(x) (__builtin_bswap64(x)) + +__END_DECLS