llvm.org GIT mirror llvm / 6af228a
Remove MCTargetAsmLexer and its derived classes now that edis, its only user, is gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170699 91177308-0d34-0410-b5e6-96231b3b80d8 Roman Divacky 7 years ago
15 changed file(s) with 0 addition(s) and 593 deletion(s). Raw diff Collapse all Expand all
3232
3333 // Real values.
3434 Real,
35
36 // Register values (stored in IntVal). Only used by MCTargetAsmLexer.
37 Register,
3835
3936 // No-value.
4037 EndOfStatement,
10299 int64_t getIntVal() const {
103100 assert(Kind == Integer && "This token isn't an integer!");
104101 return IntVal;
105 }
106
107 /// getRegVal - Get the register number for the current token, which should
108 /// be a register.
109 unsigned getRegVal() const {
110 assert(Kind == Register && "This token isn't a register!");
111 return static_cast(IntVal);
112102 }
113103 };
114104
+0
-89
include/llvm/MC/MCTargetAsmLexer.h less more
None //===-- llvm/MC/MCTargetAsmLexer.h - Target Assembly Lexer ------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_MC_MCTARGETASMLEXER_H
10 #define LLVM_MC_MCTARGETASMLEXER_H
11
12 #include "llvm/MC/MCParser/MCAsmLexer.h"
13
14 namespace llvm {
15 class Target;
16
17 /// MCTargetAsmLexer - Generic interface to target specific assembly lexers.
18 class MCTargetAsmLexer {
19 /// The current token
20 AsmToken CurTok;
21
22 /// The location and description of the current error
23 SMLoc ErrLoc;
24 std::string Err;
25
26 MCTargetAsmLexer(const MCTargetAsmLexer &) LLVM_DELETED_FUNCTION;
27 void operator=(const MCTargetAsmLexer &) LLVM_DELETED_FUNCTION;
28 protected: // Can only create subclasses.
29 MCTargetAsmLexer(const Target &);
30
31 virtual AsmToken LexToken() = 0;
32
33 void SetError(const SMLoc &errLoc, const std::string &err) {
34 ErrLoc = errLoc;
35 Err = err;
36 }
37
38 /// TheTarget - The Target that this machine was created for.
39 const Target &TheTarget;
40 MCAsmLexer *Lexer;
41
42 public:
43 virtual ~MCTargetAsmLexer();
44
45 const Target &getTarget() const { return TheTarget; }
46
47 /// InstallLexer - Set the lexer to get tokens from lower-level lexer \p L.
48 void InstallLexer(MCAsmLexer &L) {
49 Lexer = &L;
50 }
51
52 MCAsmLexer *getLexer() {
53 return Lexer;
54 }
55
56 /// Lex - Consume the next token from the input stream and return it.
57 const AsmToken &Lex() {
58 return CurTok = LexToken();
59 }
60
61 /// getTok - Get the current (last) lexed token.
62 const AsmToken &getTok() {
63 return CurTok;
64 }
65
66 /// getErrLoc - Get the current error location
67 const SMLoc &getErrLoc() {
68 return ErrLoc;
69 }
70
71 /// getErr - Get the current error string
72 const std::string &getErr() {
73 return Err;
74 }
75
76 /// getKind - Get the kind of current token.
77 AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
78
79 /// is - Check if the current token has kind \p K.
80 bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
81
82 /// isNot - Check if the current token has kind \p K.
83 bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
84 };
85
86 } // End llvm namespace
87
88 #endif
4040 class MCRegisterInfo;
4141 class MCStreamer;
4242 class MCSubtargetInfo;
43 class MCTargetAsmLexer;
4443 class MCTargetAsmParser;
4544 class TargetMachine;
4645 class TargetOptions;
9594 typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T,
9695 StringRef TT,
9796 StringRef CPU);
98 typedef MCTargetAsmLexer *(*MCAsmLexerCtorTy)(const Target &T,
99 const MCRegisterInfo &MRI,
100 const MCAsmInfo &MAI);
10197 typedef MCTargetAsmParser *(*MCAsmParserCtorTy)(MCSubtargetInfo &STI,
10298 MCAsmParser &P);
10399 typedef MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T,
181177 /// MCAsmBackend, if registered.
182178 MCAsmBackendCtorTy MCAsmBackendCtorFn;
183179
184 /// MCAsmLexerCtorFn - Construction function for this target's
185 /// MCTargetAsmLexer, if registered.
186 MCAsmLexerCtorTy MCAsmLexerCtorFn;
187
188180 /// MCAsmParserCtorFn - Construction function for this target's
189181 /// MCTargetAsmParser, if registered.
190182 MCAsmParserCtorTy MCAsmParserCtorFn;
240232
241233 /// hasMCAsmBackend - Check if this target supports .o generation.
242234 bool hasMCAsmBackend() const { return MCAsmBackendCtorFn != 0; }
243
244 /// hasMCAsmLexer - Check if this target supports .s lexing.
245 bool hasMCAsmLexer() const { return MCAsmLexerCtorFn != 0; }
246235
247236 /// hasAsmParser - Check if this target supports .s parsing.
248237 bool hasMCAsmParser() const { return MCAsmParserCtorFn != 0; }
357346 if (!MCAsmBackendCtorFn)
358347 return 0;
359348 return MCAsmBackendCtorFn(*this, Triple, CPU);
360 }
361
362 /// createMCAsmLexer - Create a target specific assembly lexer.
363 ///
364 MCTargetAsmLexer *createMCAsmLexer(const MCRegisterInfo &MRI,
365 const MCAsmInfo &MAI) const {
366 if (!MCAsmLexerCtorFn)
367 return 0;
368 return MCAsmLexerCtorFn(*this, MRI, MAI);
369349 }
370350
371351 /// createMCAsmParser - Create a target specific assembly parser.
675655 T.MCAsmBackendCtorFn = Fn;
676656 }
677657
678 /// RegisterMCAsmLexer - Register a MCTargetAsmLexer implementation for the
679 /// given target.
680 ///
681 /// Clients are responsible for ensuring that registration doesn't occur
682 /// while another thread is attempting to access the registry. Typically
683 /// this is done by initializing all targets at program startup.
684 ///
685 /// @param T - The target being registered.
686 /// @param Fn - A function to construct an MCAsmLexer for the target.
687 static void RegisterMCAsmLexer(Target &T, Target::MCAsmLexerCtorTy Fn) {
688 if (!T.MCAsmLexerCtorFn)
689 T.MCAsmLexerCtorFn = Fn;
690 }
691
692658 /// RegisterMCAsmParser - Register a MCTargetAsmParser implementation for
693659 /// the given target.
694660 ///
10691035 }
10701036 };
10711037
1072 /// RegisterMCAsmLexer - Helper template for registering a target specific
1073 /// assembly lexer, for use in the target machine initialization
1074 /// function. Usage:
1075 ///
1076 /// extern "C" void LLVMInitializeFooMCAsmLexer() {
1077 /// extern Target TheFooTarget;
1078 /// RegisterMCAsmLexer X(TheFooTarget);
1079 /// }
1080 template
1081 struct RegisterMCAsmLexer {
1082 RegisterMCAsmLexer(Target &T) {
1083 TargetRegistry::RegisterMCAsmLexer(T, &Allocator);
1084 }
1085
1086 private:
1087 static MCTargetAsmLexer *Allocator(const Target &T,
1088 const MCRegisterInfo &MRI,
1089 const MCAsmInfo &MAI) {
1090 return new MCAsmLexerImpl(T, MRI, MAI);
1091 }
1092 };
1093
10941038 /// RegisterMCAsmParser - Helper template for registering a target specific
10951039 /// assembly parser, for use in the target machine initialization
10961040 /// function. Usage:
3535 MCStreamer.cpp
3636 MCSubtargetInfo.cpp
3737 MCSymbol.cpp
38 MCTargetAsmLexer.cpp
3938 MCValue.cpp
4039 MCWin64EH.cpp
4140 MachObjectWriter.cpp
+0
-16
lib/MC/MCTargetAsmLexer.cpp less more
None //===-- llvm/MC/MCTargetAsmLexer.cpp - Target Assembly Lexer --------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "llvm/MC/MCTargetAsmLexer.h"
10 using namespace llvm;
11
12 MCTargetAsmLexer::MCTargetAsmLexer(const Target &T)
13 : TheTarget(T), Lexer(NULL) {
14 }
15 MCTargetAsmLexer::~MCTargetAsmLexer() {}
+0
-134
lib/Target/ARM/AsmParser/ARMAsmLexer.cpp less more
None //===-- ARMAsmLexer.cpp - Tokenize ARM assembly to AsmTokens --------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "MCTargetDesc/ARMBaseInfo.h"
10 #include "llvm/ADT/StringSwitch.h"
11 #include "llvm/MC/MCAsmInfo.h"
12 #include "llvm/MC/MCParser/MCAsmLexer.h"
13 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
14 #include "llvm/MC/MCRegisterInfo.h"
15 #include "llvm/MC/MCTargetAsmLexer.h"
16 #include "llvm/Support/TargetRegistry.h"
17 #include
18 #include
19
20 using namespace llvm;
21
22 namespace {
23
24 class ARMBaseAsmLexer : public MCTargetAsmLexer {
25 const MCAsmInfo &AsmInfo;
26
27 const AsmToken &lexDefinite() {
28 return getLexer()->Lex();
29 }
30
31 AsmToken LexTokenUAL();
32 protected:
33 typedef std::map rmap_ty;
34
35 rmap_ty RegisterMap;
36
37 void InitRegisterMap(const MCRegisterInfo *info) {
38 unsigned numRegs = info->getNumRegs();
39
40 for (unsigned i = 0; i < numRegs; ++i) {
41 const char *regName = info->getName(i);
42 if (regName)
43 RegisterMap[regName] = i;
44 }
45 }
46
47 unsigned MatchRegisterName(StringRef Name) {
48 rmap_ty::iterator iter = RegisterMap.find(Name.str());
49 if (iter != RegisterMap.end())
50 return iter->second;
51 else
52 return 0;
53 }
54
55 AsmToken LexToken() {
56 if (!Lexer) {
57 SetError(SMLoc(), "No MCAsmLexer installed");
58 return AsmToken(AsmToken::Error, "", 0);
59 }
60
61 switch (AsmInfo.getAssemblerDialect()) {
62 default:
63 SetError(SMLoc(), "Unhandled dialect");
64 return AsmToken(AsmToken::Error, "", 0);
65 case 0:
66 return LexTokenUAL();
67 }
68 }
69 public:
70 ARMBaseAsmLexer(const Target &T, const MCAsmInfo &MAI)
71 : MCTargetAsmLexer(T), AsmInfo(MAI) {
72 }
73 };
74
75 class ARMAsmLexer : public ARMBaseAsmLexer {
76 public:
77 ARMAsmLexer(const Target &T, const MCRegisterInfo &MRI, const MCAsmInfo &MAI)
78 : ARMBaseAsmLexer(T, MAI) {
79 InitRegisterMap(&MRI);
80 }
81 };
82
83 class ThumbAsmLexer : public ARMBaseAsmLexer {
84 public:
85 ThumbAsmLexer(const Target &T, const MCRegisterInfo &MRI,const MCAsmInfo &MAI)
86 : ARMBaseAsmLexer(T, MAI) {
87 InitRegisterMap(&MRI);
88 }
89 };
90
91 } // end anonymous namespace
92
93 AsmToken ARMBaseAsmLexer::LexTokenUAL() {
94 const AsmToken &lexedToken = lexDefinite();
95
96 switch (lexedToken.getKind()) {
97 default: break;
98 case AsmToken::Error:
99 SetError(Lexer->getErrLoc(), Lexer->getErr());
100 break;
101 case AsmToken::Identifier: {
102 std::string lowerCase = lexedToken.getString().lower();
103
104 unsigned regID = MatchRegisterName(lowerCase);
105 // Check for register aliases.
106 // r13 -> sp
107 // r14 -> lr
108 // r15 -> pc
109 // ip -> r12
110 // FIXME: Some assemblers support lots of others. Do we want them all?
111 if (!regID) {
112 regID = StringSwitch(lowerCase)
113 .Case("r13", ARM::SP)
114 .Case("r14", ARM::LR)
115 .Case("r15", ARM::PC)
116 .Case("ip", ARM::R12)
117 .Default(0);
118 }
119
120 if (regID)
121 return AsmToken(AsmToken::Register,
122 lexedToken.getString(),
123 static_cast(regID));
124 }
125 }
126
127 return AsmToken(lexedToken);
128 }
129
130 extern "C" void LLVMInitializeARMAsmLexer() {
131 RegisterMCAsmLexer X(TheARMTarget);
132 RegisterMCAsmLexer Y(TheThumbTarget);
133 }
78287828 return true;
78297829 }
78307830
7831 extern "C" void LLVMInitializeARMAsmLexer();
7832
78337831 /// Force static initialization.
78347832 extern "C" void LLVMInitializeARMAsmParser() {
78357833 RegisterMCAsmParser X(TheARMTarget);
78367834 RegisterMCAsmParser Y(TheThumbTarget);
7837 LLVMInitializeARMAsmLexer();
78387835 }
78397836
78407837 #define GET_REGISTER_MATCHER
0 include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
11
22 add_llvm_library(LLVMARMAsmParser
3 ARMAsmLexer.cpp
43 ARMAsmParser.cpp
54 )
65
11 ${CMAKE_CURRENT_SOURCE_DIR}/.. )
22
33 add_llvm_library(LLVMMBlazeAsmParser
4 MBlazeAsmLexer.cpp
54 MBlazeAsmParser.cpp
65 )
76
+0
-112
lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp less more
None //===-- MBlazeAsmLexer.cpp - Tokenize MBlaze assembly to AsmTokens --------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "MCTargetDesc/MBlazeBaseInfo.h"
10 #include "llvm/MC/MCAsmInfo.h"
11 #include "llvm/MC/MCParser/MCAsmLexer.h"
12 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
13 #include "llvm/MC/MCRegisterInfo.h"
14 #include "llvm/MC/MCTargetAsmLexer.h"
15 #include "llvm/Support/TargetRegistry.h"
16 #include
17 #include
18
19 using namespace llvm;
20
21 namespace {
22
23 class MBlazeBaseAsmLexer : public MCTargetAsmLexer {
24 const MCAsmInfo &AsmInfo;
25
26 const AsmToken &lexDefinite() {
27 return getLexer()->Lex();
28 }
29
30 AsmToken LexTokenUAL();
31 protected:
32 typedef std::map rmap_ty;
33
34 rmap_ty RegisterMap;
35
36 void InitRegisterMap(const MCRegisterInfo *info) {
37 unsigned numRegs = info->getNumRegs();
38
39 for (unsigned i = 0; i < numRegs; ++i) {
40 const char *regName = info->getName(i);
41 if (regName)
42 RegisterMap[regName] = i;
43 }
44 }
45
46 unsigned MatchRegisterName(StringRef Name) {
47 rmap_ty::iterator iter = RegisterMap.find(Name.str());
48 if (iter != RegisterMap.end())
49 return iter->second;
50 else
51 return 0;
52 }
53
54 AsmToken LexToken() {
55 if (!Lexer) {
56 SetError(SMLoc(), "No MCAsmLexer installed");
57 return AsmToken(AsmToken::Error, "", 0);
58 }
59
60 switch (AsmInfo.getAssemblerDialect()) {
61 default:
62 SetError(SMLoc(), "Unhandled dialect");
63 return AsmToken(AsmToken::Error, "", 0);
64 case 0:
65 return LexTokenUAL();
66 }
67 }
68 public:
69 MBlazeBaseAsmLexer(const Target &T, const MCAsmInfo &MAI)
70 : MCTargetAsmLexer(T), AsmInfo(MAI) {
71 }
72 };
73
74 class MBlazeAsmLexer : public MBlazeBaseAsmLexer {
75 public:
76 MBlazeAsmLexer(const Target &T, const MCRegisterInfo &MRI,
77 const MCAsmInfo &MAI)
78 : MBlazeBaseAsmLexer(T, MAI) {
79 InitRegisterMap(&MRI);
80 }
81 };
82 }
83
84 AsmToken MBlazeBaseAsmLexer::LexTokenUAL() {
85 const AsmToken &lexedToken = lexDefinite();
86
87 switch (lexedToken.getKind()) {
88 default:
89 return AsmToken(lexedToken);
90 case AsmToken::Error:
91 SetError(Lexer->getErrLoc(), Lexer->getErr());
92 return AsmToken(lexedToken);
93 case AsmToken::Identifier:
94 {
95 unsigned regID = MatchRegisterName(lexedToken.getString().lower());
96
97 if (regID) {
98 return AsmToken(AsmToken::Register,
99 lexedToken.getString(),
100 static_cast(regID));
101 } else {
102 return AsmToken(lexedToken);
103 }
104 }
105 }
106 }
107
108 extern "C" void LLVMInitializeMBlazeAsmLexer() {
109 RegisterMCAsmLexer X(TheMBlazeTarget);
110 }
111
547547 return false;
548548 }
549549
550 extern "C" void LLVMInitializeMBlazeAsmLexer();
551
552550 /// Force static initialization.
553551 extern "C" void LLVMInitializeMBlazeAsmParser() {
554552 RegisterMCAsmParser X(TheMBlazeTarget);
555 LLVMInitializeMBlazeAsmLexer();
556553 }
557554
558555 #define GET_REGISTER_MATCHER
0 include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
11
22 add_llvm_library(LLVMX86AsmParser
3 X86AsmLexer.cpp
43 X86AsmParser.cpp
54 )
65
+0
-159
lib/Target/X86/AsmParser/X86AsmLexer.cpp less more
None //===-- X86AsmLexer.cpp - Tokenize X86 assembly to AsmTokens --------------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "MCTargetDesc/X86BaseInfo.h"
10 #include "llvm/ADT/SmallVector.h"
11 #include "llvm/MC/MCAsmInfo.h"
12 #include "llvm/MC/MCParser/MCAsmLexer.h"
13 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
14 #include "llvm/MC/MCTargetAsmLexer.h"
15 #include "llvm/Support/TargetRegistry.h"
16
17 using namespace llvm;
18
19 namespace {
20
21 class X86AsmLexer : public MCTargetAsmLexer {
22 const MCAsmInfo &AsmInfo;
23
24 bool tentativeIsValid;
25 AsmToken tentativeToken;
26
27 const AsmToken &lexTentative() {
28 tentativeToken = getLexer()->Lex();
29 tentativeIsValid = true;
30 return tentativeToken;
31 }
32
33 const AsmToken &lexDefinite() {
34 if (tentativeIsValid) {
35 tentativeIsValid = false;
36 return tentativeToken;
37 }
38 return getLexer()->Lex();
39 }
40
41 AsmToken LexTokenATT();
42 AsmToken LexTokenIntel();
43 protected:
44 AsmToken LexToken() {
45 if (!Lexer) {
46 SetError(SMLoc(), "No MCAsmLexer installed");
47 return AsmToken(AsmToken::Error, "", 0);
48 }
49
50 switch (AsmInfo.getAssemblerDialect()) {
51 default:
52 SetError(SMLoc(), "Unhandled dialect");
53 return AsmToken(AsmToken::Error, "", 0);
54 case 0:
55 return LexTokenATT();
56 case 1:
57 return LexTokenIntel();
58 }
59 }
60 public:
61 X86AsmLexer(const Target &T, const MCRegisterInfo &MRI, const MCAsmInfo &MAI)
62 : MCTargetAsmLexer(T), AsmInfo(MAI), tentativeIsValid(false) {
63 }
64 };
65
66 } // end anonymous namespace
67
68 #define GET_REGISTER_MATCHER
69 #include "X86GenAsmMatcher.inc"
70
71 AsmToken X86AsmLexer::LexTokenATT() {
72 AsmToken lexedToken = lexDefinite();
73
74 switch (lexedToken.getKind()) {
75 default:
76 return lexedToken;
77 case AsmToken::Error:
78 SetError(Lexer->getErrLoc(), Lexer->getErr());
79 return lexedToken;
80
81 case AsmToken::Percent: {
82 const AsmToken &nextToken = lexTentative();
83 if (nextToken.getKind() != AsmToken::Identifier)
84 return lexedToken;
85
86 if (unsigned regID = MatchRegisterName(nextToken.getString())) {
87 lexDefinite();
88
89 // FIXME: This is completely wrong when there is a space or other
90 // punctuation between the % and the register name.
91 StringRef regStr(lexedToken.getString().data(),
92 lexedToken.getString().size() +
93 nextToken.getString().size());
94
95 return AsmToken(AsmToken::Register, regStr,
96 static_cast(regID));
97 }
98
99 // Match register name failed. If this is "db[0-7]", match it as an alias
100 // for dr[0-7].
101 if (nextToken.getString().size() == 3 &&
102 nextToken.getString().startswith("db")) {
103 int RegNo = -1;
104 switch (nextToken.getString()[2]) {
105 case '0': RegNo = X86::DR0; break;
106 case '1': RegNo = X86::DR1; break;
107 case '2': RegNo = X86::DR2; break;
108 case '3': RegNo = X86::DR3; break;
109 case '4': RegNo = X86::DR4; break;
110 case '5': RegNo = X86::DR5; break;
111 case '6': RegNo = X86::DR6; break;
112 case '7': RegNo = X86::DR7; break;
113 }
114
115 if (RegNo != -1) {
116 lexDefinite();
117
118 // FIXME: This is completely wrong when there is a space or other
119 // punctuation between the % and the register name.
120 StringRef regStr(lexedToken.getString().data(),
121 lexedToken.getString().size() +
122 nextToken.getString().size());
123 return AsmToken(AsmToken::Register, regStr,
124 static_cast(RegNo));
125 }
126 }
127
128
129 return lexedToken;
130 }
131 }
132 }
133
134 AsmToken X86AsmLexer::LexTokenIntel() {
135 const AsmToken &lexedToken = lexDefinite();
136
137 switch(lexedToken.getKind()) {
138 default:
139 return lexedToken;
140 case AsmToken::Error:
141 SetError(Lexer->getErrLoc(), Lexer->getErr());
142 return lexedToken;
143 case AsmToken::Identifier: {
144 unsigned regID = MatchRegisterName(lexedToken.getString().lower());
145
146 if (regID)
147 return AsmToken(AsmToken::Register,
148 lexedToken.getString(),
149 static_cast(regID));
150 return lexedToken;
151 }
152 }
153 }
154
155 extern "C" void LLVMInitializeX86AsmLexer() {
156 RegisterMCAsmLexer X(TheX86_32Target);
157 RegisterMCAsmLexer Y(TheX86_64Target);
158 }
20582058 return false;
20592059 }
20602060
2061
2062 extern "C" void LLVMInitializeX86AsmLexer();
2063
20642061 // Force static initialization.
20652062 extern "C" void LLVMInitializeX86AsmParser() {
20662063 RegisterMCAsmParser X(TheX86_32Target);
20672064 RegisterMCAsmParser Y(TheX86_64Target);
2068 LLVMInitializeX86AsmLexer();
20692065 }
20702066
20712067 #define GET_REGISTER_MATCHER
261261 break;
262262 case AsmToken::Real:
263263 Out->os() << "real: " << Lexer.getTok().getString();
264 break;
265 case AsmToken::Register:
266 Out->os() << "register: " << Lexer.getTok().getRegVal();
267264 break;
268265 case AsmToken::String:
269266 Out->os() << "string: " << Lexer.getTok().getString();