Messages in this thread Patch in this message | | | From | David Mosberger <> | Date | Wed, 28 Jan 2004 07:42:54 -0800 | Subject | Re: [RFC/PATCH, 3/4] readX_check() performance evaluation |
| |
>>>>> 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |