mdbx: add __cold/__hot for Elbrus.

This commit is contained in:
Leo Yuriev 2018-03-07 12:23:41 +03:00
parent a93fafceff
commit ad4c5d8972

View File

@ -268,7 +268,9 @@
#ifndef __hot
# if defined(__OPTIMIZE__)
# if defined(__clang__) && !__has_attribute(hot)
# if defined(__e2k__)
# define __hot __attribute__((hot)) __optimize(3)
# elif defined(__clang__) && !__has_attribute(hot)
/* just put frequently used functions in separate section */
# define __hot __attribute__((section("text.hot"))) __optimize("O3")
# elif defined(__GNUC__) || __has_attribute(hot)
@ -283,7 +285,9 @@
#ifndef __cold
# if defined(__OPTIMIZE__)
# if defined(__clang__) && !__has_attribute(cold)
# if defined(__e2k__)
# define __cold __attribute__((cold)) __optimize(1)
# elif defined(__clang__) && !__has_attribute(cold)
/* just put infrequently used functions in separate section */
# define __cold __attribute__((section("text.unlikely"))) __optimize("Os")
# elif defined(__GNUC__) || __has_attribute(cold)