LLVM 24.0.0git
MSP430AsmParser.cpp
Go to the documentation of this file.
1//===- MSP430AsmParser.cpp - Parse MSP430 assembly to MCInst instructions -===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "MSP430.h"
12
13#include "llvm/ADT/APInt.h"
14#include "llvm/MC/MCContext.h"
15#include "llvm/MC/MCExpr.h"
16#include "llvm/MC/MCInst.h"
17#include "llvm/MC/MCInstrInfo.h"
22#include "llvm/MC/MCStreamer.h"
24#include "llvm/MC/MCSymbol.h"
25#include "llvm/MC/MCValue.h"
28#include "llvm/Support/Debug.h"
29
30#define DEBUG_TYPE "msp430-asm-parser"
31
32using namespace llvm;
33
34namespace {
35
36/// Parses MSP430 assembly from a stream.
37class MSP430AsmParser : public MCTargetAsmParser {
38 MCAsmParser &Parser;
39 const MCRegisterInfo *MRI;
40
41 bool matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
44 bool MatchingInlineAsm) override;
45
46 bool parseRegister(MCRegister &Reg, SMLoc &StartLoc, SMLoc &EndLoc) override;
47 ParseStatus tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
48 SMLoc &EndLoc) override;
49
50 bool parseInstruction(ParseInstructionInfo &Info, StringRef Name,
51 SMLoc NameLoc, OperandVector &Operands) override;
52
53 ParseStatus parseDirective(AsmToken DirectiveID) override;
54 bool ParseDirectiveRefSym(AsmToken DirectiveID);
55
56 unsigned validateTargetOperandClass(MCParsedAsmOperand &Op,
57 unsigned Kind) override;
58
59 bool parseJccInstruction(ParseInstructionInfo &Info, StringRef Name,
60 SMLoc NameLoc, OperandVector &Operands);
61
62 bool ParseOperand(OperandVector &Operands);
63
64 bool ParseLiteralValues(unsigned Size, SMLoc L);
65
66 MCAsmParser &getParser() const { return Parser; }
67 AsmLexer &getLexer() const { return Parser.getLexer(); }
68
69 /// @name Auto-generated Matcher Functions
70 /// {
71
72#define GET_ASSEMBLER_HEADER
73#include "MSP430GenAsmMatcher.inc"
74
75 /// }
76
77public:
78 MSP430AsmParser(const MCSubtargetInfo &STI, MCAsmParser &Parser,
79 const MCInstrInfo &MII)
80 : MCTargetAsmParser(STI, MII), Parser(Parser) {
82 MRI = getContext().getRegisterInfo();
83
84 setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
85 }
86};
87
88/// A parsed MSP430 assembly operand.
89class MSP430Operand : public MCParsedAsmOperand {
90 typedef MCParsedAsmOperand Base;
91
92 enum KindTy {
93 k_Imm,
94 k_Reg,
95 k_Tok,
96 k_Mem,
97 k_IndReg,
98 k_PostIndReg
99 } Kind;
100
101 struct Memory {
102 MCRegister Reg;
103 const MCExpr *Offset;
104 };
105 union {
106 const MCExpr *Imm;
107 MCRegister Reg;
108 StringRef Tok;
109 Memory Mem;
110 };
111
112 SMLoc Start, End;
113
114public:
115 MSP430Operand(StringRef Tok, SMLoc const &S)
116 : Kind(k_Tok), Tok(Tok), Start(S), End(S) {}
117 MSP430Operand(KindTy Kind, MCRegister Reg, SMLoc const &S, SMLoc const &E)
118 : Kind(Kind), Reg(Reg), Start(S), End(E) {}
119 MSP430Operand(MCExpr const *Imm, SMLoc const &S, SMLoc const &E)
120 : Kind(k_Imm), Imm(Imm), Start(S), End(E) {}
121 MSP430Operand(MCRegister Reg, MCExpr const *Expr, SMLoc const &S,
122 SMLoc const &E)
123 : Kind(k_Mem), Mem({Reg, Expr}), Start(S), End(E) {}
124
125 void addRegOperands(MCInst &Inst, unsigned N) const {
126 assert((Kind == k_Reg || Kind == k_IndReg || Kind == k_PostIndReg) &&
127 "Unexpected operand kind");
128 assert(N == 1 && "Invalid number of operands!");
129
131 }
132
133 void addExprOperand(MCInst &Inst, const MCExpr *Expr) const {
134 // Add as immediate when possible
135 if (!Expr)
137 else if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Expr))
138 Inst.addOperand(MCOperand::createImm(CE->getValue()));
139 else
141 }
142
143 void addImmOperands(MCInst &Inst, unsigned N) const {
144 assert(Kind == k_Imm && "Unexpected operand kind");
145 assert(N == 1 && "Invalid number of operands!");
146
147 addExprOperand(Inst, Imm);
148 }
149
150 void addMemOperands(MCInst &Inst, unsigned N) const {
151 assert(Kind == k_Mem && "Unexpected operand kind");
152 assert(N == 2 && "Invalid number of operands");
153
154 Inst.addOperand(MCOperand::createReg(Mem.Reg));
155 addExprOperand(Inst, Mem.Offset);
156 }
157
158 bool isReg() const override { return Kind == k_Reg; }
159 bool isImm() const override { return Kind == k_Imm; }
160 bool isToken() const override { return Kind == k_Tok; }
161 bool isMem() const override { return Kind == k_Mem; }
162 bool isIndReg() const { return Kind == k_IndReg; }
163 bool isPostIndReg() const { return Kind == k_PostIndReg; }
164
165 bool isCGImm() const {
166 if (Kind != k_Imm)
167 return false;
168
169 int64_t Val;
170 if (!Imm->evaluateAsAbsolute(Val))
171 return false;
172
173 if (Val == 0 || Val == 1 || Val == 2 || Val == 4 || Val == 8 || Val == -1)
174 return true;
175
176 return false;
177 }
178
179 StringRef getToken() const {
180 assert(Kind == k_Tok && "Invalid access!");
181 return Tok;
182 }
183
184 MCRegister getReg() const override {
185 assert(Kind == k_Reg && "Invalid access!");
186 return Reg;
187 }
188
189 void setReg(MCRegister RegNo) {
190 assert(Kind == k_Reg && "Invalid access!");
191 Reg = RegNo;
192 }
193
194 static std::unique_ptr<MSP430Operand> CreateToken(StringRef Str, SMLoc S) {
195 return std::make_unique<MSP430Operand>(Str, S);
196 }
197
198 static std::unique_ptr<MSP430Operand> CreateReg(MCRegister Reg, SMLoc S,
199 SMLoc E) {
200 return std::make_unique<MSP430Operand>(k_Reg, Reg, S, E);
201 }
202
203 static std::unique_ptr<MSP430Operand> CreateImm(const MCExpr *Val, SMLoc S,
204 SMLoc E) {
205 return std::make_unique<MSP430Operand>(Val, S, E);
206 }
207
208 static std::unique_ptr<MSP430Operand>
209 CreateMem(MCRegister Reg, const MCExpr *Val, SMLoc S, SMLoc E) {
210 return std::make_unique<MSP430Operand>(Reg, Val, S, E);
211 }
212
213 static std::unique_ptr<MSP430Operand> CreateIndReg(MCRegister Reg, SMLoc S,
214 SMLoc E) {
215 return std::make_unique<MSP430Operand>(k_IndReg, Reg, S, E);
216 }
217
218 static std::unique_ptr<MSP430Operand> CreatePostIndReg(MCRegister Reg,
219 SMLoc S, SMLoc E) {
220 return std::make_unique<MSP430Operand>(k_PostIndReg, Reg, S, E);
221 }
222
223 SMLoc getStartLoc() const override { return Start; }
224 SMLoc getEndLoc() const override { return End; }
225
226 void print(raw_ostream &O, const MCAsmInfo &MAI) const override {
227 switch (Kind) {
228 case k_Tok:
229 O << "Token " << Tok;
230 break;
231 case k_Reg:
232 O << "Register " << Reg.id();
233 break;
234 case k_Imm:
235 O << "Immediate ";
236 MAI.printExpr(O, *Imm);
237 break;
238 case k_Mem:
239 O << "Memory ";
240 MAI.printExpr(O, *Mem.Offset);
241 break;
242 case k_IndReg:
243 O << "RegInd " << Reg.id();
244 break;
245 case k_PostIndReg:
246 O << "PostInc " << Reg.id();
247 break;
248 }
249 }
250};
251} // end anonymous namespace
252
253bool MSP430AsmParser::matchAndEmitInstruction(SMLoc Loc, unsigned &Opcode,
255 MCStreamer &Out,
257 bool MatchingInlineAsm) {
258 MCInst Inst;
259 unsigned MatchResult =
260 MatchInstructionImpl(Operands, Inst, ErrorInfo, MatchingInlineAsm);
261
262 switch (MatchResult) {
263 case Match_Success:
264 Inst.setLoc(Loc);
265 Out.emitInstruction(Inst, *STI);
266 return false;
267 case Match_MnemonicFail:
268 return Error(Loc, "invalid instruction mnemonic");
269 case Match_InvalidOperand: {
270 SMLoc ErrorLoc = Loc;
271 if (ErrorInfo != ~0U) {
272 if (ErrorInfo >= Operands.size())
273 return Error(ErrorLoc, "too few operands for instruction");
274
275 ErrorLoc = ((MSP430Operand &)*Operands[ErrorInfo]).getStartLoc();
276 if (ErrorLoc == SMLoc())
277 ErrorLoc = Loc;
278 }
279 return Error(ErrorLoc, "invalid operand for instruction");
280 }
281 default:
282 return true;
283 }
284}
285
286// Auto-generated by TableGen
289
290bool MSP430AsmParser::parseRegister(MCRegister &Reg, SMLoc &StartLoc,
291 SMLoc &EndLoc) {
292 ParseStatus Res = tryParseRegister(Reg, StartLoc, EndLoc);
293 if (Res.isFailure())
294 return Error(StartLoc, "invalid register name");
295 if (Res.isSuccess())
296 return false;
297 if (Res.isNoMatch())
298 return true;
299
300 llvm_unreachable("unknown parse status");
301}
302
303ParseStatus MSP430AsmParser::tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
304 SMLoc &EndLoc) {
305 if (getLexer().getKind() == AsmToken::Identifier) {
306 auto Name = getLexer().getTok().getIdentifier().lower();
307 Reg = MatchRegisterName(Name);
308 if (Reg == MSP430::NoRegister) {
310 if (Reg == MSP430::NoRegister)
312 }
313
314 AsmToken const &T = getParser().getTok();
315 StartLoc = T.getLoc();
316 EndLoc = T.getEndLoc();
317 getLexer().Lex(); // eat register token
318
320 }
321
323}
324
325bool MSP430AsmParser::parseJccInstruction(ParseInstructionInfo &Info,
326 StringRef Name, SMLoc NameLoc,
328 if (!Name.starts_with_insensitive("j"))
329 return true;
330
331 auto CC = Name.drop_front().lower();
332 unsigned CondCode;
333 if (CC == "ne" || CC == "nz")
335 else if (CC == "eq" || CC == "z")
337 else if (CC == "lo" || CC == "nc")
339 else if (CC == "hs" || CC == "c")
341 else if (CC == "n")
343 else if (CC == "ge")
345 else if (CC == "l")
347 else if (CC == "mp")
349 else
350 return Error(NameLoc, "unknown instruction");
351
352 if (CondCode == (unsigned)MSP430CC::COND_NONE)
353 Operands.push_back(MSP430Operand::CreateToken("jmp", NameLoc));
354 else {
355 Operands.push_back(MSP430Operand::CreateToken("j", NameLoc));
356 const MCExpr *CCode = MCConstantExpr::create(CondCode, getContext());
357 Operands.push_back(MSP430Operand::CreateImm(CCode, SMLoc(), SMLoc()));
358 }
359
360 // Skip optional '$' sign.
361 (void)parseOptionalToken(AsmToken::Dollar);
362
363 const MCExpr *Val;
364 SMLoc ExprLoc = getLexer().getLoc();
365 if (getParser().parseExpression(Val))
366 return Error(ExprLoc, "expected expression operand");
367
368 int64_t Res;
369 if (Val->evaluateAsAbsolute(Res))
370 if (Res < -512 || Res > 511)
371 return Error(ExprLoc, "invalid jump offset");
372
373 Operands.push_back(MSP430Operand::CreateImm(Val, ExprLoc,
374 getLexer().getLoc()));
375
376 if (getLexer().isNot(AsmToken::EndOfStatement)) {
377 SMLoc Loc = getLexer().getLoc();
378 getParser().eatToEndOfStatement();
379 return Error(Loc, "unexpected token");
380 }
381
382 getParser().Lex(); // Consume the EndOfStatement.
383 return false;
384}
385
386bool MSP430AsmParser::parseInstruction(ParseInstructionInfo &Info,
387 StringRef Name, SMLoc NameLoc,
389 // Drop .w suffix
390 if (Name.ends_with_insensitive(".w"))
391 Name = Name.drop_back(2);
392
393 if (!parseJccInstruction(Info, Name, NameLoc, Operands))
394 return false;
395
396 // First operand is instruction mnemonic
397 Operands.push_back(MSP430Operand::CreateToken(Name, NameLoc));
398
399 // If there are no more operands, then finish
400 if (getLexer().is(AsmToken::EndOfStatement))
401 return false;
402
403 // Parse first operand
404 if (ParseOperand(Operands))
405 return true;
406
407 // Parse second operand if any
408 if (parseOptionalToken(AsmToken::Comma) && ParseOperand(Operands))
409 return true;
410
411 if (getLexer().isNot(AsmToken::EndOfStatement)) {
412 SMLoc Loc = getLexer().getLoc();
413 getParser().eatToEndOfStatement();
414 return Error(Loc, "unexpected token");
415 }
416
417 getParser().Lex(); // Consume the EndOfStatement.
418 return false;
419}
420
421bool MSP430AsmParser::ParseDirectiveRefSym(AsmToken DirectiveID) {
422 StringRef Name;
423 if (getParser().parseIdentifier(Name))
424 return TokError("expected identifier in directive");
425
426 MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
427 getStreamer().emitSymbolAttribute(Sym, MCSA_Global);
428 return parseEOL();
429}
430
431ParseStatus MSP430AsmParser::parseDirective(AsmToken DirectiveID) {
432 StringRef IDVal = DirectiveID.getIdentifier();
433 if (IDVal.lower() == ".long")
434 return ParseLiteralValues(4, DirectiveID.getLoc());
435 if (IDVal.lower() == ".word" || IDVal.lower() == ".short")
436 return ParseLiteralValues(2, DirectiveID.getLoc());
437 if (IDVal.lower() == ".byte")
438 return ParseLiteralValues(1, DirectiveID.getLoc());
439 if (IDVal.lower() == ".refsym")
440 return ParseDirectiveRefSym(DirectiveID);
442}
443
444bool MSP430AsmParser::ParseOperand(OperandVector &Operands) {
445 switch (getLexer().getKind()) {
446 default: return true;
448 // try rN
449 MCRegister RegNo;
450 SMLoc StartLoc, EndLoc;
451 if (!parseRegister(RegNo, StartLoc, EndLoc)) {
452 Operands.push_back(MSP430Operand::CreateReg(RegNo, StartLoc, EndLoc));
453 return false;
454 }
455 [[fallthrough]];
456 }
458 case AsmToken::Plus:
459 case AsmToken::Minus: {
460 SMLoc StartLoc = getParser().getTok().getLoc();
461 const MCExpr *Val;
462 // Try constexpr[(rN)]
463 if (!getParser().parseExpression(Val)) {
464 MCRegister RegNo = MSP430::PC;
465 SMLoc EndLoc = getParser().getTok().getLoc();
466 // Try (rN)
467 if (parseOptionalToken(AsmToken::LParen)) {
468 SMLoc RegStartLoc;
469 if (parseRegister(RegNo, RegStartLoc, EndLoc))
470 return true;
471 EndLoc = getParser().getTok().getEndLoc();
472 if (!parseOptionalToken(AsmToken::RParen))
473 return true;
474 }
475 Operands.push_back(MSP430Operand::CreateMem(RegNo, Val, StartLoc,
476 EndLoc));
477 return false;
478 }
479 return true;
480 }
481 case AsmToken::Amp: {
482 // Try &constexpr
483 SMLoc StartLoc = getParser().getTok().getLoc();
484 getLexer().Lex(); // Eat '&'
485 const MCExpr *Val;
486 if (!getParser().parseExpression(Val)) {
487 SMLoc EndLoc = getParser().getTok().getLoc();
488 Operands.push_back(MSP430Operand::CreateMem(MSP430::SR, Val, StartLoc,
489 EndLoc));
490 return false;
491 }
492 return true;
493 }
494 case AsmToken::At: {
495 // Try @rN[+]
496 SMLoc StartLoc = getParser().getTok().getLoc();
497 getLexer().Lex(); // Eat '@'
498 MCRegister RegNo;
499 SMLoc RegStartLoc, EndLoc;
500 if (parseRegister(RegNo, RegStartLoc, EndLoc))
501 return true;
502 if (parseOptionalToken(AsmToken::Plus)) {
503 Operands.push_back(MSP430Operand::CreatePostIndReg(RegNo, StartLoc, EndLoc));
504 return false;
505 }
506 if (Operands.size() > 1) // Emulate @rd in destination position as 0(rd)
507 Operands.push_back(MSP430Operand::CreateMem(RegNo,
508 MCConstantExpr::create(0, getContext()), StartLoc, EndLoc));
509 else
510 Operands.push_back(MSP430Operand::CreateIndReg(RegNo, StartLoc, EndLoc));
511 return false;
512 }
513 case AsmToken::Hash:
514 // Try #constexpr
515 SMLoc StartLoc = getParser().getTok().getLoc();
516 getLexer().Lex(); // Eat '#'
517 const MCExpr *Val;
518 if (!getParser().parseExpression(Val)) {
519 SMLoc EndLoc = getParser().getTok().getLoc();
520 Operands.push_back(MSP430Operand::CreateImm(Val, StartLoc, EndLoc));
521 return false;
522 }
523 return true;
524 }
525}
526
527bool MSP430AsmParser::ParseLiteralValues(unsigned Size, SMLoc L) {
528 auto parseOne = [&]() -> bool {
529 const MCExpr *Value;
530 if (getParser().parseExpression(Value))
531 return true;
532 getParser().getStreamer().emitValue(Value, Size, L);
533 return false;
534 };
535 return (parseMany(parseOne));
536}
537
542
543#define GET_REGISTER_MATCHER
544#define GET_MATCHER_IMPLEMENTATION
545#include "MSP430GenAsmMatcher.inc"
546
548 switch (Reg.id()) {
549 default:
550 llvm_unreachable("Unknown GR16 register");
551 case MSP430::PC: return MSP430::PCB;
552 case MSP430::SP: return MSP430::SPB;
553 case MSP430::SR: return MSP430::SRB;
554 case MSP430::CG: return MSP430::CGB;
555 case MSP430::R4: return MSP430::R4B;
556 case MSP430::R5: return MSP430::R5B;
557 case MSP430::R6: return MSP430::R6B;
558 case MSP430::R7: return MSP430::R7B;
559 case MSP430::R8: return MSP430::R8B;
560 case MSP430::R9: return MSP430::R9B;
561 case MSP430::R10: return MSP430::R10B;
562 case MSP430::R11: return MSP430::R11B;
563 case MSP430::R12: return MSP430::R12B;
564 case MSP430::R13: return MSP430::R13B;
565 case MSP430::R14: return MSP430::R14B;
566 case MSP430::R15: return MSP430::R15B;
567 }
568}
569
570unsigned MSP430AsmParser::validateTargetOperandClass(MCParsedAsmOperand &AsmOp,
571 unsigned Kind) {
572 MSP430Operand &Op = static_cast<MSP430Operand &>(AsmOp);
573
574 if (!Op.isReg())
575 return Match_InvalidOperand;
576
577 MCRegister Reg = Op.getReg();
578 bool isGR16 = getMSP430MCRegisterClass(MSP430::GR16RegClassID).contains(Reg);
579
580 if (isGR16 && (Kind == MCK_GR8)) {
581 Op.setReg(convertGR16ToGR8(Reg));
582 return Match_Success;
583 }
584
585 return Match_InvalidOperand;
586}
static MCRegister MatchRegisterName(StringRef Name)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
unsigned Imm
unsigned uint64_t
static bool isNot(const MachineRegisterInfo &MRI, const MachineInstr &MI)
This file implements a class to represent arbitrary precision integral constant values and operations...
static MCRegister MatchRegisterAltName(StringRef Name)
Maps from the set of all alternative registernames to a register number.
#define X(NUM, ENUM, NAME)
Definition ELF.h:857
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ABI
Definition Compiler.h:215
#define LLVM_EXTERNAL_VISIBILITY
Definition Compiler.h:132
LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMSP430AsmParser()
static MCRegister convertGR16ToGR8(MCRegister Reg)
Register Reg
#define T
static MCRegister getReg(const MCDisassembler *D, unsigned RC, unsigned RegNo)
static bool isReg(const MCInst &MI, unsigned OpNo)
SI Fold Operands
Func getContext().diagnose(DiagnosticInfoUnsupported(Func
Target independent representation for an assembler token.
Definition MCAsmMacro.h:22
LLVM_ABI SMLoc getLoc() const
Definition AsmLexer.cpp:31
StringRef getIdentifier() const
Get the identifier string for the current token, which should be an identifier or a string.
Definition MCAsmMacro.h:92
Base class for user error types.
Definition Error.h:354
void printExpr(raw_ostream &, const MCExpr &) const
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
Generic assembler parser interface, for use by target specific assembly parsers.
AsmLexer & getLexer()
static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Definition MCExpr.cpp:212
void setLoc(SMLoc loc)
Definition MCInst.h:207
void addOperand(const MCOperand Op)
Definition MCInst.h:215
Interface to description of machine instruction set.
Definition MCInstrInfo.h:27
static MCOperand createExpr(const MCExpr *Val)
Definition MCInst.h:166
static MCOperand createReg(MCRegister Reg)
Definition MCInst.h:138
static MCOperand createImm(int64_t Val)
Definition MCInst.h:145
MCParsedAsmOperand - This abstract class represents a source-level assembly instruction operand.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Definition MCRegister.h:41
Streaming machine code generation interface.
Definition MCStreamer.h:222
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
Generic base class for all target subtargets.
const FeatureBitset & getFeatureBits() const
MCTargetAsmParser - Generic interface to target specific assembly parsers.
Ternary parse status returned by various parse* methods.
constexpr bool isFailure() const
static constexpr StatusTy Failure
constexpr bool isSuccess() const
static constexpr StatusTy Success
static constexpr StatusTy NoMatch
constexpr bool isNoMatch() const
constexpr unsigned id() const
Definition Register.h:100
Represents a location in source code.
Definition SMLoc.h:22
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
LLVM_ABI std::string lower() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ COND_LO
Definition MSP430.h:30
@ COND_N
Definition MSP430.h:33
@ COND_L
Definition MSP430.h:32
@ COND_E
Definition MSP430.h:27
@ COND_GE
Definition MSP430.h:31
@ COND_NONE
Definition MSP430.h:34
@ COND_NE
Definition MSP430.h:28
@ COND_HS
Definition MSP430.h:29
CondCode
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out,...
@ CE
Windows NT (Windows on ARM)
Definition MCAsmInfo.h:51
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
static bool isMem(const MachineInstr &MI, unsigned Op)
LLVM_ABI std::pair< StringRef, StringRef > getToken(StringRef Source, StringRef Delimiters=" \t\n\v\f\r")
getToken - This function extracts one token from source, ignoring any leading characters that appear ...
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:643
Target & getTheMSP430Target()
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Value
Definition InstrProf.h:143
SmallVectorImpl< std::unique_ptr< MCParsedAsmOperand > > OperandVector
DWARFExpression::Operation Op
@ MCSA_Global
.type _foo, @gnu_unique_object
#define N
RegisterMCAsmParser - Helper template for registering a target specific assembly parser,...