From b199fef6748293fa147fcd95c8634df1cd11872c Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 18 Feb 2019 11:02:13 +0100 Subject: [PATCH] Update comments and move commented asm into common function. --- bench/bench-string.cpp | 1 - bench/common.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/bench-string.cpp b/bench/bench-string.cpp index 2ec92958..85f7f26a 100644 --- a/bench/bench-string.cpp +++ b/bench/bench-string.cpp @@ -90,7 +90,6 @@ extern "C" { * optimizing too much the inline functions and literraly breaking * the benchmark by doing nothing. */ -//#define BARRIER(addr) ({ volatile void *p = (void*) &addr ; asm volatile("": "+r" (p) : :"memory"); }) #define BARRIER(addr) compiler_barrier((void*) addr) bool print_csv = false; diff --git a/bench/common.c b/bench/common.c index e05f3d8d..31ade56e 100644 --- a/bench/common.c +++ b/bench/common.c @@ -29,4 +29,6 @@ void compiler_barrier(void *p) { // Do nothing, but let the compiler thinks that we did. (void) p; + // Can be used for FLTO building + // asm volatile("": "+r" (p) : :"memory"); }