summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-12-26 20:15:03 +0000
committerphk <phk@FreeBSD.org>1997-12-26 20:15:03 +0000
commit6d1e02dc5293a4b97cba9d1c40ca155eedc83e72 (patch)
tree1380e858ebac70d3eb97f210be85e56c2b9ae48f
parent189dfbf9f0a574d03435371e9f4c44dbccf01190 (diff)
downloadFreeBSD-src-6d1e02dc5293a4b97cba9d1c40ca155eedc83e72.zip
FreeBSD-src-6d1e02dc5293a4b97cba9d1c40ca155eedc83e72.tar.gz
Reorder to a more conventional if/then/else/endif structure.
-rw-r--r--sys/i386/i386/microtime.s25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/i386/i386/microtime.s b/sys/i386/i386/microtime.s
index c845d59..8a49658 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 <machine/asmacros.h>
@@ -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
OpenPOWER on IntegriCloud