mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-03 09:14:30 +00:00
[asan] Fix x86-32 asm instrumentation to preserve flags.
Patch by Yuri Gorshenin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8235ed1808
commit
c0e669384d
@ -161,8 +161,7 @@ void X86AddressSanitizer32::InstrumentMemOperandImpl(
|
||||
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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user