Remove deprecated LLVM-style inline assembly
This commit is contained in:
parent
09afd64969
commit
68cbb46913
12
src/asm.rs
12
src/asm.rs
@ -4,7 +4,6 @@ use rustc_codegen_ssa::mir::operand::OperandValue;
|
|||||||
use rustc_codegen_ssa::mir::place::PlaceRef;
|
use rustc_codegen_ssa::mir::place::PlaceRef;
|
||||||
use rustc_codegen_ssa::traits::{AsmBuilderMethods, AsmMethods, BaseTypeMethods, BuilderMethods, GlobalAsmOperandRef, InlineAsmOperandRef};
|
use rustc_codegen_ssa::traits::{AsmBuilderMethods, AsmMethods, BaseTypeMethods, BuilderMethods, GlobalAsmOperandRef, InlineAsmOperandRef};
|
||||||
|
|
||||||
use rustc_hir::LlvmInlineAsmInner;
|
|
||||||
use rustc_middle::{bug, ty::Instance};
|
use rustc_middle::{bug, ty::Instance};
|
||||||
use rustc_span::{Span, Symbol};
|
use rustc_span::{Span, Symbol};
|
||||||
use rustc_target::asm::*;
|
use rustc_target::asm::*;
|
||||||
@ -106,17 +105,6 @@ enum ConstraintOrRegister {
|
|||||||
|
|
||||||
|
|
||||||
impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||||
fn codegen_llvm_inline_asm(&mut self, _ia: &LlvmInlineAsmInner, _outputs: Vec<PlaceRef<'tcx, RValue<'gcc>>>, _inputs: Vec<RValue<'gcc>>, span: Span) -> bool {
|
|
||||||
self.sess().struct_span_err(span, "GCC backend does not support `llvm_asm!`")
|
|
||||||
.help("consider using the `asm!` macro instead")
|
|
||||||
.emit();
|
|
||||||
|
|
||||||
// We return `true` even if we've failed to generate the asm
|
|
||||||
// because we want to suppress the "malformed inline assembly" error
|
|
||||||
// generated by the frontend.
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
fn codegen_inline_asm(&mut self, template: &[InlineAsmTemplatePiece], rust_operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, span: &[Span], _instance: Instance<'_>, _dest_catch_funclet: Option<(Self::BasicBlock, Self::BasicBlock, Option<&Self::Funclet>)>) {
|
fn codegen_inline_asm(&mut self, template: &[InlineAsmTemplatePiece], rust_operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, span: &[Span], _instance: Instance<'_>, _dest_catch_funclet: Option<(Self::BasicBlock, Self::BasicBlock, Option<&Self::Funclet>)>) {
|
||||||
if options.contains(InlineAsmOptions::MAY_UNWIND) {
|
if options.contains(InlineAsmOptions::MAY_UNWIND) {
|
||||||
self.sess()
|
self.sess()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user