- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateT-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
If any of the floating point registers (v0-31) or x30 on AArch64 are used as an out parameter the code doesn't compile. The following code using v0 fails to compile on rustc 1.47.0-nightly (e15510ca3 2020-08-20):
#![feature(asm)]
fn main() {
    unsafe {
        asm!(
             "",
             out("v0") _
        );
    }
}with an error:
error: non-trivial scalar-to-vector conversion, possible invalid constraint for vector type
 --> src/main.rs:6:15
  |
6 |              "",
  |               ^
If x30 is used instead of v0 another error message is shown:
error: couldn't allocate output register for constraint '{x30}'
 --> src/main.rs:6:15
  |
6 |              "",
  |               ^
I expect it to be possible to use all these registers as parameters to out.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-asm`#![feature(asm)]` (not `llvm_asm`)`#![feature(asm)]` (not `llvm_asm`)O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateT-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.