LLVM API Documentation
#include "llvm/MC/MCAssembler.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/MC/MCSectionELF.h"
#include <tuple>
Go to the source code of this file.
Namespaces | |
namespace | stats |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
Defines | |
#define | DEBUG_TYPE "assembler" |
Functions | |
static bool | getLabelOffset (const MCAsmLayout &Layout, const MCSymbolData &SD, bool ReportError, uint64_t &Val) |
static bool | getSymbolOffsetImpl (const MCAsmLayout &Layout, const MCSymbolData *SD, bool ReportError, uint64_t &Val) |
static bool | evaluate (const MCExpr &Expr, const MCAsmLayout &Layout, const MCFixup &Fixup, MCValue &Target) |
static void | writeFragmentContents (const MCFragment &F, MCObjectWriter *OW) |
Write the contents of a fragment to the given object writer. Expects a MCEncodedFragment. | |
static void | writeFragment (const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment &F) |
Write the fragment F to the output file. | |
raw_ostream & | llvm::operator<< (raw_ostream &OS, const MCFixup &AF) |
#define DEBUG_TYPE "assembler" |
Definition at line 34 of file MCAssembler.cpp.
static bool evaluate | ( | const MCExpr & | Expr, |
const MCAsmLayout & | Layout, | ||
const MCFixup & | Fixup, | ||
MCValue & | Target | ||
) | [static] |
Definition at line 445 of file MCAssembler.cpp.
References llvm::MCExpr::EvaluateAsRelocatable(), llvm::MCExpr::EvaluateAsValue(), and llvm::MCValue::isAbsolute().
static bool getLabelOffset | ( | const MCAsmLayout & | Layout, |
const MCSymbolData & | SD, | ||
bool | ReportError, | ||
uint64_t & | Val | ||
) | [static] |
Definition at line 122 of file MCAssembler.cpp.
References llvm::MCSymbolData::getFragment(), llvm::MCAsmLayout::getFragmentOffset(), llvm::MCSymbol::getName(), llvm::MCSymbolData::getOffset(), llvm::MCSymbolData::getSymbol(), and llvm::report_fatal_error().
Referenced by getSymbolOffsetImpl().
static bool getSymbolOffsetImpl | ( | const MCAsmLayout & | Layout, |
const MCSymbolData * | SD, | ||
bool | ReportError, | ||
uint64_t & | Val | ||
) | [static] |
Definition at line 134 of file MCAssembler.cpp.
References llvm::ARM_PROC::A, llvm::HexStyle::Asm, llvm::MCExpr::EvaluateAsValue(), llvm::MCAsmLayout::getAssembler(), llvm::MCValue::getConstant(), getLabelOffset(), llvm::MCSymbol::getName(), llvm::MCValue::getSymA(), llvm::MCValue::getSymB(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MCSymbolData::getSymbol(), llvm::MCAssembler::getSymbolData(), llvm::MCSymbol::getVariableValue(), llvm::MCSymbol::isVariable(), and llvm::report_fatal_error().
Referenced by llvm::MCAsmLayout::getSymbolOffset().
static void writeFragment | ( | const MCAssembler & | Asm, |
const MCAsmLayout & | Layout, | ||
const MCFragment & | F | ||
) | [static] |
Write the fragment F
to the output file.
Definition at line 639 of file MCAssembler.cpp.
References llvm::MCFragment::alignToBundleEnd(), llvm::MCAssembler::computeFragmentSize(), F(), llvm::MCFragment::FT_Align, llvm::MCFragment::FT_CompactEncodedInst, llvm::MCFragment::FT_Data, llvm::MCFragment::FT_Dwarf, llvm::MCFragment::FT_DwarfFrame, llvm::MCFragment::FT_Fill, llvm::MCFragment::FT_LEB, llvm::MCFragment::FT_Org, llvm::MCFragment::FT_Relaxable, llvm::MCAssembler::getBackend(), llvm::MCAssembler::getBundleAlignSize(), llvm::MCFragment::getBundlePadding(), llvm::MCLEBFragment::getContents(), llvm::MCDwarfLineAddrFragment::getContents(), llvm::MCDwarfCallFrameFragment::getContents(), llvm::MCFragment::getKind(), llvm::MCFillFragment::getSize(), llvm::MCObjectWriter::getStream(), llvm::MCAlignFragment::getValue(), llvm::MCFillFragment::getValue(), llvm::MCOrgFragment::getValue(), llvm::MCAlignFragment::getValueSize(), llvm::MCFillFragment::getValueSize(), llvm::MCAssembler::getWriter(), llvm::MCAlignFragment::hasEmitNops(), llvm::MCFragment::hasInstructions(), llvm::MCAssembler::isBundlingEnabled(), llvm_unreachable, llvm::report_fatal_error(), llvm::SmallString< InternalLen >::str(), llvm::raw_ostream::tell(), llvm::MCObjectWriter::Write16(), llvm::MCObjectWriter::Write32(), llvm::MCObjectWriter::Write64(), llvm::MCObjectWriter::Write8(), llvm::MCObjectWriter::WriteBytes(), writeFragmentContents(), and llvm::MCAsmBackend::writeNopData().
Referenced by llvm::MCAssembler::writeSectionData().
static void writeFragmentContents | ( | const MCFragment & | F, |
MCObjectWriter * | OW | ||
) | [static] |
Write the contents of a fragment to the given object writer. Expects a MCEncodedFragment.
Definition at line 633 of file MCAssembler.cpp.
References F(), llvm::MCEncodedFragment::getContents(), and llvm::MCObjectWriter::WriteBytes().
Referenced by writeFragment().