mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Don't leak the old operand when transforming "sldt" into "sldtw".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32c685cb67
commit
aceeb3a4e2
@ -837,8 +837,10 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
// effect (both store to a 16-bit mem). Force to sldtw to avoid ambiguity
|
||||
// errors, since its encoding is the most compact.
|
||||
if (Name == "sldt" && Operands.size() == 2 &&
|
||||
static_cast<X86Operand*>(Operands[1])->isMem())
|
||||
static_cast<X86Operand*>(Operands[1])->isMem()) {
|
||||
delete Operands[0];
|
||||
Operands[0] = X86Operand::CreateToken("sldtw", NameLoc);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user