Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@ycbcr.xyz>2018-09-28 14:13:44 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-09-28 14:13:44 +0300
commit449a81e7ba8a9622f4d928a10f1b39d5efd37f2a (patch)
tree77a4f691b4e569de892730c218a7e1ef72768757 /include
parent58261250109337fc1f4cb2a9330fe3aa868e9d3f (diff)
Don't use hardcoded __attribute__((noinline))
Diffstat (limited to 'include')
-rw-r--r--include/common/attributes.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h
index a5347d2..78ee474 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -51,6 +51,17 @@
#define ALIGN_STK_16(type, var, sz1d, sznd) \
ALIGN(type var[sz1d]sznd, 16)
+/*
+ * Forbid inlining of a function:
+ * static NOINLINE void func() {}
+ */
+#ifdef _MSC_VER
+#define NOINLINE __declspec(noinline)
+#else /* !_MSC_VER */
+#define NOINLINE __attribute__((noinline))
+#endif /* !_MSC_VER */
+
+
#ifdef _MSC_VER
#include <intrin.h>