[NFCI][asm][i386/x86-64] Enable AT&T syntax explicitly (#164453)

Implementation files using the Intel syntax explicitly specify it.
Do the same for the few files using AT&T syntax.

This also enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's Clang config files
(i.e. a global preference for Intel syntax).

No functional change intended.
This commit is contained in:
Raul Tambre
2025-10-21 21:28:41 +03:00
committed by GitHub
parent 297f97298c
commit c208a23643
11 changed files with 20 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
#include "sanitizer_common/sanitizer_platform.h"
.file "asan_rtl_x86_64.S"
.att_syntax
#define NAME(n, reg, op, s, i) n##_##op##_##i##_##s##_##reg

View File

@@ -337,4 +337,8 @@
#endif
#endif
#if defined(__i386__) || defined(__amd64__)
.att_syntax
#endif
#endif // COMPILERRT_ASSEMBLY_H

View File

@@ -30,6 +30,7 @@
.section .text
.file "hwasan_setjmp_x86_64.S"
.att_syntax
.global ASM_WRAPPER_NAME(setjmp)
ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(setjmp))

View File

@@ -13,6 +13,7 @@
// The content of this file is x86_64-only
#if defined(__x86_64__)
.att_syntax
#define REGISTER_SAVE_SPACE_SIZE 512

View File

@@ -12,6 +12,7 @@
// The content of this file is x86_64-only
#if defined(__x86_64__)
.att_syntax
// Save all GRPS except %rsp.
// This value is also subtracted from %rsp below, despite the fact that %rbp

View File

@@ -2,6 +2,8 @@
#include "sanitizer_common/sanitizer_asm.h"
.att_syntax
.comm _ZN14__interception10real_vforkE,4,4
.globl ASM_WRAPPER_NAME(vfork)
ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork))

View File

@@ -2,6 +2,8 @@
#include "sanitizer_common/sanitizer_asm.h"
.att_syntax
.comm _ZN14__interception10real_vforkE,8,8
.globl ASM_WRAPPER_NAME(vfork)
ASM_TYPE_FUNCTION(ASM_WRAPPER_NAME(vfork))

View File

@@ -3,6 +3,8 @@
#include "sanitizer_common/sanitizer_asm.h"
.att_syntax
#if !defined(__APPLE__)
.section .text
#else

View File

@@ -25,6 +25,8 @@
#if !defined(__USING_SJLJ_EXCEPTIONS__)
#if defined(__i386__)
.att_syntax
DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_x86_jumpto)
#
# extern "C" void __libunwind_Registers_x86_jumpto(Registers_x86 *);
@@ -69,6 +71,7 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_x86_jumpto)
# skip gs
#elif defined(__x86_64__) && !defined(__arm64ec__)
.att_syntax
DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_x86_64_jumpto)
#

View File

@@ -25,6 +25,7 @@
#if !defined(__USING_SJLJ_EXCEPTIONS__)
#if defined(__i386__)
.att_syntax
#
# extern int __unw_getcontext(unw_context_t* thread_state)
@@ -109,6 +110,7 @@ DEFINE_LIBUNWIND_FUNCTION("#__unw_getcontext")
.text
#elif defined(__x86_64__)
.att_syntax
#
# extern int __unw_getcontext(unw_context_t* thread_state)

View File

@@ -18,6 +18,7 @@
#include "kmp_config.h"
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
.att_syntax
# if defined(__ELF__) && defined(__CET__) && defined(__has_include)
# if __has_include(<cet.h>)