Make all the ppc delay() functions the same - formating change only, no

code changes.  Step one of a unified ppc clock.c.
This commit is contained in:
simonb 2001-06-19 08:34:49 +00:00
parent a8068ab82d
commit 43eba60849
4 changed files with 17 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.7 2000/01/19 02:52:18 msaitoh Exp $ */ /* $NetBSD: clock.c,v 1.8 2001/06/19 08:34:49 simonb Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */ /* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/* /*
@ -166,8 +166,9 @@ delay(n)
tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
tbh = tb >> 32; tbh = tb >> 32;
tbl = tb; tbl = tb;
asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:" asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
:: "r"(scratch), "r"(tbh), "r"(tbl)); "mftb %0; cmplw %0,%2; blt 1b; 2:"
: "=r"(scratch) : "r"(tbh), "r"(tbl));
} }
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.3 2000/01/19 02:52:20 msaitoh Exp $ */ /* $NetBSD: clock.c,v 1.4 2001/06/19 08:34:50 simonb Exp $ */
/* /*
* Copyright (C) 1995, 1996 Wolfgang Solfrank. * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -177,7 +177,7 @@ microtime(tvp)
*/ */
void void
delay(n) delay(n)
unsigned n; unsigned int n;
{ {
u_quad_t tb; u_quad_t tb;
u_long tbh, tbl, scratch; u_long tbh, tbl, scratch;
@ -186,8 +186,9 @@ delay(n)
tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
tbh = tb >> 32; tbh = tb >> 32;
tbl = tb; tbl = tb;
asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:" asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
:: "r"(scratch), "r"(tbh), "r"(tbl)); "mftb %0; cmplw %0,%2; blt 1b; 2:"
: "=r"(scratch) : "r"(tbh), "r"(tbl));
} }
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.1 2000/02/29 15:21:47 nonaka Exp $ */ /* $NetBSD: clock.c,v 1.2 2001/06/19 08:34:50 simonb Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */ /* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/* /*
@ -320,7 +320,7 @@ delay(n)
tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
tbh = tb >> 32; tbh = tb >> 32;
tbl = tb; tbl = tb;
asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:" asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
:: "r"(scratch), "r"(tbh), "r"(tbl)); "mftb %0; cmplw %0,%2; blt 1b; 2:"
: "=r"(scratch) : "r"(tbh), "r"(tbl));
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.1 2001/02/04 18:32:17 briggs Exp $ */ /* $NetBSD: clock.c,v 1.2 2001/06/19 08:34:51 simonb Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */ /* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/* /*
@ -168,8 +168,9 @@ delay(n)
tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
tbh = tb >> 32; tbh = tb >> 32;
tbl = tb; tbl = tb;
asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:" asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
:: "r"(scratch), "r"(tbh), "r"(tbl)); "mftb %0; cmplw %0,%2; blt 1b; 2:"
: "=r"(scratch) : "r"(tbh), "r"(tbl));
} }
/* /*