diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-04 21:08:06 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-04 21:08:06 +0000 |
commit | ac0cb1e1bcd5fc14f316c4758fd6f95a9d9811e0 (patch) | |
tree | c14649dcc320fb6e818db27da38df6ebccd2b5ef /include/asm-mips64/delay.h | |
parent | 6bfb3b8f2afaaa0ca16118347e82d5d0590606cc (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-mips64/delay.h')
-rw-r--r-- | include/asm-mips64/delay.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/asm-mips64/delay.h b/include/asm-mips64/delay.h index f62188abc..b2d28e9bf 100644 --- a/include/asm-mips64/delay.h +++ b/include/asm-mips64/delay.h @@ -1,12 +1,11 @@ -/* $Id$ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1994 by Waldorf Electronics - * Copyright (C) 1995 - 1999 by Ralf Baechle - * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 1995 - 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ #ifndef _ASM_DELAY_H #define _ASM_DELAY_H @@ -39,12 +38,12 @@ __delay(unsigned long loops) */ extern __inline__ void __udelay(unsigned long usecs, unsigned long lps) { + unsigned long lo; + usecs *= 0x000010c6f7a0b5edUL; /* 2**64 / 1000000 */ - __asm__("dmultu\t%0,%2\n\t" - "mfhi\t%0" - :"=r" (usecs) - :"0" (usecs),"r" (lps) - :"hi", "lo"); + __asm__("dmultu\t%2,%3" + :"=h" (usecs), "=l" (lo) + :"r" (usecs),"r" (lps)); __delay(usecs); } |