summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/delay.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-04 21:08:06 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-04 21:08:06 +0000
commitac0cb1e1bcd5fc14f316c4758fd6f95a9d9811e0 (patch)
treec14649dcc320fb6e818db27da38df6ebccd2b5ef /include/asm-mips/delay.h
parent6bfb3b8f2afaaa0ca16118347e82d5d0590606cc (diff)
Rewrite __udelay() once again. The old code was possibly resulting in
``forbidden or unknown register spilled'' compile errors with error line numbers pointing to some unrelated line.
Diffstat (limited to 'include/asm-mips/delay.h')
-rw-r--r--include/asm-mips/delay.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h
index 4030aa6fd..7628fe4a8 100644
--- a/include/asm-mips/delay.h
+++ b/include/asm-mips/delay.h
@@ -36,12 +36,12 @@ __delay(unsigned long loops)
*/
extern __inline__ void __udelay(unsigned long usecs, unsigned long lps)
{
+ unsigned long lo;
+
usecs *= 0x000010c6; /* 2**32 / 1000000 */
- __asm__("multu\t%0,%2\n\t"
- "mfhi\t%0"
- :"=r" (usecs)
- :"0" (usecs),"r" (lps)
- :"hi", "lo");
+ __asm__("multu\t%2,%3"
+ :"=h" (usecs), "=l" (lo)
+ :"r" (usecs),"r" (lps));
__delay(usecs);
}