mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
X86AsmParser.cpp: Fix memory leak at replacing movsd to movsl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206991 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2073,8 +2073,10 @@ ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc,
|
|||||||
(Name == "smov" || Name == "smovb" || Name == "smovw" ||
|
(Name == "smov" || Name == "smovb" || Name == "smovw" ||
|
||||||
Name == "smovl" || Name == "smovd" || Name == "smovq"))) {
|
Name == "smovl" || Name == "smovd" || Name == "smovq"))) {
|
||||||
if (Operands.size() == 1) {
|
if (Operands.size() == 1) {
|
||||||
if (Name == "movsd")
|
if (Name == "movsd") {
|
||||||
|
delete Operands.back();
|
||||||
Operands.back() = X86Operand::CreateToken("movsl", NameLoc);
|
Operands.back() = X86Operand::CreateToken("movsl", NameLoc);
|
||||||
|
}
|
||||||
if (isParsingIntelSyntax()) {
|
if (isParsingIntelSyntax()) {
|
||||||
Operands.push_back(DefaultMemDIOperand(NameLoc));
|
Operands.push_back(DefaultMemDIOperand(NameLoc));
|
||||||
Operands.push_back(DefaultMemSIOperand(NameLoc));
|
Operands.push_back(DefaultMemSIOperand(NameLoc));
|
||||||
|
Reference in New Issue
Block a user