aboutsummaryrefslogtreecommitdiff
path: root/measure.c
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-09-15 21:05:46 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-09-15 21:05:46 -0400
commitdaa0b1c9c07a0d9483ee07ce4d3aa950b19e17ef (patch)
treed2f763defe1fe6e212cfb176f6ea58001df24a38 /measure.c
parentcb293cf0cb1a0d008022ef55cad29aa8a3827508 (diff)
Don't inline measure_helper
It breaks the ability to use bp in inline asm
Diffstat (limited to 'measure.c')
-rw-r--r--measure.c2
1 files changed, 1 insertions, 1 deletions
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();