#include "MCTargetDesc/SystemZInstPrinter.h"
#include "MCTargetDesc/SystemZMCAsmInfo.h"
#include "MCTargetDesc/SystemZMCTargetDesc.h"
#include "SystemZTargetStreamer.h"
#include "TargetInfo/SystemZTargetInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstBuilder.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/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SMLoc.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <string>
usingnamespacellvm;
static bool inRange(const MCExpr *Expr, int64_t MinValue, int64_t MaxValue,
bool AllowSymbol = false) { … }
namespace {
enum RegisterKind { … };
enum MemoryKind { … };
class SystemZOperand : public MCParsedAsmOperand { … };
class SystemZAsmParser : public MCTargetAsmParser { … };
}
#define GET_REGISTER_MATCHER
#define GET_SUBTARGET_FEATURE_NAME
#define GET_MATCHER_IMPLEMENTATION
#define GET_MNEMONIC_SPELL_CHECKER
#include "SystemZGenAsmMatcher.inc"
struct InsnMatchEntry { … };
struct CompareInsn { … };
static struct InsnMatchEntry InsnMatchTable[] = …;
static void printMCExpr(const MCExpr *E, raw_ostream &OS) { … }
void SystemZOperand::print(raw_ostream &OS) const { … }
bool SystemZAsmParser::parseRegister(Register &Reg, bool RequirePercent,
bool RestoreOnFailure) { … }
ParseStatus SystemZAsmParser::parseRegister(OperandVector &Operands,
RegisterKind Kind) { … }
ParseStatus SystemZAsmParser::parseAnyRegister(OperandVector &Operands) { … }
bool SystemZAsmParser::parseIntegerRegister(Register &Reg,
RegisterGroup Group) { … }
bool SystemZAsmParser::parseAddress(bool &HaveReg1, Register &Reg1,
bool &HaveReg2, Register &Reg2,
const MCExpr *&Disp, const MCExpr *&Length,
bool HasLength, bool HasVectorIndex) { … }
bool
SystemZAsmParser::parseAddressRegister(Register &Reg) { … }
ParseStatus SystemZAsmParser::parseAddress(OperandVector &Operands,
MemoryKind MemKind,
RegisterKind RegKind) { … }
ParseStatus SystemZAsmParser::parseDirective(AsmToken DirectiveID) { … }
bool SystemZAsmParser::ParseDirectiveInsn(SMLoc L) { … }
bool SystemZAsmParser::ParseDirectiveMachine(SMLoc L) { … }
bool SystemZAsmParser::ParseGNUAttribute(SMLoc L) { … }
bool SystemZAsmParser::ParseRegister(MCRegister &RegNo, SMLoc &StartLoc,
SMLoc &EndLoc, bool RequirePercent,
bool RestoreOnFailure) { … }
bool SystemZAsmParser::parseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
ParseStatus SystemZAsmParser::tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) { … }
bool SystemZAsmParser::ParseInstruction(ParseInstructionInfo &Info,
StringRef Name, SMLoc NameLoc,
OperandVector &Operands) { … }
bool SystemZAsmParser::parseOperand(OperandVector &Operands,
StringRef Mnemonic) { … }
bool SystemZAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
OperandVector &Operands,
MCStreamer &Out,
uint64_t &ErrorInfo,
bool MatchingInlineAsm) { … }
ParseStatus SystemZAsmParser::parsePCRel(OperandVector &Operands,
int64_t MinVal, int64_t MaxVal,
bool AllowTLS) { … }
bool SystemZAsmParser::isLabel(AsmToken &Token) { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZAsmParser() { … }