[libc-commits] [libc] e8572ac - [libc] Use correct mnemonic for arm64_32 architecture

Dominic Chen via libc-commits libc-commits at lists.llvm.org
Thu Apr 21 15:13:22 PDT 2022


Author: Dominic Chen
Date: 2022-04-21T15:13:07-07:00
New Revision: e8572aca0c422adbfadd2a2721c162a7432c9273

URL: https://github.com/llvm/llvm-project/commit/e8572aca0c422adbfadd2a2721c162a7432c9273
DIFF: https://github.com/llvm/llvm-project/commit/e8572aca0c422adbfadd2a2721c162a7432c9273.diff

LOG: [libc] Use correct mnemonic for arm64_32 architecture

arm64_32 is an ILP32 platform

Differential Revision: https://reviews.llvm.org/D124134

Added: 
    

Modified: 
    libc/src/string/memory_utils/elements_aarch64.h

Removed: 
    


################################################################################
diff  --git a/libc/src/string/memory_utils/elements_aarch64.h b/libc/src/string/memory_utils/elements_aarch64.h
index a1d88c5f83aaa..90b450fc98a2e 100644
--- a/libc/src/string/memory_utils/elements_aarch64.h
+++ b/libc/src/string/memory_utils/elements_aarch64.h
@@ -55,7 +55,11 @@ using _64 = Chained<_32, _32>;
 struct ZVA {
   static constexpr size_t SIZE = 64;
   static void splat_set(char *dst, const unsigned char value) {
+#if __SIZEOF_POINTER__ == 4
+    asm("dc zva, %w[dst]" : : [dst] "r"(dst) : "memory");
+#else
     asm("dc zva, %[dst]" : : [dst] "r"(dst) : "memory");
+#endif
   }
 };
 


        


More information about the libc-commits mailing list