]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/issue-92378.rs
Remove unnecessary .as_ref().
[rust.git] / src / test / ui / asm / issue-92378.rs
1 // compile-flags: --target armv5te-unknown-linux-gnueabi
2 // needs-llvm-components: arm
3 // build-pass
4
5 #![feature(no_core, lang_items, rustc_attrs, isa_attribute)]
6 #![no_core]
7 #![crate_type = "rlib"]
8
9 #[rustc_builtin_macro]
10 macro_rules! asm {
11     () => {};
12 }
13 #[lang = "sized"]
14 trait Sized {}
15
16 // ARM uses R11 for the frame pointer, make sure R7 is usable.
17 #[instruction_set(arm::a32)]
18 pub fn arm() {
19     unsafe {
20         asm!("", out("r7") _);
21     }
22 }
23
24 // Thumb uses R7 for the frame pointer, make sure R11 is usable.
25 #[instruction_set(arm::t32)]
26 pub fn thumb() {
27     unsafe {
28         asm!("", out("r11") _);
29     }
30 }