summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-03-14 08:58:04 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-03-14 08:58:04 +0000
commit49e2625144e0d3b4cb7bf1f404c6a376850faaec (patch)
treea56946fbf1e5310b6ac32da650d032f05c8e024f /llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h
parenta53cf970a142a6a45e274423abce33d71701caa6 (diff)
downloadbcm5719-llvm-49e2625144e0d3b4cb7bf1f404c6a376850faaec.tar.gz
bcm5719-llvm-49e2625144e0d3b4cb7bf1f404c6a376850faaec.zip
AddressSanitizer instrumentation for MOV and MOVAPS.
This is an initial version of *Sanitizer instrumentation of assembly code. Patch by Yuri Gorshenin. llvm-svn: 203908
Diffstat (limited to 'llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h')
-rw-r--r--llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h b/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h
new file mode 100644
index 00000000000..c783a788d4a
--- /dev/null
+++ b/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h
@@ -0,0 +1,46 @@
+//===- X86AsmInstrumentation.h - Instrument X86 inline assembly *- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef X86_ASM_INSTRUMENTATION_H
+#define X86_ASM_INSTRUMENTATION_H
+
+#include "llvm/ADT/SmallVector.h"
+
+namespace llvm {
+
+class MCContext;
+class MCInst;
+class MCParsedAsmOperand;
+class MCStreamer;
+class MCSubtargetInfo;
+
+class X86AsmInstrumentation;
+
+X86AsmInstrumentation *CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
+
+class X86AsmInstrumentation {
+public:
+ virtual ~X86AsmInstrumentation();
+
+ // Instruments Inst. Should be called just before the original
+ // instruction is sent to Out.
+ virtual void InstrumentInstruction(
+ const MCInst &Inst, SmallVectorImpl<MCParsedAsmOperand *> &Operands,
+ MCContext &Ctx, MCStreamer &Out);
+
+protected:
+ friend X86AsmInstrumentation *
+ CreateX86AsmInstrumentation(MCSubtargetInfo &STI);
+
+ X86AsmInstrumentation();
+};
+
+} // End llvm namespace
+
+#endif // X86_ASM_INSTRUMENTATION_H
OpenPOWER on IntegriCloud