-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
asm! can't let you use lateout("rbx") (LLVM needs it) #90083
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.Category: This is a bug.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.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-bugCategory: This is a bug.Category: This is a bug.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is about an unstable feature, so maybe you don't consider that a regression, exactly. This seemed like the best bug template to me; I hope it's OK.
I'm reading the
asm!document at https://doc.rust-lang.org/beta/unstable-book/library-features/asm.html. Thecpuidexample has this code:But when you press the Play button to try it out, you get:
I hacked it up locally (building with Rust Nightly), and this seems to work:
I.e. I comment out the
lateout("ebx")line, and add a second macro invocation to get the value of ebx.But I assume there is a better way. :) The docs should be updated to show the better way. Thanks!