Commit 6dbd1429 authored by Kai Backman's avatar Kai Backman

add cache flushing call after generating closure.

        go/test: passes 88% (306/347)

R=rsc
https://golang.org/cl/152089
parent e5636d6e
......@@ -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);
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment