diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-15 23:52:00 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-15 23:52:00 +0300 |
commit | 0f5bf1aafe0ca073d958f271bd96addc6da8fe10 (patch) | |
tree | cce61b051e01bd71046c1a95af6ee10f6d8a50ac | |
parent | 422396cecef271e4c40e4654a7b5af1208e28a92 (diff) |
py/mpconfig.h: MP_NOINLINE is universally useful, move from unix port.
-rw-r--r-- | py/mpconfig.h | 5 | ||||
-rw-r--r-- | unix/mpconfigport.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 084fc246f..25aac8b7e 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1031,6 +1031,11 @@ typedef double mp_float_t; #define MP_WEAK __attribute__((weak)) #endif +// Modifier for functions which should be never inlined +#ifndef MP_NOINLINE +#define MP_NOINLINE __attribute__((noinline)) +#endif + // Condition is likely to be true, to help branch prediction #ifndef MP_LIKELY #define MP_LIKELY(x) __builtin_expect((x), 1) diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 9601673a7..7f976fdad 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -234,10 +234,6 @@ void mp_unix_mark_exec(void); #define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size) #define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size) -#ifndef MP_NOINLINE -#define MP_NOINLINE __attribute__((noinline)) -#endif - #if MICROPY_PY_OS_DUPTERM #define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) #else |