Deleted Added
full compact
X86AsmParser.cpp (203954) X86AsmParser.cpp (205218)
1//===-- 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//===----------------------------------------------------------------------===//

--- 528 unchanged lines hidden (view full) ---

537 // Parse and remember the operand.
538 if (X86Operand *Op = ParseOperand())
539 Operands.push_back(Op);
540 else
541 return true;
542 }
543 }
544
1//===-- 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//===----------------------------------------------------------------------===//

--- 528 unchanged lines hidden (view full) ---

537 // Parse and remember the operand.
538 if (X86Operand *Op = ParseOperand())
539 Operands.push_back(Op);
540 else
541 return true;
542 }
543 }
544
545 // FIXME: Hack to handle recognizing s{hr,ar,hl}? $1.
546 if ((Name.startswith("shr") || Name.startswith("sar") ||
547 Name.startswith("shl")) &&
548 Operands.size() == 3 &&
549 static_cast<X86Operand*>(Operands[1])->isImm() &&
550 isa<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm()) &&
551 cast<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm())->getValue() == 1)
552 Operands.erase(Operands.begin() + 1);
553
545 return false;
546}
547
548bool X86ATTAsmParser::ParseDirective(AsmToken DirectiveID) {
549 StringRef IDVal = DirectiveID.getIdentifier();
550 if (IDVal == ".word")
551 return ParseDirectiveWord(2, DirectiveID.getLoc());
552 return true;

--- 37 unchanged lines hidden ---
554 return false;
555}
556
557bool X86ATTAsmParser::ParseDirective(AsmToken DirectiveID) {
558 StringRef IDVal = DirectiveID.getIdentifier();
559 if (IDVal == ".word")
560 return ParseDirectiveWord(2, DirectiveID.getLoc());
561 return true;

--- 37 unchanged lines hidden ---