Auto merge of #68404 - Amanieu:llvm-asm, r=estebank
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
This commit is contained in:
commit
6c19a10e24
136 changed files with 634 additions and 588 deletions
|
|
@ -66,7 +66,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
bx
|
||||
}
|
||||
mir::StatementKind::InlineAsm(ref asm) => {
|
||||
mir::StatementKind::LlvmInlineAsm(ref asm) => {
|
||||
let outputs = asm
|
||||
.outputs
|
||||
.iter()
|
||||
|
|
@ -93,7 +93,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
);
|
||||
|
||||
if input_vals.len() == asm.inputs.len() {
|
||||
let res = bx.codegen_inline_asm(
|
||||
let res = bx.codegen_llvm_inline_asm(
|
||||
&asm.asm,
|
||||
outputs,
|
||||
input_vals,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
use super::BackendTypes;
|
||||
use crate::mir::place::PlaceRef;
|
||||
use rustc_hir::{GlobalAsm, InlineAsmInner};
|
||||
use rustc_hir::{GlobalAsm, LlvmInlineAsmInner};
|
||||
use rustc_span::Span;
|
||||
|
||||
pub trait AsmBuilderMethods<'tcx>: BackendTypes {
|
||||
/// Take an inline assembly expression and splat it out via LLVM
|
||||
fn codegen_inline_asm(
|
||||
fn codegen_llvm_inline_asm(
|
||||
&mut self,
|
||||
ia: &InlineAsmInner,
|
||||
ia: &LlvmInlineAsmInner,
|
||||
outputs: Vec<PlaceRef<'tcx, Self::Value>>,
|
||||
inputs: Vec<Self::Value>,
|
||||
span: Span,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue