Skip to content

Commit 10f0383

Browse files
committed
[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).
1 parent bf2653e commit 10f0383

20 files changed

+24
-4
lines changed

lldb/test/API/functionalities/disassembler-variables/d_original_example.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* Original C (for context):
22
* #include <stdio.h>
3-
*
3+
*
44
* int main(int argc, char **argv) {
55
* for (int i = 1; i < argc; ++i)
66
* puts(argv[i]);
77
* return 0;
88
* }
99
*/
1010
.file "d_original_example.c"
11+
.att_syntax
1112
.text
1213
.globl main # -- Begin function main
1314
.p2align 4

lldb/test/API/functionalities/disassembler-variables/live_across_call.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Original C (for context):
22
* // Declare a real external call so the compiler must respect ABI clobbers.
33
* extern int leaf(int) __attribute__((noinline));
4-
*
4+
*
55
* __attribute__((noinline))
66
* int live_across_call(int x) {
77
* volatile int a = x; // a starts in a GPR (from arg)
@@ -12,6 +12,7 @@
1212
* }
1313
*/
1414
.file "live_across_call.c"
15+
.att_syntax
1516
.text
1617
.globl live_across_call # -- Begin function live_across_call
1718
.p2align 4

lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* int loop_reg_rotate(int n, int seed) {
44
* volatile int acc = seed; // keep as a named local
55
* int i = 0, j = 1, k = 2; // extra pressure but not enough to spill
6-
*
6+
*
77
* for (int t = 0; t < n; ++t) {
88
* // Mix uses so the allocator may reshuffle regs for 'acc'
99
* acc = acc + i;
@@ -13,12 +13,13 @@
1313
* acc = acc + k;
1414
* i ^= acc; j += acc; k ^= j;
1515
* }
16-
*
16+
*
1717
* asm volatile("" :: "r"(acc));
1818
* return acc + i + j + k;
1919
* }
2020
*/
2121
.file "loop_reg_rotate.c"
22+
.att_syntax
2223
.text
2324
.globl loop_reg_rotate # -- Begin function loop_reg_rotate
2425
.p2align 4

lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* return a + b + c + d + e + f;
66
* }*/
77
.file "regs_fp_params.c"
8+
.att_syntax
89
.text
910
.globl regs_fp_params # -- Begin function regs_fp_params
1011
.p2align 4

lldb/test/API/functionalities/disassembler-variables/regs_int_params.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* }
99
*/
1010
.file "regs_int_params.c"
11+
.att_syntax
1112
.text
1213
.globl regs_int_params # -- Begin function regs_int_params
1314
.p2align 4

lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
.file "regs_mixed_params.c"
1313
.file 0 "." "regs_mixed_params.c" md5 0x73c4bda40238ae460aaecb3a6a2603cf
14+
.att_syntax
1415
.text
1516
.globl regs_mixed_params # -- Begin function regs_mixed_params
1617
.p2align 4

lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
.file "seed_reg_const_undef.c"
13+
.att_syntax
1314
.text
1415
.globl main # -- Begin function main
1516
.p2align 4

lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_GNU_call_site-DW_AT_low_pc.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# return 0;
2828
# }
2929

30+
.att_syntax
3031
.text
3132
.Ltext0:
3233
.type b, @function

lldb/test/Shell/SymbolFile/DWARF/x86/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu1.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# CHECK: inlinevar.h:2: (int) var = {{.*}}
2525
# Unfixed LLDB did show only: (int) var = {{.*}}
2626

27+
.att_syntax
2728
.text
2829
.file "inlinevar1.c"
2930
.file 1 "" "./inlinevarother.h"

lldb/test/Shell/SymbolFile/DWARF/x86/Inputs/DW_TAG_variable-DW_AT_decl_file-DW_AT_abstract_origin-crosscu2.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.att_syntax
12
.text
23
.file "inlinevar2.c"
34
.globl other # -- Begin function other

0 commit comments

Comments
 (0)