aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/AsmParser/X86AsmParser.cpp
blob: b5f6ce608ddabae73608b5a7e434b143649f5241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//===-- X86AsmParser.cpp - Parse X86 assembly to MCInst instructions ------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "X86.h"
#include "llvm/MC/MCAsmParser.h"
#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetAsmParser.h"
using namespace llvm;

namespace {

class X86ATTAsmParser : public TargetAsmParser {
 public:
  explicit X86ATTAsmParser(const Target &);

  virtual bool ParseInstruction(MCAsmParser &AP, const char *Name, 
                                MCInst &Inst);
};

}

X86ATTAsmParser::X86ATTAsmParser(const Target &T) 
  : TargetAsmParser(T)
{
}

bool X86ATTAsmParser::ParseInstruction(MCAsmParser &AP, const char *Name, 
                                       MCInst &Inst) {
  return true;
}

namespace {
  TargetAsmParser *createAsmParser(const Target &T) {
    return new X86ATTAsmParser(T);
  }
}

// Force static initialization.
extern "C" void LLVMInitializeX86AsmParser() {
  TargetRegistry::RegisterAsmParser(TheX86_32Target, &createAsmParser);
  TargetRegistry::RegisterAsmParser(TheX86_64Target, &createAsmParser);
}