LLVM: lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp File Reference (original) (raw)
Go to the source code of this file.
| Macros | |
|---|---|
| #define | DEBUG_TYPE "mccodeemitter" |
| Enumerations | |
|---|---|
| enum | GlobalOffsetTableExprKind { GOT_None, GOT_Normal, GOT_SymDiff } |
| Functions | |
|---|---|
| static uint8_t | modRMByte (unsigned Mod, unsigned RegOpcode, unsigned RM) |
| static void | emitConstant (uint64_t Val, unsigned Size, SmallVectorImpl< char > &CB) |
| static bool | isDispOrCDisp8 (uint64_t TSFlags, int Value, int &ImmOffset) |
| Determine if this immediate can fit in a disp8 or a compressed disp8 for EVEX instructions. | |
| static MCFixupKind | getImmFixupKind (uint64_t TSFlags) |
| static GlobalOffsetTableExprKind | startsWithGlobalOffsetTable (const MCExpr *Expr) |
| Check if this expression starts with GLOBAL_OFFSET_TABLE and if it is of the form _GLOBAL_OFFSET_TABLE_-symbol. | |
| static bool | hasSecRelSymbolRef (const MCExpr *Expr) |
| static bool | isPCRel32Branch (const MCInst &MI, const MCInstrInfo &MCII) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "mccodeemitter"
◆ GlobalOffsetTableExprKind
◆ emitConstant()
◆ getImmFixupKind()
◆ hasSecRelSymbolRef()
◆ isDispOrCDisp8()
| bool isDispOrCDisp8 ( uint64_t TSFlags, int Value, int & ImmOffset ) | static |
|---|
◆ isPCRel32Branch()
◆ modRMByte()
◆ startsWithGlobalOffsetTable()
Check if this expression starts with GLOBAL_OFFSET_TABLE and if it is of the form _GLOBAL_OFFSET_TABLE_-symbol.
This is needed to support PIC on ELF i386 as GLOBAL_OFFSET_TABLE is magical. We check only simple case that are know to be used: GLOBAL_OFFSET_TABLE by itself or at the start of a binary expression.
TODO: Move this to X86AsmBackend.cpp at relocation decision phase so that we don't have to mess with MCExpr.
Definition at line 477 of file X86MCCodeEmitter.cpp.
References llvm::MCExpr::Binary, llvm::MCExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCSymbol::getName(), llvm::MCBinaryExpr::getRHS(), GOT_None, GOT_Normal, GOT_SymDiff, llvm::Ref, RHS, and llvm::MCExpr::SymbolRef.