• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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)]
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)]
arm()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)]
thumb()27 pub fn thumb() {
28     unsafe {
29         asm!("", out("r11") _);
30     }
31 }
32