Skip to content

Commit

Permalink
Auto merge of rust-lang#92816 - tmiasko:rm-llvm-asm, r=Amanieu
Browse files Browse the repository at this point in the history
Remove deprecated LLVM-style inline assembly

The `llvm_asm!` was deprecated back in rust-lang#87590 1.56.0, with intention to remove
it once `asm!` was stabilized, which already happened in rust-lang#91728 1.59.0. Now it
is time to remove `llvm_asm!` to avoid continued maintenance cost.

Closes rust-lang#70173.
Closes rust-lang#92794.
Closes rust-lang#87612.
Closes rust-lang#82065.

cc `@rust-lang/wg-inline-asm`

r? `@Amanieu`
  • Loading branch information
bors committed Jan 17, 2022
2 parents eef3530 + 7ec4de3 commit 0b58e52
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,18 +749,6 @@ fn codegen_stmt<'tcx>(
| StatementKind::Retag { .. }
| StatementKind::AscribeUserType(..) => {}

StatementKind::LlvmInlineAsm(asm) => {
match asm.asm.asm.as_str().trim() {
"" => {
// Black box
}
_ => fx.tcx.sess.span_fatal(
stmt.source_info.span,
"Legacy `llvm_asm!` inline assembly is not supported. \
Try using the new `asm!` instead.",
),
}
}
StatementKind::Coverage { .. } => fx.tcx.sess.fatal("-Zcoverage is unimplemented"),
StatementKind::CopyNonOverlapping(inner) => {
let dst = codegen_operand(fx, &inner.dst);
Expand Down
2 changes: 1 addition & 1 deletion src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
{
return None;
}
StatementKind::LlvmInlineAsm(_) | StatementKind::CopyNonOverlapping(_) => {
StatementKind::CopyNonOverlapping(_) => {
return None;
} // conservative handling
StatementKind::Assign(_)
Expand Down

0 comments on commit 0b58e52

Please sign in to comment.