Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Make all the ppc delay() functions the same - forma...



details:   https://anonhg.NetBSD.org/src/rev/fc0b2182ae62
branches:  trunk
changeset: 511406:fc0b2182ae62
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Jun 19 08:34:49 2001 +0000

description:
Make all the ppc delay() functions the same - formating change only, no
code changes.  Step one of a unified ppc clock.c.

diffstat:

 sys/arch/bebox/bebox/clock.c         |  7 ++++---
 sys/arch/ofppc/ofppc/clock.c         |  9 +++++----
 sys/arch/prep/prep/clock.c           |  8 ++++----
 sys/arch/sandpoint/sandpoint/clock.c |  7 ++++---
 4 files changed, 17 insertions(+), 14 deletions(-)

diffs (92 lines):

diff -r 2af5a3cdaae2 -r fc0b2182ae62 sys/arch/bebox/bebox/clock.c
--- a/sys/arch/bebox/bebox/clock.c      Tue Jun 19 08:24:07 2001 +0000
+++ b/sys/arch/bebox/bebox/clock.c      Tue Jun 19 08:34:49 2001 +0000
@@ -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 $  */
 
 /*
@@ -166,8 +166,9 @@
        tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
        tbh = tb >> 32;
        tbl = tb;
-       asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:"
-            :: "r"(scratch), "r"(tbh), "r"(tbl));
+       asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
+                     "mftb %0; cmplw %0,%2; blt 1b; 2:"
+                     : "=r"(scratch) : "r"(tbh), "r"(tbl));
 }
 
 /*
diff -r 2af5a3cdaae2 -r fc0b2182ae62 sys/arch/ofppc/ofppc/clock.c
--- a/sys/arch/ofppc/ofppc/clock.c      Tue Jun 19 08:24:07 2001 +0000
+++ b/sys/arch/ofppc/ofppc/clock.c      Tue Jun 19 08:34:49 2001 +0000
@@ -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.
@@ -177,7 +177,7 @@
  */
 void
 delay(n)
-       unsigned n;
+       unsigned int n;
 {
        u_quad_t tb;
        u_long tbh, tbl, scratch;
@@ -186,8 +186,9 @@
        tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
        tbh = tb >> 32;
        tbl = tb;
-       asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:"
-            :: "r"(scratch), "r"(tbh), "r"(tbl));
+       asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
+                     "mftb %0; cmplw %0,%2; blt 1b; 2:"
+                     : "=r"(scratch) : "r"(tbh), "r"(tbl));
 }
 
 /*
diff -r 2af5a3cdaae2 -r fc0b2182ae62 sys/arch/prep/prep/clock.c
--- a/sys/arch/prep/prep/clock.c        Tue Jun 19 08:24:07 2001 +0000
+++ b/sys/arch/prep/prep/clock.c        Tue Jun 19 08:34:49 2001 +0000
@@ -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 $ */
 
 /*
@@ -320,7 +320,7 @@
        tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
        tbh = tb >> 32;
        tbl = tb;
-       asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:"
-            :: "r"(scratch), "r"(tbh), "r"(tbl));
+       asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
+                     "mftb %0; cmplw %0,%2; blt 1b; 2:"
+                     : "=r"(scratch) : "r"(tbh), "r"(tbl));
 }
-
diff -r 2af5a3cdaae2 -r fc0b2182ae62 sys/arch/sandpoint/sandpoint/clock.c
--- a/sys/arch/sandpoint/sandpoint/clock.c      Tue Jun 19 08:24:07 2001 +0000
+++ b/sys/arch/sandpoint/sandpoint/clock.c      Tue Jun 19 08:34:49 2001 +0000
@@ -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 $  */
 
 /*
@@ -168,8 +168,9 @@
        tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick;
        tbh = tb >> 32;
        tbl = tb;
-       asm ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw %0,%2; blt 1b; 2:"
-            :: "r"(scratch), "r"(tbh), "r"(tbl));
+       asm volatile ("1: mftbu %0; cmplw %0,%1; blt 1b; bgt 2f;"
+                     "mftb %0; cmplw %0,%2; blt 1b; 2:"
+                     : "=r"(scratch) : "r"(tbh), "r"(tbl));
 }
 
 /*



Home | Main Index | Thread Index | Old Index