mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:24:12 +08:00
mdbx: minor refine attributes-related macros for LCC.
This commit is contained in:
parent
a82f59a998
commit
cc51a7f76e
@ -548,6 +548,8 @@ __extern_C key_t ftok(const char *, int);
|
|||||||
(defined(__linux__) || defined(__gnu_linux__))
|
(defined(__linux__) || defined(__gnu_linux__))
|
||||||
/* just put frequently used functions in separate section */
|
/* just put frequently used functions in separate section */
|
||||||
#define __hot __attribute__((__section__("text.hot"))) __optimize("O3")
|
#define __hot __attribute__((__section__("text.hot"))) __optimize("O3")
|
||||||
|
#elif defined(__LCC__)
|
||||||
|
#define __hot __attribute__((__hot__, __optimize__("Ofast,O4")))
|
||||||
#elif defined(__GNUC__) || __has_attribute(__hot__)
|
#elif defined(__GNUC__) || __has_attribute(__hot__)
|
||||||
#define __hot __attribute__((__hot__)) __optimize("O3")
|
#define __hot __attribute__((__hot__)) __optimize("O3")
|
||||||
#else
|
#else
|
||||||
@ -567,6 +569,8 @@ __extern_C key_t ftok(const char *, int);
|
|||||||
(defined(__linux__) || defined(__gnu_linux__))
|
(defined(__linux__) || defined(__gnu_linux__))
|
||||||
/* just put infrequently used functions in separate section */
|
/* just put infrequently used functions in separate section */
|
||||||
#define __cold __attribute__((__section__("text.unlikely"))) __optimize("Os")
|
#define __cold __attribute__((__section__("text.unlikely"))) __optimize("Os")
|
||||||
|
#elif defined(__LCC__)
|
||||||
|
#define __hot __attribute__((__cold__, __optimize__("Osize")))
|
||||||
#elif defined(__GNUC__) || __has_attribute(cold)
|
#elif defined(__GNUC__) || __has_attribute(cold)
|
||||||
#define __cold __attribute__((__cold__)) __optimize("Os")
|
#define __cold __attribute__((__cold__)) __optimize("Os")
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user