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