diff options
author | Ulf Carlsson <md1ulfc@mdstud.chalmers.se> | 2000-07-02 19:29:58 +0000 |
---|---|---|
committer | Ulf Carlsson <md1ulfc@mdstud.chalmers.se> | 2000-07-02 19:29:58 +0000 |
commit | 3108671b70a6a738882287dff3df59cb8cdd7356 (patch) | |
tree | e6197181010611a4de30187bb7bc8f5e01d5ab4a /include/asm-mips | |
parent | 29400e70508754cc7a8a5aa24693351ca261d4a2 (diff) |
We have to clobber ``hi'' and ``lo'' in __udelay. Nasty bug.
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/delay.h | 3 | ||||
-rw-r--r-- | include/asm-mips/param.h | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index 98fe1ec3d..4030aa6fd 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h @@ -40,7 +40,8 @@ extern __inline__ void __udelay(unsigned long usecs, unsigned long lps) __asm__("multu\t%0,%2\n\t" "mfhi\t%0" :"=r" (usecs) - :"0" (usecs),"r" (lps)); + :"0" (usecs),"r" (lps) + :"hi", "lo"); __delay(usecs); } diff --git a/include/asm-mips/param.h b/include/asm-mips/param.h index 09380c849..86ab4fd57 100644 --- a/include/asm-mips/param.h +++ b/include/asm-mips/param.h @@ -22,9 +22,10 @@ # define HZ_TO_STD(a) \ ({ int __res; \ __asm__( \ - "multu\t%0,%2\n\t" \ + "multu\t%0,%2\n\t" \ "mfhi\t%0" \ - : "=r" (__res): "0" (a), "r" (QUOTIENT)); \ + : "=r" (__res): "0" (a), "r" (QUOTIENT) \ + : "hi", "lo" ); \ __res;}) #else # define HZ 100 |