From af20eaf2e5806c02082399598f98f97815c42bc2 Mon Sep 17 00:00:00 2001 From: pi-rho Date: Mon, 27 Aug 2012 19:20:58 -0500 Subject: [PATCH] fix regression (clobbered register; redmine #534) --- src/util-cpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util-cpu.c b/src/util-cpu.c index 106b7e4cb6..1bb65ca11d 100644 --- a/src/util-cpu.c +++ b/src/util-cpu.c @@ -192,8 +192,10 @@ uint64_t UtilCpuGetTicks(void) #else __asm__ __volatile__ ( "xorl %%eax,%%eax\n\t" + "pushl %%ebx\n\t" "cpuid\n\t" - ::: "%eax", "%ebx", "%ecx", "%edx"); + "popl %%ebx\n\t" + ::: "%eax", "%ecx", "%edx"); #endif uint32_t a, d; __asm__ __volatile__ ("rdtsc" : "=a" (a), "=d" (d)); @@ -206,8 +208,10 @@ uint64_t UtilCpuGetTicks(void) #else __asm__ __volatile__ ( "xorl %%eax,%%eax\n\t" + "pushl %%ebx\n\t" "cpuid\n\t" - ::: "%eax", "%ebx", "%ecx", "%edx"); + "popl %%ebx\n\t" + ::: "%eax", "%ecx", "%edx"); #endif #else /* #if defined(__GNU__) */