Commit 12e46e42 authored by Keith Randall's avatar Keith Randall

runtime: don't mark the new call trampolines as NOSPLIT.

They may call other NOSPLIT routines, and that might
overflow the stack.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12563043
parent b29d035f
......@@ -336,8 +336,8 @@ TEXT reflect·call(SB), 7, $0-12
MOVL $runtime·badreflectcall(SB), AX
JMP AX
#define CALLFN(NAME,MAXSIZE,FLAGS) \
TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-12; \
#define CALLFN(NAME,MAXSIZE) \
TEXT runtime·NAME(SB), 0, $MAXSIZE-12; \
/* copy arguments to stack */ \
MOVL argptr+4(FP), SI; \
MOVL argsize+8(FP), CX; \
......@@ -353,33 +353,33 @@ TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-12; \
REP;MOVSB; \
RET
CALLFN(call16, 16, 7)
CALLFN(call32, 32, 7)
CALLFN(call64, 64, 7)
CALLFN(call128, 128, 0)
CALLFN(call256, 256, 0)
CALLFN(call512, 512, 0)
CALLFN(call1024, 1024, 0)
CALLFN(call2048, 2048, 0)
CALLFN(call4096, 4096, 0)
CALLFN(call8192, 8192, 0)
CALLFN(call16384, 16384, 0)
CALLFN(call32768, 32768, 0)
CALLFN(call65536, 65536, 0)
CALLFN(call131072, 131072, 0)
CALLFN(call262144, 262144, 0)
CALLFN(call524288, 524288, 0)
CALLFN(call1048576, 1048576, 0)
CALLFN(call2097152, 2097152, 0)
CALLFN(call4194304, 4194304, 0)
CALLFN(call8388608, 8388608, 0)
CALLFN(call16777216, 16777216, 0)
CALLFN(call33554432, 33554432, 0)
CALLFN(call67108864, 67108864, 0)
CALLFN(call134217728, 134217728, 0)
CALLFN(call268435456, 268435456, 0)
CALLFN(call536870912, 536870912, 0)
CALLFN(call1073741824, 1073741824, 0)
CALLFN(call16, 16)
CALLFN(call32, 32)
CALLFN(call64, 64)
CALLFN(call128, 128)
CALLFN(call256, 256)
CALLFN(call512, 512)
CALLFN(call1024, 1024)
CALLFN(call2048, 2048)
CALLFN(call4096, 4096)
CALLFN(call8192, 8192)
CALLFN(call16384, 16384)
CALLFN(call32768, 32768)
CALLFN(call65536, 65536)
CALLFN(call131072, 131072)
CALLFN(call262144, 262144)
CALLFN(call524288, 524288)
CALLFN(call1048576, 1048576)
CALLFN(call2097152, 2097152)
CALLFN(call4194304, 4194304)
CALLFN(call8388608, 8388608)
CALLFN(call16777216, 16777216)
CALLFN(call33554432, 33554432)
CALLFN(call67108864, 67108864)
CALLFN(call134217728, 134217728)
CALLFN(call268435456, 268435456)
CALLFN(call536870912, 536870912)
CALLFN(call1073741824, 1073741824)
// Return point when leaving stack.
//
......
......@@ -317,8 +317,8 @@ TEXT reflect·call(SB), 7, $0-20
MOVQ $runtime·badreflectcall(SB), AX
JMP AX
#define CALLFN(NAME,MAXSIZE,FLAGS) \
TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-20; \
#define CALLFN(NAME,MAXSIZE) \
TEXT runtime·NAME(SB), 0, $MAXSIZE-20; \
/* copy arguments to stack */ \
MOVQ argptr+8(FP), SI; \
MOVLQZX argsize+16(FP), CX; \
......@@ -334,33 +334,33 @@ TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-20; \
REP;MOVSB; \
RET
CALLFN(call16, 16, 7)
CALLFN(call32, 32, 7)
CALLFN(call64, 64, 7)
CALLFN(call128, 128, 0)
CALLFN(call256, 256, 0)
CALLFN(call512, 512, 0)
CALLFN(call1024, 1024, 0)
CALLFN(call2048, 2048, 0)
CALLFN(call4096, 4096, 0)
CALLFN(call8192, 8192, 0)
CALLFN(call16384, 16384, 0)
CALLFN(call32768, 32768, 0)
CALLFN(call65536, 65536, 0)
CALLFN(call131072, 131072, 0)
CALLFN(call262144, 262144, 0)
CALLFN(call524288, 524288, 0)
CALLFN(call1048576, 1048576, 0)
CALLFN(call2097152, 2097152, 0)
CALLFN(call4194304, 4194304, 0)
CALLFN(call8388608, 8388608, 0)
CALLFN(call16777216, 16777216, 0)
CALLFN(call33554432, 33554432, 0)
CALLFN(call67108864, 67108864, 0)
CALLFN(call134217728, 134217728, 0)
CALLFN(call268435456, 268435456, 0)
CALLFN(call536870912, 536870912, 0)
CALLFN(call1073741824, 1073741824, 0)
CALLFN(call16, 16)
CALLFN(call32, 32)
CALLFN(call64, 64)
CALLFN(call128, 128)
CALLFN(call256, 256)
CALLFN(call512, 512)
CALLFN(call1024, 1024)
CALLFN(call2048, 2048)
CALLFN(call4096, 4096)
CALLFN(call8192, 8192)
CALLFN(call16384, 16384)
CALLFN(call32768, 32768)
CALLFN(call65536, 65536)
CALLFN(call131072, 131072)
CALLFN(call262144, 262144)
CALLFN(call524288, 524288)
CALLFN(call1048576, 1048576)
CALLFN(call2097152, 2097152)
CALLFN(call4194304, 4194304)
CALLFN(call8388608, 8388608)
CALLFN(call16777216, 16777216)
CALLFN(call33554432, 33554432)
CALLFN(call67108864, 67108864)
CALLFN(call134217728, 134217728)
CALLFN(call268435456, 268435456)
CALLFN(call536870912, 536870912)
CALLFN(call1073741824, 1073741824)
// Return point when leaving stack.
//
......
......@@ -292,8 +292,8 @@ TEXT reflect·call(SB), 7, $-4-12
MOVW $runtime·badreflectcall(SB), R1
B (R1)
#define CALLFN(NAME,MAXSIZE,FLAGS) \
TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-12; \
#define CALLFN(NAME,MAXSIZE) \
TEXT runtime·NAME(SB), 0, $MAXSIZE-12; \
/* copy arguments to stack */ \
MOVW argptr+4(FP), R0; \
MOVW argsize+8(FP), R2; \
......@@ -319,33 +319,33 @@ TEXT runtime·NAME(SB), FLAGS, $MAXSIZE-12; \
SUB $1, R2, R2; \
B -5(PC) \
CALLFN(call16, 16, 7)
CALLFN(call32, 32, 7)
CALLFN(call64, 64, 7)
CALLFN(call128, 128, 0)
CALLFN(call256, 256, 0)
CALLFN(call512, 512, 0)
CALLFN(call1024, 1024, 0)
CALLFN(call2048, 2048, 0)
CALLFN(call4096, 4096, 0)
CALLFN(call8192, 8192, 0)
CALLFN(call16384, 16384, 0)
CALLFN(call32768, 32768, 0)
CALLFN(call65536, 65536, 0)
CALLFN(call131072, 131072, 0)
CALLFN(call262144, 262144, 0)
CALLFN(call524288, 524288, 0)
CALLFN(call1048576, 1048576, 0)
CALLFN(call2097152, 2097152, 0)
CALLFN(call4194304, 4194304, 0)
CALLFN(call8388608, 8388608, 0)
CALLFN(call16777216, 16777216, 0)
CALLFN(call33554432, 33554432, 0)
CALLFN(call67108864, 67108864, 0)
CALLFN(call134217728, 134217728, 0)
CALLFN(call268435456, 268435456, 0)
CALLFN(call536870912, 536870912, 0)
CALLFN(call1073741824, 1073741824, 0)
CALLFN(call16, 16)
CALLFN(call32, 32)
CALLFN(call64, 64)
CALLFN(call128, 128)
CALLFN(call256, 256)
CALLFN(call512, 512)
CALLFN(call1024, 1024)
CALLFN(call2048, 2048)
CALLFN(call4096, 4096)
CALLFN(call8192, 8192)
CALLFN(call16384, 16384)
CALLFN(call32768, 32768)
CALLFN(call65536, 65536)
CALLFN(call131072, 131072)
CALLFN(call262144, 262144)
CALLFN(call524288, 524288)
CALLFN(call1048576, 1048576)
CALLFN(call2097152, 2097152)
CALLFN(call4194304, 4194304)
CALLFN(call8388608, 8388608)
CALLFN(call16777216, 16777216)
CALLFN(call33554432, 33554432)
CALLFN(call67108864, 67108864)
CALLFN(call134217728, 134217728)
CALLFN(call268435456, 268435456)
CALLFN(call536870912, 536870912)
CALLFN(call1073741824, 1073741824)
// Return point when leaving stack.
// using frame size $-4 means do not save LR on stack.
......
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