[asan-assembly-instrumentation] Added instrumentation for REP MOVS.
Details
Diff Detail
Event Timeline
lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp | ||
---|---|---|
54 | InstrumentMOVS has a return value that you probably want to check here for early exit. | |
181 | In memcpy() we check shadow for entire source and destination ranges. I guess it's not easy to do efficiently in asm, but at least leave a FIXME. Also, this code does push eax/ecx/edx/flags four times - once for each InstrumentMemOperand. Factor prologue/epilogue generation out of InstrumentMemOperand? | |
lib/Target/X86/AsmParser/X86AsmParser.cpp | ||
2287 | This looks too complex, with some of the original instructions emitted directly in AsmParser, and some (REP) in instrumentation code. Could we always emit original instruction (as needed) in InstrumentInstruction? | |
test/Instrumentation/AddressSanitizer/X86/asm_rep_movs.ll | ||
72 | get rid of this metadata if it's not used in the test |
PTAL
lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp | ||
---|---|---|
54 | I'd prefer to get rid of return values for Instrument*() methods, as they're complicate the logic. | |
181 | I've added FIXME comments for both issues. Would you mind if I'll resolve second issue in a next CL? | |
lib/Target/X86/AsmParser/X86AsmParser.cpp | ||
2287 | Done. | |
test/Instrumentation/AddressSanitizer/X86/asm_rep_movs.ll | ||
72 | Done. |
InstrumentMOVS has a return value that you probably want to check here for early exit.