[llvm] r209280 - [asan] Fix x86-32 asm instrumentation to preserve flags.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed May 21 01:14:24 PDT 2014
Author: eugenis
Date: Wed May 21 03:14:24 2014
New Revision: 209280
URL: http://llvm.org/viewvc/llvm-project?rev=209280&view=rev
Log:
[asan] Fix x86-32 asm instrumentation to preserve flags.
Patch by Yuri Gorshenin.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp?rev=209280&r1=209279&r2=209280&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp Wed May 21 03:14:24 2014
@@ -161,8 +161,7 @@ void X86AddressSanitizer32::InstrumentMe
MCSymbolRefExpr::Create(FuncSym, MCSymbolRefExpr::VK_PLT, Ctx);
EmitInstruction(Out, MCInstBuilder(X86::CALLpcrel32).addExpr(FuncExpr));
}
- EmitInstruction(Out, MCInstBuilder(X86::ADD32ri).addReg(X86::ESP)
- .addReg(X86::ESP).addImm(4));
+ EmitInstruction(Out, MCInstBuilder(X86::POP32r).addReg(X86::EAX));
EmitInstruction(Out, MCInstBuilder(X86::POP32r).addReg(X86::EAX));
}
More information about the llvm-commits
mailing list