LLVM  4.0.0
Macros | Typedefs | Enumerations | Functions | Variables
AMDGPUAsmParser.cpp File Reference
#include "AMDKernelCodeT.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "MCTargetDesc/AMDGPUTargetStreamer.h"
#include "SIDefines.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "Utils/AMDKernelCodeTUtils.h"
#include "Utils/AMDGPUAsmUtils.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/MachineValueType.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ELF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/TargetRegistry.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "AMDGPUGenAsmMatcher.inc"
Include dependency graph for AMDGPUAsmParser.cpp:

Go to the source code of this file.

Macros

#define GET_REGISTER_MATCHER
 
#define GET_MATCHER_IMPLEMENTATION
 
Auto-generated Match Functions

{

#define GET_ASSEMBLER_HEADER
 

Typedefs

typedef std::map< enum
AMDGPUOperand::ImmTy, unsigned
OptionalImmIndexMap
 

Enumerations

enum  RegisterKind
 

Functions

static const fltSemanticsgetFltSemantics (unsigned Size)
 
static const fltSemanticsgetFltSemantics (MVT VT)
 
static bool canLosslesslyConvertToFPType (APFloat &FPLiteral, MVT VT)
 
static int getRegClass (RegisterKind Is, unsigned RegWidth)
 
static unsigned getSpecialRegForName (StringRef RegName)
 
void addOptionalImmOperand (MCInst &Inst, const OperandVector &Operands, OptionalImmIndexMap &OptionalIdx, enum AMDGPUOperand::ImmTy ImmT, int64_t Default=0)
 
static bool ConvertOmodMul (int64_t &Mul)
 
static bool ConvertOmodDiv (int64_t &Div)
 
static bool ConvertBoundCtrl (int64_t &BoundCtrl)
 
static bool isRegOrImmWithInputMods (const MCInstrDesc &Desc, unsigned OpNum)
 
void LLVMInitializeAMDGPUAsmParser ()
 Force static initialization. More...
 

Variables

static const OptionalOperand AMDGPUOptionalOperandTable []
 

Macro Definition Documentation

#define GET_ASSEMBLER_HEADER

Definition at line 749 of file AMDGPUAsmParser.cpp.

#define GET_MATCHER_IMPLEMENTATION

Definition at line 3625 of file AMDGPUAsmParser.cpp.

#define GET_REGISTER_MATCHER

Definition at line 3624 of file AMDGPUAsmParser.cpp.

Typedef Documentation

typedef std::map<enum AMDGPUOperand::ImmTy, unsigned> OptionalImmIndexMap

Definition at line 2260 of file AMDGPUAsmParser.cpp.

Enumeration Type Documentation

Definition at line 68 of file AMDGPUAsmParser.cpp.

Function Documentation

void addOptionalImmOperand ( MCInst Inst,
const OperandVector Operands,
OptionalImmIndexMap OptionalIdx,
enum AMDGPUOperand::ImmTy  ImmT,
int64_t  Default = 0 
)

Definition at line 2262 of file AMDGPUAsmParser.cpp.

References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and i.

static bool canLosslesslyConvertToFPType ( APFloat FPLiteral,
MVT  VT 
)
static

Definition at line 995 of file AMDGPUAsmParser.cpp.

References llvm::Literal.

static bool ConvertBoundCtrl ( int64_t &  BoundCtrl)
static

Definition at line 3132 of file AMDGPUAsmParser.cpp.

static bool ConvertOmodDiv ( int64_t &  Div)
static

Definition at line 3118 of file AMDGPUAsmParser.cpp.

static bool ConvertOmodMul ( int64_t &  Mul)
static

Definition at line 3110 of file AMDGPUAsmParser.cpp.

static const fltSemantics* getFltSemantics ( unsigned  Size)
static

Definition at line 974 of file AMDGPUAsmParser.cpp.

static const fltSemantics* getFltSemantics ( MVT  VT)
static

Definition at line 987 of file AMDGPUAsmParser.cpp.

static int getRegClass ( RegisterKind  Is,
unsigned  RegWidth 
)
static
static unsigned getSpecialRegForName ( StringRef  RegName)
static
static bool isRegOrImmWithInputMods ( const MCInstrDesc Desc,
unsigned  OpNum 
)
static
void LLVMInitializeAMDGPUAsmParser ( )

Force static initialization.

Definition at line 3619 of file AMDGPUAsmParser.cpp.

References A, B, llvm::getTheAMDGPUTarget(), and llvm::getTheGCNTarget().

Variable Documentation

const OptionalOperand AMDGPUOptionalOperandTable[]
static
Initial value:
= {
{"offen", AMDGPUOperand::ImmTyOffen, true, nullptr},
{"idxen", AMDGPUOperand::ImmTyIdxen, true, nullptr},
{"addr64", AMDGPUOperand::ImmTyAddr64, true, nullptr},
{"offset0", AMDGPUOperand::ImmTyOffset0, false, nullptr},
{"offset1", AMDGPUOperand::ImmTyOffset1, false, nullptr},
{"gds", AMDGPUOperand::ImmTyGDS, true, nullptr},
{"offset", AMDGPUOperand::ImmTyOffset, false, nullptr},
{"glc", AMDGPUOperand::ImmTyGLC, true, nullptr},
{"slc", AMDGPUOperand::ImmTySLC, true, nullptr},
{"tfe", AMDGPUOperand::ImmTyTFE, true, nullptr},
{"clamp", AMDGPUOperand::ImmTyClampSI, true, nullptr},
{"omod", AMDGPUOperand::ImmTyOModSI, false, ConvertOmodMul},
{"unorm", AMDGPUOperand::ImmTyUNorm, true, nullptr},
{"da", AMDGPUOperand::ImmTyDA, true, nullptr},
{"r128", AMDGPUOperand::ImmTyR128, true, nullptr},
{"lwe", AMDGPUOperand::ImmTyLWE, true, nullptr},
{"dmask", AMDGPUOperand::ImmTyDMask, false, nullptr},
{"row_mask", AMDGPUOperand::ImmTyDppRowMask, false, nullptr},
{"bank_mask", AMDGPUOperand::ImmTyDppBankMask, false, nullptr},
{"bound_ctrl", AMDGPUOperand::ImmTyDppBoundCtrl, false, ConvertBoundCtrl},
{"dst_sel", AMDGPUOperand::ImmTySdwaDstSel, false, nullptr},
{"src0_sel", AMDGPUOperand::ImmTySdwaSrc0Sel, false, nullptr},
{"src1_sel", AMDGPUOperand::ImmTySdwaSrc1Sel, false, nullptr},
{"dst_unused", AMDGPUOperand::ImmTySdwaDstUnused, false, nullptr},
{"vm", AMDGPUOperand::ImmTyExpVM, true, nullptr},
}
static bool ConvertBoundCtrl(int64_t &BoundCtrl)
static bool ConvertOmodMul(int64_t &Mul)

Definition at line 3147 of file AMDGPUAsmParser.cpp.