]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - benchtests/bench-util.h
po: Incorporate translations (sr)
[thirdparty/glibc.git] / benchtests / bench-util.h
index 96df95407bc43795978d170addb75fc5a2b44a8a..91d9089237d0d25ffce01bf73a00c6286fadc154 100644 (file)
@@ -1,5 +1,5 @@
 /* Benchmark utility functions.
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
+/* Prevent compiler to optimize away call.  */
+#define DO_NOT_OPTIMIZE_OUT(value)               \
+  ({                                             \
+    __typeof (value) __v = (value);              \
+    asm volatile ("" : : "r,m" (__v) : "memory"); \
+    __v;                                         \
+  })
 
 #ifndef START_ITER
 # define START_ITER (100000000)