X86AsmParser.cpp: Fix memory leak at replacing movsd to movsl.

llvm-svn: 206991
This commit is contained in:
NAKAMURA Takumi 2014-04-23 14:51:35 +00:00
parent c2c6649d61
commit d5696915d4
1 changed files with 3 additions and 1 deletions

View File

@ -2073,8 +2073,10 @@ ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc,
(Name == "smov" || Name == "smovb" || Name == "smovw" ||
Name == "smovl" || Name == "smovd" || Name == "smovq"))) {
if (Operands.size() == 1) {
if (Name == "movsd")
if (Name == "movsd") {
delete Operands.back();
Operands.back() = X86Operand::CreateToken("movsl", NameLoc);
}
if (isParsingIntelSyntax()) {
Operands.push_back(DefaultMemDIOperand(NameLoc));
Operands.push_back(DefaultMemSIOperand(NameLoc));