Commit ad46183e authored by Cedric Roux's avatar Cedric Roux
Browse files

fix rdtsc usage

One user had a problem compiling oaisim.
This commit fixes it.

The compilation log was saying:

    In function UE_thread_rxn_txnp4:

    error: inconsistent operand constraints in an asm

         __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));

parent 184d51c6
......@@ -373,9 +373,9 @@ void *log_thread_function(void * list);
/* @}*/
static __inline__ uint64_t rdtsc(void) {
uint64_t a, d;
uint32_t a, d;
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
return (d<<32) | a;
return (((uint64_t)d)<<32) | ((uint64_t)a);
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