From 0b0e40da7af7ab987d5564b86f9698578e72feba Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 26 Dec 1997 20:15:03 +0000 Subject: [PATCH] Reorder to a more conventional if/then/else/endif structure. --- sys/i386/i386/microtime.s | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/sys/i386/i386/microtime.s b/sys/i386/i386/microtime.s index c845d59d1e94..8a496585f566 100644 --- a/sys/i386/i386/microtime.s +++ b/sys/i386/i386/microtime.s @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: Steve McCanne's microtime code - * $Id: microtime.s,v 1.34 1997/10/28 15:58:09 bde Exp $ + * $Id: microtime.s,v 1.35 1997/12/15 02:18:19 tegge Exp $ */ #include @@ -50,11 +50,20 @@ ENTRY(microtime) #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) movl _i586_ctr_freq, %ecx testl %ecx, %ecx - jne pentium_microtime + je i8254_microtime + pushfl + cli + .byte 0x0f, 0x31 /* RDTSC */ + subl _i586_ctr_bias, %eax + mull _i586_ctr_multiplier + movl %edx, %eax + jmp common_microtime #else xorl %ecx, %ecx /* clear ecx */ #endif + ALIGN_TEXT +i8254_microtime: movb $TIMER_SEL0|TIMER_LATCH, %al /* prepare to latch */ pushfl @@ -221,15 +230,3 @@ common_microtime: movl %eax, 4(%ecx) /* tvp->tv_usec = usec */ ret - -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) - ALIGN_TEXT -pentium_microtime: - pushfl - cli - .byte 0x0f, 0x31 /* RDTSC */ - subl _i586_ctr_bias, %eax - mull _i586_ctr_multiplier - movl %edx, %eax - jmp common_microtime -#endif