inline assembly register limits aren't correct when using instruction_set attribute #92378
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-bug
Category: This is a bug.
F-asm
`#![feature(asm)]` (not `llvm_asm`)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
First discussed on zulip.
Quick summary: the set of what registers are available for inline assembly is related to the current target arch. However, the
instruction_set
attribute lets a function be compiled for what's effectively an alternate arch. This should allow the other arch's registers to be used, but currently that's not the case.thumb-mode
target attribute is either not present (a32) or present (t32) in the target, and using theinstruction_set
attribute lets you have the opposite mode.Quoting Amanieu's Zulip post on the probable fix for this:
The text was updated successfully, but these errors were encountered: