From cc51a7f76eb2e4bac1f0df0016d7fd8c2ac34e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 12 Jul 2022 16:33:27 +0300 Subject: [PATCH] mdbx: minor refine attributes-related macros for LCC. --- src/base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base.h b/src/base.h index e5297745..ebd54fc2 100644 --- a/src/base.h +++ b/src/base.h @@ -548,6 +548,8 @@ __extern_C key_t ftok(const char *, int); (defined(__linux__) || defined(__gnu_linux__)) /* just put frequently used functions in separate section */ #define __hot __attribute__((__section__("text.hot"))) __optimize("O3") +#elif defined(__LCC__) +#define __hot __attribute__((__hot__, __optimize__("Ofast,O4"))) #elif defined(__GNUC__) || __has_attribute(__hot__) #define __hot __attribute__((__hot__)) __optimize("O3") #else @@ -567,6 +569,8 @@ __extern_C key_t ftok(const char *, int); (defined(__linux__) || defined(__gnu_linux__)) /* just put infrequently used functions in separate section */ #define __cold __attribute__((__section__("text.unlikely"))) __optimize("Os") +#elif defined(__LCC__) +#define __hot __attribute__((__cold__, __optimize__("Osize"))) #elif defined(__GNUC__) || __has_attribute(cold) #define __cold __attribute__((__cold__)) __optimize("Os") #else