[llvm-commits] [llvm] r113200 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Chris Lattner
clattner at apple.com
Tue Sep 7 08:38:13 PDT 2010
On Sep 7, 2010, at 7:40 AM, Benjamin Kramer wrote:
> Author: d0k
> Date: Tue Sep 7 09:40:58 2010
> New Revision: 113200
>
> URL: http://llvm.org/viewvc/llvm-project?rev=113200&view=rev
> Log:
> Don't leak the old operand when transforming "sldt" into "sldtw".
Oops, thanks!
-Chris
>
> Modified:
> llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
>
> Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=113200&r1=113199&r2=113200&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
> +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Sep 7 09:40:58 2010
> @@ -837,8 +837,10 @@
> // 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;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list