[PATCH] [asan-asm-instrumentation] Fixed memory accesses with rbp as a base or an index register.
Yuri Gorshenin
ygorshenin at chromium.org
Tue Oct 21 02:51:42 PDT 2014
Many thanks!
================
Comment at: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp:74
@@ -68,2 +73,3 @@
unsigned addressReg(MVT::SimpleValueType VT) const {
+ return convReg(BusyRegs[0], VT);
----------------
eugenis wrote:
> I think these should start with a capital letter.
Done.
================
Comment at: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp:79
@@ -73,3 +78,3 @@
unsigned shadowReg(MVT::SimpleValueType VT) const {
- return getX86SubSuperRegister(ShadowReg, VT);
+ return convReg(BusyRegs[1], VT);
}
----------------
eugenis wrote:
> I'd prefer named constants (or an enum) instead of magic index constants 0, 1, 2.
Done.
================
Comment at: lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp:92
@@ +91,3 @@
+ addBusyReg(Op.getMemBaseReg());
+ addBusyReg(Op.getMemIndexReg());
+ }
----------------
eugenis wrote:
> This may add NoRegister to BusyRegs, better avoid it.
Done.
http://reviews.llvm.org/D5819
More information about the llvm-commits
mailing list