lkml.org 
[lkml]   [2004]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    SubjectRe: [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/

    \
     
     \ /
      Last update: 2005-03-22 14:00    [W:0.024 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site