[compiler-rt] Replace assignment w/.set directive (#107667)

These assignment statements are rejected by `llvm-mc --triple=hexagon`,
likely because the syntax so strongly resembles hexagon asm mnemonics.

The statements were being normalized by llvm-mc into `.set` directives
for most architectures, so I assume that this change is a portable one.
This commit is contained in:
Brian Cain
2024-09-07 15:46:17 -05:00
committed by GitHub
parent 3d0f44f5ae
commit dbb03f8f60

View File

@@ -17,9 +17,11 @@
// The asm hack only works with GCC and Clang. // The asm hack only works with GCC and Clang.
# if !defined(_WIN32) # if !defined(_WIN32)
asm("memcpy = __sanitizer_internal_memcpy"); asm(R"(
asm("memmove = __sanitizer_internal_memmove"); .set memcpy, __sanitizer_internal_memcpy
asm("memset = __sanitizer_internal_memset"); .set memmove, __sanitizer_internal_memmove
.set memset, __sanitizer_internal_memset
)");
# if defined(__cplusplus) && \ # if defined(__cplusplus) && \
!defined(SANITIZER_COMMON_REDEFINE_BUILTINS_IN_STD) !defined(SANITIZER_COMMON_REDEFINE_BUILTINS_IN_STD)