3 // revisions: mirunsafeck thirunsafeck
4 // [thirunsafeck]compile-flags: -Z thir-unsafeck
6 #![feature(asm, global_asm, asm_const)]
8 fn const_generic<const X: usize>() -> usize {
11 asm!("mov {}, {}", out(reg) a, const X);
16 const fn constfn(x: usize) -> usize {
23 asm!("mov {}, {}", out(reg) a, const 5);
27 asm!("mov {}, {}", out(reg) b, const constfn(5));
31 asm!("mov {}, {}", out(reg) c, const constfn(5) + constfn(5));
35 let d = const_generic::<5>();
39 global_asm!("mov x0, {}", const 5);
40 global_asm!("mov x0, {}", const constfn(5));
41 global_asm!("mov x0, {}", const constfn(5) + constfn(5));