On Thursday 14 April 2011 01:08 pm, Jung-uk Kim wrote:
> Author: jkim
> Date: Thu Apr 14 17:08:23 2011
> New Revision: 220632
> URL: http://svn.freebsd.org/changeset/base/220632
>
> Log:
> Use newly added rdtsc32() for the timecounter_get_t method.
It only seems to make big difference in amd64, probably because
rdtsc() is implemented differently in inline asm.
tsc_get_timecount (before):
pushq %rbp
movq %rsp, %rbp
rdtsc
mov %eax, %eax
salq $32, %rdx
leave
orq %rax, %rdx
movl %edx, %eax
ret
tsc_get_timecount (after):
pushq %rbp
movq %rsp, %rbp
rdtsc
leave
ret
Similar problem was also observed when it is inlined.
BTW, clang does not have this issue. :-)
Jung-uk Kim
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"