Skip to content
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

min-LLVM: Can only use x86 asm ATT syntax for LLVM < 10 in new asm! #76738

Closed
tesuji opened this issue Sep 15, 2020 · 6 comments
Closed

min-LLVM: Can only use x86 asm ATT syntax for LLVM < 10 in new asm! #76738

tesuji opened this issue Sep 15, 2020 · 6 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-asm `#![feature(asm)]` (not `llvm_asm`) O-x86_32 Target: x86 processors, 32 bit (like i686-*) requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Sep 15, 2020

This is a tracking issue to remind when using asm! macro in Rust repo and its direct dependencies
like stdarch, we can only use x86 ATT syntax for LLVM < 10. That's because older LLVM versions
don't support operand modifiers in intel syntax. Although as long as we stick to AT&T syntax
and stick to general-purpose registers it should be fine.

@rustbot modify labels: A-LLVM F-asm T-compiler requires-nightly O-x86

Some related discussions:

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-asm `#![feature(asm)]` (not `llvm_asm`) O-x86 requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 15, 2020
@bstrie
Copy link
Contributor

bstrie commented Oct 11, 2020

As of this writing the minimum supported LLVM version is 8, correct? (I'm not sure precisely where this is documented.) Given that LLVM produces a new major release twice a year, might we reasonably expect the minimum supported LLVM version to increase to 10 by this time next year?

@steveklabnik
Copy link
Member

As of Rust 1.49.0, the minimum LLVM version is 9 https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-1

@nikic
Copy link
Contributor

nikic commented Mar 13, 2021

I believe our policy is to support the last 3 LLVM releases, so it should be fine to drop support for LLVM 9 now that we support LLVM 12.

@Amanieu
Copy link
Member

Amanieu commented Apr 1, 2021

Note that the LLVM patches needed to support Intel syntax for asm! were only merged in 10.0.1, not 10.0.0.

@Amanieu
Copy link
Member

Amanieu commented Apr 5, 2021

I've added a version check for LLVM 10.0.1 in #83889.

@Amanieu
Copy link
Member

Amanieu commented Apr 5, 2021

It turns out this check is not needed, intel syntax works fine on 10.0.0.

@Amanieu Amanieu closed this as completed Apr 5, 2021
@Noratrieb Noratrieb added O-x86_32 Target: x86 processors, 32 bit (like i686-*) and removed O-x86-all labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-asm `#![feature(asm)]` (not `llvm_asm`) O-x86_32 Target: x86 processors, 32 bit (like i686-*) requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants