In the delay loop, mark the scratch register as earlyclobber.

This commit is contained in:
kleink 2004-06-29 12:01:11 +00:00
parent 1fd9249360
commit 1cb7e9cdb5
6 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.12 2003/07/15 01:26:29 lukem Exp $ */
/* $NetBSD: clock.c,v 1.13 2004/06/29 12:01:11 kleink Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.12 2003/07/15 01:26:29 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.13 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -159,7 +159,7 @@ delay(n)
tbl = tb;
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));
: "=&r"(scratch) : "r"(tbh), "r"(tbl));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.6 2003/07/18 21:41:23 thorpej Exp $ */
/* $NetBSD: clock.c,v 1.7 2004/06/29 12:01:11 kleink Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.6 2003/07/18 21:41:23 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.7 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -165,7 +165,7 @@ delay(n)
tbl = tb;
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));
: "=&r"(scratch) : "r"(tbh), "r"(tbl));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.7 2003/07/15 02:46:32 lukem Exp $ */
/* $NetBSD: clock.c,v 1.8 2004/06/29 12:01:11 kleink Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.7 2003/07/15 02:46:32 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -169,7 +169,7 @@ delay(n)
tbl = tb;
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));
: "=&r"(scratch) : "r"(tbh), "r"(tbl));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.4 2003/07/15 02:54:42 lukem Exp $ */
/* $NetBSD: clock.c,v 1.5 2004/06/29 12:01:11 kleink Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.4 2003/07/15 02:54:42 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.5 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -170,7 +170,7 @@ delay(unsigned int n)
tbl = tb;
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));
: "=&r"(scratch) : "r"(tbh), "r"(tbl));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.8 2004/06/23 17:50:42 kleink Exp $ */
/* $NetBSD: clock.c,v 1.9 2004/06/29 12:01:11 kleink Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2004/06/23 17:50:42 kleink Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -285,7 +285,7 @@ delay(n)
}
asm volatile ("1: mfspr %0,%3; cmplw %0,%1; blt 1b; bgt 2f;"
"mfspr %0,%4; cmplw %0,%2; blt 1b; 2:"
: "=r"(scratch)
: "=&r"(scratch)
: "r"(rtc[0]), "r"(rtc[1]), "n"(SPR_RTCU_R), "n"(SPR_RTCL_R)
: "cr0");
} else {
@ -295,7 +295,7 @@ delay(n)
tbl = tb;
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)
: "=&r"(scratch) : "r"(tbh), "r"(tbl)
: "cr0");
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.5 2003/07/15 03:35:50 lukem Exp $ */
/* $NetBSD: clock.c,v 1.6 2004/06/29 12:01:11 kleink Exp $ */
/* $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
/*
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.5 2003/07/15 03:35:50 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.6 2004/06/29 12:01:11 kleink Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -162,7 +162,7 @@ delay(n)
tbl = tb;
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));
: "=&r"(scratch) : "r"(tbh), "r"(tbl));
}
/*