Commit c2d2bfcc authored by Dave Cheney's avatar Dave Cheney

runtime: fix freebsd/arm instruction cache flush

sysarch requires arguments to be passed on the stack, not in registers.

Credit to Shenghou Ma (minux) for the fix.

R=minux.ma, devon.odell
CC=golang-dev
https://golang.org/cl/7037043
parent 52dc13b5
......@@ -244,11 +244,16 @@ TEXT runtime·sigprocmask(SB),7,$0
MOVW.CS R9, (R9)
RET
TEXT runtime·cacheflush(SB),7,$0
TEXT runtime·cacheflush(SB),7,$8
MOVW $1, R0 // drain_writebuf
SWI $165 // sysarch
MOVW $0, R0 // icacheflush
MOVW 0(FP), R1 // start
MOVW R1, 4(R13)
MOVW 4(FP), R2 // end
SUB R1, R2 // R2 = length
MOVW R2, 8(R13)
MOVW $4(R13), R1
SWI $165 // sysarch
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