about summary refs log tree commit diff
path: root/src/test/codegen/asm-may_unwind.rs
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/codegen/asm-may_unwind.rs
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
Move /src/test to /tests
Diffstat (limited to 'src/test/codegen/asm-may_unwind.rs')
-rw-r--r--src/test/codegen/asm-may_unwind.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/test/codegen/asm-may_unwind.rs b/src/test/codegen/asm-may_unwind.rs
deleted file mode 100644
index c97933035d1..00000000000
--- a/src/test/codegen/asm-may_unwind.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// compile-flags: -O
-// only-x86_64
-
-#![crate_type = "rlib"]
-#![feature(asm_unwind)]
-
-use std::arch::asm;
-
-#[no_mangle]
-pub extern "C" fn panicky() {}
-
-struct Foo;
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!();
-    }
-}
-
-// CHECK-LABEL: @asm_may_unwind
-#[no_mangle]
-pub unsafe fn asm_may_unwind() {
-    let _m = Foo;
-    // CHECK: invoke void asm sideeffect alignstack inteldialect unwind ""
-    asm!("", options(may_unwind));
-}
-
-// CHECK-LABEL: @asm_with_result_may_unwind
-#[no_mangle]
-pub unsafe fn asm_with_result_may_unwind() -> u64 {
-    let _m = Foo;
-    let res: u64;
-    // CHECK: [[RES:%[0-9]+]] = invoke i64 asm sideeffect alignstack inteldialect unwind
-    // CHECK-NEXT: to label %[[NORMALBB:[a-b0-9]+]]
-    asm!("mov {}, 1", out(reg) res, options(may_unwind));
-    // CHECK: [[NORMALBB]]:
-    // CHECK: ret i64 [[RES:%[0-9]+]]
-    res
-}