diff --git a/lisp/sparc-assem.S b/lisp/sparc-assem.S
index 3f13eb572fea663785a81166ebbd8b00f7460e10..deac3575e69e700f385cf2bce15ed5bcaa1a678d 100644
--- a/lisp/sparc-assem.S
+++ b/lisp/sparc-assem.S
@@ -290,9 +290,14 @@ _function_end_breakpoint_end:
 	.global _flush_icache
 	FUNCDEF(_flush_icache)
 _flush_icache:
-	iflush %i0			! flush instruction cache
+        add %o0,%o1,%o2
+1:      iflush %o0			! flush instruction cache
+        add %o0,8,%o0
+        cmp %o0,%o2
+        blt 1b
+        nop
 	retl				! return from leaf routine
-	nop
+        nop
 	SET_SIZE(_flush_icache)
 
 #ifndef SOLARIS