Skip to main content Module asm Copy item path Source use std::assert_matches ; π use std::fmt::Write ; π use rustc_abi::BackendRepr ; π use rustc_abi::Endian ; π use rustc_abi::Float ; π use rustc_abi::Integer ; π use rustc_abi::Primitive ; π use rustc_abi::Scalar ; π use rustc_abi::Size ; π use rustc_ast::InlineAsmOptions ; π use rustc_ast::InlineAsmTemplatePiece ; π use rustc_codegen_ssa::mir::operand::OperandValue ; π use rustc_data_structures::fx::FxHashMap ; π use rustc_middle::mir::interpret::PointerArithmetic ; π use rustc_middle::mir::interpret::Scalar as ConstScalar; π use rustc_middle::ty::Instance ; π use rustc_middle::ty::layout::TyAndLayout ; π use rustc_session::Session ; π use rustc_session::config::Lto ; π use rustc_span::Pos ; π use rustc_span::Span ; π use rustc_span::Symbol ; π use rustc_span::bug ; π use rustc_span::span_bug ; π use rustc_span::sym ; π use rustc_target::spec::HasTargetSpec ; π use smallvec::SmallVec ; π use tracing::debug ; π use crate::builder::Builder ; π use crate::common::Funclet ; π use crate::context::CodegenCx ; π use crate::llvm ; π use crate::llvm::ToLlvmBool ; π use crate::llvm::Type ; π use crate::llvm::Value ; π use crate::type_of::LayoutLlvmExt ; π use crate::attributes ; π use crate::llvm_util ; π use rustc_codegen_ssa::traits ::*; π use rustc_target::asm ::*; π a64_reg_index π If the register is an AArch64 integer register then return its index. a64_vreg_index π If the register is an AArch64 vector register then return its index. allow_raw_span_inline_asm_srcloc π Whenever inline assembly bitcode is built, its srcloc contains the raw span numbers
as location cookies. This is problematic since that is nondeterministic when using
the parallel frontend. Even without parallelism, the cookies are meaningless in another
rustc session. any_target_feature_enabled π dummy_output_type π Type to use for outputs that are discarded. It doesnβt really matter what
the type is, as long as it is valid for the constraint code. hexagon_reg_pair_index π If the register is a Hexagon register pair then return its LLVM double register index.
LLVM uses d0, d1, β¦ for Hexagon double registers in inline asm constraints,
not the assembly-printed r1:0, r3:2, β¦ format. hexagon_vreg_pair_index π If the register is a Hexagon HVX vector pair then return its LLVM W-register index.
LLVM uses w0, w1, β¦ for Hexagon vector pair registers in inline asm constraints. inline_asm_call π llvm_asm_scalar_type π Helper function to get the LLVM type for a Scalar. Pointers are returned as
the equivalent integer type. llvm_fixup_input π Fix up an input value to work around LLVM bugs. llvm_fixup_output π Fix up an output value to work around LLVM bugs. llvm_fixup_output_type π Output type to use for llvm_fixup_output. modifier_to_llvm π Converts a modifier into LLVMβs equivalent modifier. reg_to_llvm π Converts a register class to an LLVM constraint code. xmm_reg_index π If the register is an xmm/ymm/zmm register then return its index.