diff options
author | Ken Thompson <ken@golang.org> | 2009-05-03 19:09:14 -0700 |
---|---|---|
committer | Ken Thompson <ken@golang.org> | 2009-05-03 19:09:14 -0700 |
commit | ce299f204ffca0ca34efc306a91bbaaf5db28057 (patch) | |
tree | 51d3a1c7a98e58d4f96a3813891f5cd9a38dcd3f /src/runtime | |
parent | 44cf55191ce2cfd8295ce49be3626e065df8eb91 (diff) | |
download | golang-ce299f204ffca0ca34efc306a91bbaaf5db28057.tar.gz |
more morestack fiddling
R=r
OCL=28204
CL=28204
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/amd64/asm.s | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/runtime/amd64/asm.s b/src/runtime/amd64/asm.s index 5efcac50e..cad656e70 100644 --- a/src/runtime/amd64/asm.s +++ b/src/runtime/amd64/asm.s @@ -111,6 +111,45 @@ TEXT sys·morestack11+0(SB),7,$0 MOVQ $sys·morestack+0(SB), AX JMP AX +TEXT sys·morestackx(SB),7,$0 + POPQ AX + SHLQ $35, AX + MOVQ AX, 8(R14) + MOVQ $sys·morestack(SB), AX + JMP AX + +// subcases of morestack01 +// with const of 8,16,...48 +TEXT sys·morestack8(SB),7,$0 + PUSHQ $1 + MOVQ $sys·morestackx(SB), AX + JMP AX + +TEXT sys·morestack16(SB),7,$0 + PUSHQ $2 + MOVQ $sys·morestackx(SB), AX + JMP AX + +TEXT sys·morestack24(SB),7,$0 + PUSHQ $3 + MOVQ $sys·morestackx(SB), AX + JMP AX + +TEXT sys·morestack32(SB),7,$0 + PUSHQ $4 + MOVQ $sys·morestackx(SB), AX + JMP AX + +TEXT sys·morestack40(SB),7,$0 + PUSHQ $5 + MOVQ $sys·morestackx(SB), AX + JMP AX + +TEXT sys·morestack48(SB),7,$0 + PUSHQ $6 + MOVQ $sys·morestackx(SB), AX + JMP AX + // return point when leaving new stack. save AX, jmp to lessstack to switch back TEXT retfromnewstack(SB), 7, $0 MOVQ AX, 16(R14) // save AX in m->cret |