diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-12-23 05:11:58 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-23 06:28:55 +0800 |
commit | a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a (patch) | |
tree | 7816983cdeea6e6c32dd005c76da785811ea3047 /sysdeps/x86/tst-memrchr-rtm.c | |
parent | 3fb895ac88e99201573352b1abc18db4340ecede (diff) | |
download | glibc-a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a.zip glibc-a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a.tar.gz glibc-a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a.tar.bz2 |
include/sys/cdefs.h: Add __attribute_optimization_barrier__
Add __attribute_optimization_barrier__ to disable inlining and cloning on a
function. For Clang, expand it to
__attribute__ ((optnone))
Otherwise, expand it to
__attribute__ ((noinline, clone))
Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sysdeps/x86/tst-memrchr-rtm.c')
-rw-r--r-- | sysdeps/x86/tst-memrchr-rtm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/tst-memrchr-rtm.c b/sysdeps/x86/tst-memrchr-rtm.c index 48512de..f597081 100644 --- a/sysdeps/x86/tst-memrchr-rtm.c +++ b/sysdeps/x86/tst-memrchr-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ static int prepare (void) { @@ -36,7 +36,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ static int function (void) { |