Commit 0f5bf1aa authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py/mpconfig.h: MP_NOINLINE is universally useful, move from unix port.

parent 422396ce
...@@ -1031,6 +1031,11 @@ typedef double mp_float_t; ...@@ -1031,6 +1031,11 @@ typedef double mp_float_t;
#define MP_WEAK __attribute__((weak)) #define MP_WEAK __attribute__((weak))
#endif #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 // Condition is likely to be true, to help branch prediction
#ifndef MP_LIKELY #ifndef MP_LIKELY
#define MP_LIKELY(x) __builtin_expect((x), 1) #define MP_LIKELY(x) __builtin_expect((x), 1)
......
...@@ -234,10 +234,6 @@ void mp_unix_mark_exec(void); ...@@ -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_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) #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 #if MICROPY_PY_OS_DUPTERM
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) #define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
#else #else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment