Commit c10336bf authored by Niels Möller's avatar Niels Möller

nettle-benchmark: Add volatile to inline asm.

parent 09def119
2019-01-09 Niels Möller <nisse@lysator.liu.se>
* examples/nettle-benchmark.c (GET_CYCLE_COUNTER): Add volatile to
inline asm.
2019-01-08 Niels Möller <nisse@lysator.liu.se>
* sha512-compress.c: Add missing include of sha2-internal.h.
......
......@@ -92,7 +92,7 @@ static double frequency = 0.0;
#if WITH_CYCLE_COUNTER
# if defined(__i386__)
#define GET_CYCLE_COUNTER(hi, lo) \
__asm__("xorl %%eax,%%eax\n" \
__asm__ volatile ("xorl %%eax,%%eax\n" \
"movl %%ebx, %%edi\n" \
"cpuid\n" \
"rdtsc\n" \
......@@ -102,7 +102,7 @@ static double frequency = 0.0;
: "%edi", "%ecx", "cc")
# elif defined(__x86_64__)
#define GET_CYCLE_COUNTER(hi, lo) \
__asm__("xorl %%eax,%%eax\n" \
__asm__ volatile ("xorl %%eax,%%eax\n" \
"mov %%rbx, %%r10\n" \
"cpuid\n" \
"rdtsc\n" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment