public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH, 3/4] readX_check() performance evaluation
@ 2004-01-28  1:54 Hironobu Ishii
  2004-01-28 15:42 ` David Mosberger
  0 siblings, 1 reply; 2+ messages in thread
From: Hironobu Ishii @ 2004-01-28  1:54 UTC (permalink / raw)
  To: linux-kernel, linux-ia64

This is a patch for rawread 1.0.3.
Original rawread 1.0.3 depends on i386.

Thanks, 
Hironobu Ishii

--- rawread.c.old 2004-01-22 19:33:43.000000000 +0900
+++ rawread.c 2004-01-27 23:26:24.406717936 +0900
@@ -94,8 +94,14 @@
 
 __inline__ unsigned long long int rdtsc()
 {
-  unsigned long long int x;
-  __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+ unsigned long long int x;
+#if __i386__
+ __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+#elif __ia64__
+ __asm__ volatile ("mov r8 = ar44");
+#else
+ #error "Please write your own rdtsc()"
+#endif
   return x;
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC/PATCH, 3/4] readX_check() performance evaluation
  2004-01-28  1:54 [RFC/PATCH, 3/4] readX_check() performance evaluation Hironobu Ishii
@ 2004-01-28 15:42 ` David Mosberger
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2004-01-28 15:42 UTC (permalink / raw)
  To: Hironobu Ishii; +Cc: linux-kernel, linux-ia64

>>>>> On Wed, 28 Jan 2004 10:54:42 +0900, Hironobu Ishii <ishii.hironobu@jp.fujitsu.com> said:

  Hironobu> This is a patch for rawread 1.0.3.
  Hironobu> Original rawread 1.0.3 depends on i386.

  Hironobu> --- rawread.c.old 2004-01-22 19:33:43.000000000 +0900
  Hironobu> +++ rawread.c 2004-01-27 23:26:24.406717936 +0900
  Hironobu> @@ -94,8 +94,14 @@

  Hironobu> __inline__ unsigned long long int rdtsc()
  Hironobu> {
  Hironobu> -  unsigned long long int x;
  Hironobu> -  __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
  Hironobu> + unsigned long long int x;
  Hironobu> +#if __i386__
  Hironobu> + __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
  Hironobu> +#elif __ia64__
  Hironobu> + __asm__ volatile ("mov r8 = ar44");
  Hironobu> +#else
  Hironobu> + #error "Please write your own rdtsc()"
  Hironobu> +#endif
  Hironobu> return x;
  Hironobu> }

Inline assembly doesn't work with the Intel compiler on ia64.  I
suggest to use ia64_get_itc() defined in <asm/delay.h> instead.

	--david

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-28 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-28  1:54 [RFC/PATCH, 3/4] readX_check() performance evaluation Hironobu Ishii
2004-01-28 15:42 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox