about summary refs log tree commit diff
path: root/tests/ui/asm/arm-low-dreg.rs
blob: ed6c7c8af195fb2b401e039197cee9f56d17e21d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ add-core-stubs
//@ build-pass
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf
//@ needs-llvm-components: arm
#![feature(no_core)]
#![crate_type = "rlib"]
#![no_core]

// We accidentally classified "d0"..="d15" as dregs, even though they are in dreg_low16,
// and thus didn't compile them on platforms with only 16 dregs.
// Highlighted in https://github.com/rust-lang/rust/issues/126797

extern crate minicore;
use minicore::*;

fn f(x: f64) -> f64 {
    let out: f64;
    unsafe {
        asm!("vmov.f64 d1, d0", out("d1") out, in("d0") x);
    }
    out
}