From: Glauber Costa <gcosta@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm-devel@lists.sourceforge.net
Subject: [Qemu-devel] [PATCH] use common code for i386 and x86_64
Date: Wed, 30 Apr 2008 17:04:19 -0300 [thread overview]
Message-ID: <1209585859614-git-send-email-gcosta@redhat.com> (raw)
There is no reason why should i386 and x86_64 code for rdtsc be different.
Unify them.
---
cpu-all.h | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/cpu-all.h b/cpu-all.h
index 2a2b197..1c9e2a3 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -930,16 +930,7 @@ static inline int64_t cpu_get_real_ticks(void)
return ((int64_t)h << 32) | l;
}
-#elif defined(__i386__)
-
-static inline int64_t cpu_get_real_ticks(void)
-{
- int64_t val;
- asm volatile ("rdtsc" : "=A" (val));
- return val;
-}
-
-#elif defined(__x86_64__)
+#elif defined(__i386__) || defined(__x86_64__)
static inline int64_t cpu_get_real_ticks(void)
{
--
1.5.0.6
next reply other threads:[~2008-04-30 20:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 20:04 Glauber Costa [this message]
2008-05-03 23:45 ` [Qemu-devel] [PATCH] use common code for i386 and x86_64 Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1209585859614-git-send-email-gcosta@redhat.com \
--to=gcosta@redhat.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).