From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: [PATCH] use common code for i386 and x86_64 Date: Wed, 30 Apr 2008 17:04:19 -0300 Message-ID: <1209585859614-git-send-email-gcosta@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, avi@qumranet.com To: qemu-devel@nongnu.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone