Re: [RFC/PATCH, 3/4] readX_check() performance evaluation

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2004-01-29 02:42:54
>>>>> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jan 28 10:51:21 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:21 EST