[compiler-rt] f7bbcde - [compiler-rt] Fix building for arm64ec (#164590)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 07:19:15 PDT 2025


Author: Martin Storsjö
Date: 2025-10-22T17:19:12+03:00
New Revision: f7bbcdea8e9c0cb17e44c3920631eaad449f3229

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

LOG: [compiler-rt] Fix building for arm64ec (#164590)

c208a23643231d0b19c6f795895a16dfe6797340 added the directive
`.att_syntax` when building for x86 architectures. However, when
building for arm64ec (a Windows target, for an ABI compatible with
x86_64), the defines for `__x86_64__` (and similar ones like
`__amd64__`) are still defined, so we need to check for `__arm64ec__`
here as well to skip it for such targets.

This matches similar existing ifdefs for x86_64/aarch64 in compiler-rt
builtins.

Added: 
    

Modified: 
    compiler-rt/lib/builtins/assembly.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h
index d28f73f14b0cf..ac119af521a37 100644
--- a/compiler-rt/lib/builtins/assembly.h
+++ b/compiler-rt/lib/builtins/assembly.h
@@ -337,7 +337,8 @@
 #endif
 #endif
 
-#if defined(__ASSEMBLER__) && (defined(__i386__) || defined(__amd64__))
+#if defined(__ASSEMBLER__) && (defined(__i386__) || defined(__amd64__)) &&     \
+    !defined(__arm64ec__)
 .att_syntax
 #endif
 


        


More information about the llvm-commits mailing list