[PATCH] D56685: [COFF, ARM64] Declare __byteswap intrinsics
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 14 15:42:28 PST 2019
efriedma added inline comments.
================
Comment at: lib/Headers/arm64intr.h:50
+#define _byteswap_ulong __builtin_bswap32
+#define _byteswap_uint64 __builtin_bswap64
+
----------------
These should be available for all Microsoft targets, I think.
Please define these as inline functions or proper builtins, rather than macros; a macro is very likely to break something. (For example, if someone includes stdlib.h, which declares "unsigned long _byteswap_ulong(unsigned long);", replacing _byteswap_ulong with __builtin_bswap32 will cause a compile error.)
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56685/new/
https://reviews.llvm.org/D56685
More information about the cfe-commits
mailing list