diff options
| author | bors <bors@rust-lang.org> | 2022-04-11 21:55:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-11 21:55:58 +0000 |
| commit | de392c7d31602ddf0fae1143c5ad822a1abe89df (patch) | |
| tree | 5e44c98e2051ad629f9674394ddc01c0beac6b98 /src/test/codegen | |
| parent | 90ca44752a79dd414d9a0ccf7a74533a99080988 (diff) | |
| parent | 070e8ed18da9263f3b9aa0950accad7059778ab7 (diff) | |
| download | rust-de392c7d31602ddf0fae1143c5ad822a1abe89df.tar.gz rust-de392c7d31602ddf0fae1143c5ad822a1abe89df.zip | |
Auto merge of #95944 - Dylan-DPC:rollup-idggkrh, r=Dylan-DPC
Rollup of 7 pull requests
Successful merges:
- #95008 ([`let_chains`] Forbid `let` inside parentheses)
- #95801 (Replace RwLock by a futex based one on Linux)
- #95864 (Fix miscompilation of inline assembly with outputs in cases where we emit an invoke instead of call instruction.)
- #95894 (Fix formatting error in pin.rs docs)
- #95895 (Clarify str::from_utf8_unchecked's invariants)
- #95901 (Remove duplicate aliases for `check codegen_{cranelift,gcc}` and fix `build codegen_gcc`)
- #95927 (CI: do not compile libcore twice when performing LLVM PGO)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/asm-may_unwind.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/test/codegen/asm-may_unwind.rs b/src/test/codegen/asm-may_unwind.rs index 3b34d79c3a9..bf4202764a7 100644 --- a/src/test/codegen/asm-may_unwind.rs +++ b/src/test/codegen/asm-may_unwind.rs @@ -18,10 +18,23 @@ impl Drop for Foo { } } -// CHECK-LABEL: @may_unwind +// CHECK-LABEL: @asm_may_unwind #[no_mangle] -pub unsafe fn may_unwind() { +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 +} |
