https://github.com/tambry created https://github.com/llvm/llvm-project/pull/166770
Implementation files using the Intel syntax typically explicitly specify it. Do the same for the few files using AT&T syntax. This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's Clang config files (i.e. a global preference for Intel syntax). >From 10f038365c671778b2bb864fccbd3b64d2c2e66b Mon Sep 17 00:00:00 2001 From: Raul Tambre <[email protected]> Date: Thu, 6 Nov 2025 14:43:30 +0200 Subject: [PATCH] [NFCI][lldb][test][asm] Enable AT&T syntax explicitly Implementation files using the Intel syntax typically explicitly specify it. Do the same for the few files using AT&T syntax. This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's Clang config files (i.e. a global preference for Intel syntax). --- .../disassembler-variables/d_original_example.s | 3 ++- .../disassembler-variables/live_across_call.s | 3 ++- .../functionalities/disassembler-variables/loop_reg_rotate.s | 5 +++-- .../functionalities/disassembler-variables/regs_fp_params.s | 1 + .../functionalities/disassembler-variables/regs_int_params.s | 1 + .../disassembler-variables/regs_mixed_params.s | 1 + .../disassembler-variables/seed_reg_const_undef.s | 1 + .../SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s | 1 + ...variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s | 1 + ...variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s | 1 + .../Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s | 1 + lldb/test/Shell/Unwind/Inputs/eh-frame-augment-noop.s | 1 + lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s | 1 + .../Shell/Unwind/Inputs/eh-frame-dwarf-unwind-val-offset.s | 1 + lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s | 1 + lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s | 1 + lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s | 1 + .../Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s | 1 + lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s | 1 + lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s | 1 + 20 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lldb/test/API/functionalities/disassembler-variables/d_original_example.s b/lldb/test/API/functionalities/disassembler-variables/d_original_example.s index c38742cfc683e..8824d4c81fa2c 100644 --- a/lldb/test/API/functionalities/disassembler-variables/d_original_example.s +++ b/lldb/test/API/functionalities/disassembler-variables/d_original_example.s @@ -1,6 +1,6 @@ /* Original C (for context): * #include <stdio.h> -* +* * int main(int argc, char **argv) { * for (int i = 1; i < argc; ++i) * puts(argv[i]); @@ -8,6 +8,7 @@ * } */ .file "d_original_example.c" + .att_syntax .text .globl main # -- Begin function main .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/live_across_call.s b/lldb/test/API/functionalities/disassembler-variables/live_across_call.s index cd9f08afe6fdc..4bdf68cbbebb4 100644 --- a/lldb/test/API/functionalities/disassembler-variables/live_across_call.s +++ b/lldb/test/API/functionalities/disassembler-variables/live_across_call.s @@ -1,7 +1,7 @@ /* Original C (for context): * // Declare a real external call so the compiler must respect ABI clobbers. * extern int leaf(int) __attribute__((noinline)); -* +* * __attribute__((noinline)) * int live_across_call(int x) { * volatile int a = x; // a starts in a GPR (from arg) @@ -12,6 +12,7 @@ * } */ .file "live_across_call.c" + .att_syntax .text .globl live_across_call # -- Begin function live_across_call .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s b/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s index c01e2b28fd2be..c35116551baab 100644 --- a/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s +++ b/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s @@ -3,7 +3,7 @@ * int loop_reg_rotate(int n, int seed) { * volatile int acc = seed; // keep as a named local * int i = 0, j = 1, k = 2; // extra pressure but not enough to spill -* +* * for (int t = 0; t < n; ++t) { * // Mix uses so the allocator may reshuffle regs for 'acc' * acc = acc + i; @@ -13,12 +13,13 @@ * acc = acc + k; * i ^= acc; j += acc; k ^= j; * } -* +* * asm volatile("" :: "r"(acc)); * return acc + i + j + k; * } */ .file "loop_reg_rotate.c" + .att_syntax .text .globl loop_reg_rotate # -- Begin function loop_reg_rotate .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s index 502ab151e0c5b..86863d4902357 100644 --- a/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s +++ b/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s @@ -5,6 +5,7 @@ * return a + b + c + d + e + f; * }*/ .file "regs_fp_params.c" + .att_syntax .text .globl regs_fp_params # -- Begin function regs_fp_params .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s index 0b2a60e2b4d5f..c44e3c3d85558 100644 --- a/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s +++ b/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s @@ -8,6 +8,7 @@ * } */ .file "regs_int_params.c" + .att_syntax .text .globl regs_int_params # -- Begin function regs_int_params .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s index 691180b42f249..1c25af1f570ee 100644 --- a/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s +++ b/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s @@ -11,6 +11,7 @@ */ .file "regs_mixed_params.c" .file 0 "." "regs_mixed_params.c" md5 0x73c4bda40238ae460aaecb3a6a2603cf + .att_syntax .text .globl regs_mixed_params # -- Begin function regs_mixed_params .p2align 4 diff --git a/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s b/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s index f85b8a712cbb2..4e3d64d57cd13 100644 --- a/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s +++ b/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s @@ -10,6 +10,7 @@ */ .file "seed_reg_const_undef.c" + .att_syntax .text .globl main # -- Begin function main .p2align 4 diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s index c6e5ccda5f2ef..24a64bdd5aa67 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s @@ -27,6 +27,7 @@ # return 0; # } + .att_syntax .text .Ltext0: .type b, @function diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s index e64cd176c6302..7c583f6bf59c4 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s @@ -24,6 +24,7 @@ # CHECK: inlinevar.h:2: (int) var = {{.*}} # Unfixed LLDB did show only: (int) var = {{.*}} + .att_syntax .text .file "inlinevar1.c" .file 1 "" "./inlinevarother.h" diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s b/lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s index 6a8dfa3eb63f3..6758a900f9b90 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s @@ -1,3 +1,4 @@ + .att_syntax .text .file "inlinevar2.c" .globl other # -- Begin function other diff --git a/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s b/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s index a7b5431a7afaf..d89366c15eca9 100644 --- a/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s +++ b/lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s @@ -8,6 +8,7 @@ # using the frame pointer register and the are deliberately adjusting the stack # pointer to test that we're using the correct unwind row. + .att_syntax .text .type baz,@function diff --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-augment-noop.s b/lldb/test/Shell/Unwind/Inputs/eh-frame-augment-noop.s index 2bcf534f04fcf..cb2f8358bac9b 100644 --- a/lldb/test/Shell/Unwind/Inputs/eh-frame-augment-noop.s +++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-augment-noop.s @@ -2,6 +2,7 @@ # augmentation machinery should detect that no augmentation is needed and use # eh_frame directly. + .att_syntax .text .globl foo foo: diff --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s index 95099ce42d3f5..670c97e5dd0bf 100644 --- a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s +++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl asm_main asm_main: diff --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-val-offset.s b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-val-offset.s index 273921cc9c549..2ec991033e262 100644 --- a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-val-offset.s +++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-val-offset.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl bar bar: diff --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s index d83551483dd31..dd0b5de7004df 100644 --- a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s +++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl bar bar: diff --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s b/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s index 29decefad5e51..71782601b3c53 100644 --- a/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s +++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s @@ -1,3 +1,4 @@ + .att_syntax .text .type bar, @function diff --git a/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s b/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s index c9b7a785c3410..29f65fe4afbc2 100644 --- a/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s +++ b/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s @@ -1,3 +1,4 @@ + .att_syntax .cfi_sections .eh_frame, .debug_frame .text .globl bar diff --git a/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s b/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s index dd4453c64b88a..1ef46bd5d2460 100644 --- a/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s +++ b/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl asm_main asm_main: diff --git a/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s b/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s index 50ede2d34d38d..f35a60b7e809e 100644 --- a/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s +++ b/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl bar bar: diff --git a/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s b/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s index 6030affd09d20..d3ec4fd8fa41d 100644 --- a/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s +++ b/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s @@ -1,3 +1,4 @@ + .att_syntax .text .globl main .type main, @function _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
