From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/asm/x86_64/const.rs | 44 ----------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/test/ui/asm/x86_64/const.rs (limited to 'src/test/ui/asm/x86_64/const.rs') diff --git a/src/test/ui/asm/x86_64/const.rs b/src/test/ui/asm/x86_64/const.rs deleted file mode 100644 index d523ae021..000000000 --- a/src/test/ui/asm/x86_64/const.rs +++ /dev/null @@ -1,44 +0,0 @@ -// only-x86_64 -// run-pass -// needs-asm-support -// revisions: mirunsafeck thirunsafeck -// [thirunsafeck]compile-flags: -Z thir-unsafeck - -#![feature(asm_const)] - -use std::arch::{asm, global_asm}; - -fn const_generic() -> usize { - unsafe { - let a: usize; - asm!("mov {}, {}", out(reg) a, const X); - a - } -} - -const fn constfn(x: usize) -> usize { - x -} - -fn main() { - unsafe { - let a: usize; - asm!("mov {}, {}", out(reg) a, const 5); - assert_eq!(a, 5); - - let b: usize; - asm!("mov {}, {}", out(reg) b, const constfn(5)); - assert_eq!(b, 5); - - let c: usize; - asm!("mov {}, {}", out(reg) c, const constfn(5) + constfn(5)); - assert_eq!(c, 10); - } - - let d = const_generic::<5>(); - assert_eq!(d, 5); -} - -global_asm!("mov eax, {}", const 5); -global_asm!("mov eax, {}", const constfn(5)); -global_asm!("mov eax, {}", const constfn(5) + constfn(5)); -- cgit v1.2.3