summaryrefslogtreecommitdiff
path: root/test/safestack/utils.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-06 18:41:23 +0000
commitf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (patch)
treeb259e5d585da0f8cde9579939a74d5ef44c72abd /test/safestack/utils.h
parentcd2dd3df15523e2be8d2bbace27641d6ac9fa40d (diff)
Notes
Diffstat (limited to 'test/safestack/utils.h')
-rw-r--r--test/safestack/utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/safestack/utils.h b/test/safestack/utils.h
new file mode 100644
index 0000000000000..b04e3bdc127ed
--- /dev/null
+++ b/test/safestack/utils.h
@@ -0,0 +1,8 @@
+#ifndef UTILS_H
+#define UTILS_H
+
+static inline void break_optimization(void *arg) {
+ __asm__ __volatile__("" : : "r" (arg) : "memory");
+}
+
+#endif