@@ -1377,6 +1377,7 @@ def update_via_simpasm(
13771377 preserve_header = True ,
13781378 dry_run = False ,
13791379 force_cross = False ,
1380+ x86_64_syntax = "att" ,
13801381):
13811382 status_update ("simpasm" , infile_full )
13821383
@@ -1432,6 +1433,9 @@ def update_via_simpasm(
14321433 cmd += [f'--cflags="{ cflags } "' ]
14331434 if preserve_header is True :
14341435 cmd += ["-p" ]
1436+ # Add syntax option for x86_64
1437+ if arch == "x86_64" and x86_64_syntax != "att" :
1438+ cmd += ["--syntax" , x86_64_syntax ]
14351439 r = subprocess .run (
14361440 cmd ,
14371441 stdout = subprocess .DEVNULL ,
@@ -1542,7 +1546,13 @@ def synchronize_backend(
15421546
15431547
15441548def synchronize_backends (
1545- * , dry_run = False , force_cross = False , clean = False , delete = False , no_simplify = False
1549+ * ,
1550+ dry_run = False ,
1551+ force_cross = False ,
1552+ clean = False ,
1553+ delete = False ,
1554+ no_simplify = False ,
1555+ x86_64_syntax = "att" ,
15461556):
15471557 if clean is False :
15481558 ty = "opt"
@@ -1603,6 +1613,7 @@ def synchronize_backends(
16031613 delete = delete ,
16041614 force_cross = force_cross ,
16051615 no_simplify = no_simplify ,
1616+ x86_64_syntax = x86_64_syntax ,
16061617 # Turn off control-flow protection (CET) explicitly. Newer versions of
16071618 # clang turn it on by default and insert endbr64 instructions at every
16081619 # global symbol.
@@ -2226,7 +2237,13 @@ def _main():
22262237 parser .add_argument ("--aarch64-clean" , default = True , action = "store_true" )
22272238 parser .add_argument ("--no-simplify" , default = False , action = "store_true" )
22282239 parser .add_argument ("--force-cross" , default = False , action = "store_true" )
2229-
2240+ parser .add_argument (
2241+ "--x86-64-syntax" ,
2242+ type = str ,
2243+ choices = ["att" , "intel" ],
2244+ default = "att" ,
2245+ help = "Assembly syntax for x86_64 disassembly output (att or intel)" ,
2246+ )
22302247 args = parser .parse_args ()
22312248
22322249 os .chdir (os .path .join (os .path .dirname (__file__ ), ".." ))
@@ -2248,6 +2265,7 @@ def _main():
22482265 clean = args .aarch64_clean ,
22492266 no_simplify = args .no_simplify ,
22502267 force_cross = args .force_cross ,
2268+ x86_64_syntax = args .x86_64_syntax ,
22512269 )
22522270 high_level_status ("Synchronized backends" )
22532271
@@ -2264,6 +2282,7 @@ def _main():
22642282 delete = True ,
22652283 force_cross = args .force_cross ,
22662284 no_simplify = args .no_simplify ,
2285+ x86_64_syntax = args .x86_64_syntax ,
22672286 )
22682287 high_level_status ("Completed final backend synchronization" )
22692288 gen_test_configs (args .dry_run )
0 commit comments