]> Cypherpunks repositories - gostls13.git/commitdiff
add cache flushing call after generating closure.
authorKai Backman <kaib@golang.org>
Thu, 12 Nov 2009 07:23:11 +0000 (23:23 -0800)
committerKai Backman <kaib@golang.org>
Thu, 12 Nov 2009 07:23:11 +0000 (23:23 -0800)
        go/test: passes 88% (306/347)

R=rsc
https://golang.org/cl/152089

src/pkg/runtime/arm/closure.c
src/pkg/runtime/linux/arm/sys.s

index b0aa2ad8b08d82ad07b3a025ded8525ba60fb97f..f36e812cbb32bd3d5f00b502b1f8277900e3cc7a 100644 (file)
@@ -43,6 +43,8 @@ vars:         WORD    arg0
                WORD    arg2
 */
 
+extern void cacheflush(byte* start, byte* end);
+
 #pragma textflag 7
 void
 runtime·closure(int32 siz, byte *fn, byte *arg0)
@@ -121,5 +123,7 @@ runtime·closure(int32 siz, byte *fn, byte *arg0)
 
        if(p > q)
                throw("bad math in sys.closure");
+
+       cacheflush(*ret, q+siz);
 }
 
index 00472ef79cb3b987efa35e2f79c61e068d33450e..f11646d5b4e092cf03a20a18ff5583a1c4aae497 100644 (file)
@@ -22,6 +22,9 @@
 #define SYS_futex (SYS_BASE + 240)
 #define SYS_exit_group (SYS_BASE + 248)
 
+#define ARM_BASE (SYS_BASE + 0x0f0000)
+#define SYS_ARM_cacheflush (ARM_BASE + 2)
+
 TEXT write(SB),7,$0
        MOVW    0(FP), R0
        MOVW    4(FP), R1
@@ -136,3 +139,11 @@ TEXT clone(SB),7,$0
        MOVW    R0, (R1)
 
 
+TEXT cacheflush(SB),7,$0
+       MOVW    0(FP), R0
+       MOVW    4(FP), R1
+       MOVW    $0, R2
+       MOVW    $SYS_ARM_cacheflush, R7
+       SWI     $0
+       RET
+