llvm::MCD::fieldFromInstruction

fieldFromInstruction overloads

Synopses

Declared in <llvm/MC/MCDecoder.h>

Extract a span of bits from a non-integral instruction representation.

template<typename InsnType>
uint64_t
fieldFromInstruction(
    InsnType const& Insn,
    unsigned int StartBit,
    unsigned int NumBits)
requires !std::is_integral_v<InsnType>;
» more...

Extract a span of bits from an integral instruction word.

template<typename IntType>
IntType
fieldFromInstruction(
    IntType const& Insn,
    unsigned int StartBit,
    unsigned int NumBits)
requires std::is_integral_v<IntType>;
» more...

Extract a span of bits from a std::bitset instruction encoding.

template<size_t N>
uint64_t
fieldFromInstruction(
    std::bitset<N> const& Insn,
    unsigned int StartBit,
    unsigned int NumBits);
» more...

Return Value

  • The extracted field as a zero-extended 64-bit value.
  • The extracted field as an integer of type IntType.

Parameters

NameDescription
Insn- Instruction object supporting extractBitsAsZExtValue.
StartBit- Index of the least significant bit of the field.
NumBits- Width of the field in bits.