summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-07 22:36:05 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-07 22:36:05 +0300
commit1bc2911174aa975bbcb15cd70dd2dabfc7c8c535 (patch)
tree149262ad105fd0c5ec3923543f8f735eb9b99cd4 /py/mpconfig.h
parentd2cab0b7beebcc4f56f06a9748685cf05bced9a6 (diff)
downloadmicropython-1bc2911174aa975bbcb15cd70dd2dabfc7c8c535.tar.gz
micropython-1bc2911174aa975bbcb15cd70dd2dabfc7c8c535.zip
py/mpconfig.h: Define MP_ALWAYSINLINE for reuse.
Similar to existing MP_NOINLINE.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 45e7a80ef5..3808df7430 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -1073,6 +1073,11 @@ typedef double mp_float_t;
#define MP_NOINLINE __attribute__((noinline))
#endif
+// Modifier for functions which should be always inlined
+#ifndef MP_ALWAYSINLINE
+#define MP_ALWAYSINLINE __attribute__((always_inline))
+#endif
+
// Condition is likely to be true, to help branch prediction
#ifndef MP_LIKELY
#define MP_LIKELY(x) __builtin_expect((x), 1)