[PATCH] D57915: [COFF, ARM64] Remove definitions for _byteswap library functions
Tom Tan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 12:03:51 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353740: [COFF, ARM64] Remove definitions for _byteswap library functions (authored by TomTan, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D57915?vs=185849&id=186306#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57915/new/
https://reviews.llvm.org/D57915
Files:
cfe/trunk/lib/Headers/intrin.h
cfe/trunk/test/Headers/ms-arm64-intrin.cpp
Index: cfe/trunk/test/Headers/ms-arm64-intrin.cpp
===================================================================
--- cfe/trunk/test/Headers/ms-arm64-intrin.cpp
+++ cfe/trunk/test/Headers/ms-arm64-intrin.cpp
@@ -14,16 +14,16 @@
}
unsigned short check_byteswap_ushort(unsigned short val) {
-// CHECK: call i16 @llvm.bswap.i16(i16 %val)
+// CHECK: call i16 @_byteswap_ushort(i16 %val)
return _byteswap_ushort(val);
}
unsigned long check_byteswap_ulong(unsigned long val) {
-// CHECK: call i32 @llvm.bswap.i32(i32 %val)
+// CHECK: call i32 @_byteswap_ulong(i32 %val)
return _byteswap_ulong(val);
}
unsigned __int64 check_byteswap_uint64(unsigned __int64 val) {
-// CHECK: call i64 @llvm.bswap.i64(i64 %val)
+// CHECK: call i64 @_byteswap_uint64(i64 %val)
return _byteswap_uint64(val);
}
Index: cfe/trunk/lib/Headers/intrin.h
===================================================================
--- cfe/trunk/lib/Headers/intrin.h
+++ cfe/trunk/lib/Headers/intrin.h
@@ -557,15 +557,9 @@
__int64 _ReadStatusReg(int);
void _WriteStatusReg(int, __int64);
-static inline unsigned short _byteswap_ushort (unsigned short val) {
- return __builtin_bswap16(val);
-}
-static inline unsigned long _byteswap_ulong (unsigned long val) {
- return __builtin_bswap32(val);
-}
-static inline unsigned __int64 _byteswap_uint64 (unsigned __int64 val) {
- return __builtin_bswap64(val);
-}
+unsigned short __cdecl _byteswap_ushort(unsigned short val);
+unsigned long __cdecl _byteswap_ulong (unsigned long val);
+unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 val);
#endif
/*----------------------------------------------------------------------------*\
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57915.186306.patch
Type: text/x-patch
Size: 1678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190211/82d9b805/attachment.bin>
More information about the cfe-commits
mailing list