blob: b5f6ce608ddabae73608b5a7e434b143649f5241 [file] [log] [blame]
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +00001//===-- X86AsmParser.cpp - Parse X86 assembly to MCInst instructions ------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Daniel Dunbar0b0441e2009-07-18 23:03:22 +000010#include "X86.h"
Daniel Dunbar4b0f4ef2009-07-20 18:55:04 +000011#include "llvm/MC/MCAsmParser.h"
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +000012#include "llvm/Target/TargetRegistry.h"
13#include "llvm/Target/TargetAsmParser.h"
14using namespace llvm;
15
16namespace {
17
18class X86ATTAsmParser : public TargetAsmParser {
19 public:
20 explicit X86ATTAsmParser(const Target &);
Daniel Dunbar4b0f4ef2009-07-20 18:55:04 +000021
22 virtual bool ParseInstruction(MCAsmParser &AP, const char *Name,
23 MCInst &Inst);
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +000024};
25
26}
27
28X86ATTAsmParser::X86ATTAsmParser(const Target &T)
29 : TargetAsmParser(T)
30{
31}
32
Daniel Dunbar4b0f4ef2009-07-20 18:55:04 +000033bool X86ATTAsmParser::ParseInstruction(MCAsmParser &AP, const char *Name,
34 MCInst &Inst) {
35 return true;
36}
37
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +000038namespace {
39 TargetAsmParser *createAsmParser(const Target &T) {
40 return new X86ATTAsmParser(T);
41 }
42}
43
44// Force static initialization.
45extern "C" void LLVMInitializeX86AsmParser() {
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +000046 TargetRegistry::RegisterAsmParser(TheX86_32Target, &createAsmParser);
Daniel Dunbarc7df3cb2009-07-17 20:42:00 +000047 TargetRegistry::RegisterAsmParser(TheX86_64Target, &createAsmParser);
48}