diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-01-24 21:29:13 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-01-24 21:29:13 +0000 |
commit | 5e65302788d68a74e5486f194914f5627eed834e (patch) | |
tree | 55512a4476f56c7ac5783e3c14730b67e07a6e4d /sys/arch/powerpc/include | |
parent | 77d98c6cfe41938f7a46123b03d7f22f3383e62f (diff) |
Optimization base on looking at generated asm code.
also change type of a variable from (void) * to (char *) since it is
incremented as if a (char *).
Diffstat (limited to 'sys/arch/powerpc/include')
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 7a4c581a067..b854c1732ce 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.4 2001/01/15 19:50:39 deraadt Exp $ */ +/* $OpenBSD: cpu.h,v 1.5 2001/01/24 21:29:12 drahn Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -64,17 +64,19 @@ syncicache(from, len) int len; { int l = len; - void *p = from; + char *p = from; do { __asm__ __volatile__ ("dcbst 0,%0" :: "r"(p)); p += CACHELINESIZE; } while ((l -= CACHELINESIZE) > 0); __asm__ __volatile__ ("sync"); + p = from; + l = len; do { - __asm__ __volatile__ ("icbi 0,%0" :: "r"(from)); - from += CACHELINESIZE; - } while ((len -= CACHELINESIZE) > 0); + __asm__ __volatile__ ("icbi 0,%0" :: "r"(p)); + p += CACHELINESIZE; + } while ((l -= CACHELINESIZE) > 0); __asm__ __volatile__ ("isync"); } |