File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ // compile-flags: --target thumbv6m-none-eabi
2+ // needs-llvm-components: arm
3+ // needs-asm-support
4+
5+ #![ feature( no_core, lang_items, rustc_attrs) ]
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+ pub fn foo ( ) {
17+ unsafe {
18+ asm ! ( "" , in( "r8" ) 0 ) ;
19+ //~^ cannot use register `r8`: high registers (r8+) can only be used as clobbers in Thumb-1 code
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ error: cannot use register `r8`: high registers (r8+) can only be used as clobbers in Thumb-1 code
2+ --> $DIR/issue-99071.rs:18:18
3+ |
4+ LL | asm!("", in("r8") 0);
5+ | ^^^^^^^^^^
6+
7+ error: aborting due to previous error
8+
You can’t perform that action at this time.
0 commit comments