aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-i386/helper.c2
-rw-r--r--vl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index e61b05dc5c..d7cb6849b4 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1796,7 +1796,7 @@ void helper_rdtsc(void)
{
uint64_t val;
#if defined(__i386__) || defined(__x86_64__)
- asm("rdtsc" : "=A" (val));
+ asm volatile ("rdtsc" : "=A" (val));
#else
/* better than nothing: the time increases */
val = emu_time++;
diff --git a/vl.c b/vl.c
index ed5c380151..24895508d0 100644
--- a/vl.c
+++ b/vl.c
@@ -341,7 +341,7 @@ int64_t cpu_get_real_ticks(void)
int64_t cpu_get_real_ticks(void)
{
int64_t val;
- asm("rdtsc" : "=A" (val));
+ asm volatile ("rdtsc" : "=A" (val));
return val;
}