-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
On several architectures, some registers are considered reserved by LLVM. These registers effectively can't be used by LLVM's inline assembly instruction as in input/output/clobber.
rustc currently disallows using these registers in asm!. This seems to be in contradiction with a stated goal in the RFC:
The intent is that support for asm! should be independent of the rustc back-end used
As such, I'd expect there to be no backend-specific limitations on inline assembly.
Current LLVM-reserved registers are:
- x86: esi
- x86-64: rbx
- ARM: r7
jeandudey, kupiakos, crawfxrd, wsm25, kevinmehall and 3 more
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.