llvm.org GIT mirror llvm / bad493e
Cleanup. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179125 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 7 years ago
1 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
5656 X86Operand *ParseOperand();
5757 X86Operand *ParseATTOperand();
5858 X86Operand *ParseIntelOperand();
59 X86Operand *ParseIntelOffsetOfOperator(SMLoc StartLoc);
60 X86Operand *ParseIntelOperator(SMLoc StartLoc, unsigned OpKind);
59 X86Operand *ParseIntelOffsetOfOperator();
60 X86Operand *ParseIntelOperator(unsigned OpKind);
6161 X86Operand *ParseIntelMemOperand(unsigned SegReg, uint64_t ImmDisp,
6262 SMLoc StartLoc);
6363 X86Operand *ParseIntelBracExpression(unsigned SegReg, SMLoc SizeDirLoc,
13921392
13931393 /// Parse the 'offset' operator. This operator is used to specify the
13941394 /// location rather then the content of a variable.
1395 X86Operand *X86AsmParser::ParseIntelOffsetOfOperator(SMLoc Start) {
1396 SMLoc OffsetOfLoc = Start;
1395 X86Operand *X86AsmParser::ParseIntelOffsetOfOperator() {
1396 AsmToken Tok = *&Parser.getTok();
1397 SMLoc OffsetOfLoc = Tok.getLoc();
13971398 Parser.Lex(); // Eat offset.
1398 Start = Parser.getTok().getLoc();
1399 assert (Parser.getTok().is(AsmToken::Identifier) && "Expected an identifier");
1400
1401 SMLoc End;
1399 assert (Tok.is(AsmToken::Identifier) && "Expected an identifier");
1400
1401 SMLoc Start = Parser.getTok().getLoc(), End;
14021402 const MCExpr *Val;
14031403 if (getParser().parseExpression(Val, End))
14041404 return ErrorOperand(Start, "Unable to parse expression!");
14281428 /// variable. A variable's size is the product of its LENGTH and TYPE. The
14291429 /// TYPE operator returns the size of a C or C++ type or variable. If the
14301430 /// variable is an array, TYPE returns the size of a single element.
1431 X86Operand *X86AsmParser::ParseIntelOperator(SMLoc Start, unsigned OpKind) {
1432 SMLoc TypeLoc = Start;
1433 Parser.Lex(); // Eat offset.
1434 Start = Parser.getTok().getLoc();
1431 X86Operand *X86AsmParser::ParseIntelOperator(unsigned OpKind) {
1432 AsmToken Tok = *&Parser.getTok();
1433 SMLoc TypeLoc = Tok.getLoc();
1434 Parser.Lex(); // Eat operator.
14351435 assert (Parser.getTok().is(AsmToken::Identifier) && "Expected an identifier");
14361436
1437 SMLoc End;
14381437 const MCExpr *Val;
1438 SMLoc Start = Parser.getTok().getLoc(), End;
14391439 if (getParser().parseExpression(Val, End))
14401440 return 0;
14411441
14741474 // Offset, length, type and size operators.
14751475 if (isParsingInlineAsm()) {
14761476 if (AsmTokStr == "offset" || AsmTokStr == "OFFSET")
1477 return ParseIntelOffsetOfOperator(Start);
1477 return ParseIntelOffsetOfOperator();
14781478 if (AsmTokStr == "length" || AsmTokStr == "LENGTH")
1479 return ParseIntelOperator(Start, IOK_LENGTH);
1479 return ParseIntelOperator(IOK_LENGTH);
14801480 if (AsmTokStr == "size" || AsmTokStr == "SIZE")
1481 return ParseIntelOperator(Start, IOK_SIZE);
1481 return ParseIntelOperator(IOK_SIZE);
14821482 if (AsmTokStr == "type" || AsmTokStr == "TYPE")
1483 return ParseIntelOperator(Start, IOK_TYPE);
1483 return ParseIntelOperator(IOK_TYPE);
14841484 }
14851485
14861486 // Immediate.