From daa0b1c9c07a0d9483ee07ce4d3aa950b19e17ef Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 15 Sep 2017 21:05:46 -0400 Subject: Don't inline measure_helper It breaks the ability to use bp in inline asm --- measure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'measure.c') diff --git a/measure.c b/measure.c index 18f07468d..8b206550e 100644 --- a/measure.c +++ b/measure.c @@ -89,7 +89,7 @@ void UUT(unsigned char*); // use of bp in inline assembly if you have a variable-length array or // alloca in the code; see // https://stackoverflow.com/questions/46248430/how-can-i-determine-preferably-at-compile-time-whether-gcc-is-using-rbp-based?noredirect=1#comment79462384_46248430 -void measure_helper(int n, unsigned char *buf, long long* cycles) +void __attribute__ ((noinline)) measure_helper(int n, unsigned char *buf, long long* cycles) { for (int i = 0;i <= n;++i) { cycles[i] = cpucycles(); -- cgit v1.2.3