1 use super::BackendTypes
;
2 use crate::mir
::operand
::OperandRef
;
3 use crate::mir
::place
::PlaceRef
;
4 use rustc_ast
::{InlineAsmOptions, InlineAsmTemplatePiece}
;
5 use rustc_hir
::def_id
::DefId
;
6 use rustc_hir
::{GlobalAsm, LlvmInlineAsmInner}
;
7 use rustc_middle
::ty
::Instance
;
9 use rustc_target
::asm
::InlineAsmRegOrRegClass
;
12 pub enum InlineAsmOperandRef
<'tcx
, B
: BackendTypes
+ ?Sized
> {
14 reg
: InlineAsmRegOrRegClass
,
15 value
: OperandRef
<'tcx
, B
::Value
>,
18 reg
: InlineAsmRegOrRegClass
,
20 place
: Option
<PlaceRef
<'tcx
, B
::Value
>>,
23 reg
: InlineAsmRegOrRegClass
,
25 in_value
: OperandRef
<'tcx
, B
::Value
>,
26 out_place
: Option
<PlaceRef
<'tcx
, B
::Value
>>,
32 instance
: Instance
<'tcx
>,
39 pub trait AsmBuilderMethods
<'tcx
>: BackendTypes
{
40 /// Take an inline assembly expression and splat it out via LLVM
41 fn codegen_llvm_inline_asm(
43 ia
: &LlvmInlineAsmInner
,
44 outputs
: Vec
<PlaceRef
<'tcx
, Self::Value
>>,
45 inputs
: Vec
<Self::Value
>,
49 /// Take an inline assembly expression and splat it out via LLVM
50 fn codegen_inline_asm(
52 template
: &[InlineAsmTemplatePiece
],
53 operands
: &[InlineAsmOperandRef
<'tcx
, Self>],
54 options
: InlineAsmOptions
,
59 pub trait AsmMethods
{
60 fn codegen_global_asm(&self, ga
: &GlobalAsm
);