-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[NFCI][bolt][test] Enable AT&T syntax explicitly #167225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-bolt Author: Raul Tambre (tambry) ChangesFiles using the Intel syntax typically explicitly specify it. Do the same for the few relevant files for AT&T. This enables building LLVM with Full diff: https://github.com/llvm/llvm-project/pull/167225.diff 4 Files Affected:
diff --git a/bolt/test/runtime/X86/Inputs/basic-instrumentation.s b/bolt/test/runtime/X86/Inputs/basic-instrumentation.s
index 388d2cdbd085b..c28fa2210d256 100644
--- a/bolt/test/runtime/X86/Inputs/basic-instrumentation.s
+++ b/bolt/test/runtime/X86/Inputs/basic-instrumentation.s
@@ -1,3 +1,4 @@
+ .att_syntax
.globl main
.type main, %function
main:
diff --git a/bolt/test/runtime/X86/Inputs/internalcall.S b/bolt/test/runtime/X86/Inputs/internalcall.S
index 775a67122d2d7..18f7914ef65ec 100644
--- a/bolt/test/runtime/X86/Inputs/internalcall.S
+++ b/bolt/test/runtime/X86/Inputs/internalcall.S
@@ -1,6 +1,7 @@
// This is reduced test case for BOLT containing an internal call based on
// GetCoreDump (from google core dumper).
+ .att_syntax
.text
.globl getCallback
.type getCallback, %function
diff --git a/bolt/test/runtime/X86/Inputs/pie-exceptions-failed-split.s b/bolt/test/runtime/X86/Inputs/pie-exceptions-failed-split.s
index 5195d298b1bbe..fd12c26750b2c 100644
--- a/bolt/test/runtime/X86/Inputs/pie-exceptions-failed-split.s
+++ b/bolt/test/runtime/X86/Inputs/pie-exceptions-failed-split.s
@@ -49,6 +49,7 @@
# return !throw_test(argc, argv);
# }
+ .att_syntax
.text
.file "exceptions-failed-split.cpp"
.globl _Z3bari # -- Begin function _Z3bari
diff --git a/bolt/test/runtime/X86/exceptions-lpstart-zero.s b/bolt/test/runtime/X86/exceptions-lpstart-zero.s
index b487ff0fa2f59..1e377ea26cfd0 100644
--- a/bolt/test/runtime/X86/exceptions-lpstart-zero.s
+++ b/bolt/test/runtime/X86/exceptions-lpstart-zero.s
@@ -21,6 +21,7 @@
# The exception table was modified with udata4 LPStartEncoding and sdata4
# CallSiteEncoding.
+ .att_syntax
.text
.globl main # -- Begin function main
.p2align 4, 0x90
|
maksfb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adjusting BOLT tests. I'm surprised only a few needed a change since we use AT&T syntax everywhere.
I wonder if it will be easier to set proper flags in lit.local.cfg?
This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's Clang config files (i.e. a global preference for Intel syntax). `-masm=att` is insufficient as it doesn't override a specification of `-mllvm -x86-asm-syntax`.
c5a7a93 to
a3741eb
Compare
|
@maksfb A vast majority of the tests don't use the Clang frontend to compile assembly so they're not affected. Across the whole LLVM codebase only a few tens of changes have been necessary (~30'ish). I've switched to passing |
🐧 Linux x64 Test Results
|
maksfb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Setting flags via config will prevent future failures for newly added tests.
Files using the Intel syntax typically explicitly specify it. Do the same for the few relevant files for AT&T.
This enables building LLVM with
-mllvm -x86-asm-syntax=intelin one's Clang config files (i.e. a global preference for Intel syntax).Prior art: #164453 #166818