mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 21:34:23 +00:00
e88f55254c
target-specific AsmLexer, and added the appropriate registration calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94275 91177308-0d34-0410-b5e6-96231b3b80d8
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
//===-- X86AsmLexer.cpp - Tokenize X86 assembly to AsmTokens --------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Target/TargetAsmLexer.h"
|
|
#include "llvm/Target/TargetRegistry.h"
|
|
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
|
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
|
|
#include "X86.h"
|
|
|
|
using namespace llvm;
|
|
|
|
namespace {
|
|
|
|
class X86AsmLexer : public TargetAsmLexer {
|
|
const MCAsmInfo &AsmInfo;
|
|
protected:
|
|
AsmToken LexToken();
|
|
public:
|
|
X86AsmLexer(const Target &T, const MCAsmInfo &MAI)
|
|
: TargetAsmLexer(T), AsmInfo(MAI) {
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
AsmToken X86AsmLexer::LexToken() {
|
|
return AsmToken(AsmToken::Error, "", 0);
|
|
}
|
|
|
|
extern "C" void LLVMInitializeX86AsmLexer() {
|
|
RegisterAsmLexer<X86AsmLexer> X(TheX86_32Target);
|
|
RegisterAsmLexer<X86AsmLexer> Y(TheX86_64Target);
|
|
}
|
|
|
|
//#define REGISTERS_ONLY
|
|
//#include "../X86GenAsmMatcher.inc"
|
|
//#undef REGISTERS_ONLY
|