Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1315)

Delta Between Two Patch Sets: src/pkg/runtime/windows/amd64/sys.s

Issue 4960057: code review 4960057: runtime: implement pprof support for windows (Closed)
Left Patch Set: diff -r 805742b53bf3 https://go.googlecode.com/hg/ Created 12 years, 6 months ago
Right Patch Set: diff -r b80728111ff9 https://go.googlecode.com/hg/ Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include "amd64/asm.h" 5 #include "amd64/asm.h"
6 6
7 #define maxargs 12 7 #define maxargs 12
8 8
9 // void runtime·asmstdcall(void *c); 9 // void runtime·asmstdcall(void *c);
10 TEXT runtime·asmstdcall(SB),7,$0 10 TEXT runtime·asmstdcall(SB),7,$0
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 CALL runtime·externalthreadhandler(SB) 113 CALL runtime·externalthreadhandler(SB)
114 RET 114 RET
115 115
116 TEXT runtime·externalthreadhandler(SB),7,$0 116 TEXT runtime·externalthreadhandler(SB),7,$0
117 PUSHQ BP 117 PUSHQ BP
118 MOVQ SP, BP 118 MOVQ SP, BP
119 PUSHQ BX 119 PUSHQ BX
120 PUSHQ SI 120 PUSHQ SI
121 PUSHQ DI 121 PUSHQ DI
122 PUSHQ 0x58(GS) 122 PUSHQ 0x58(GS)
123 » MOVQ» SP, BX 123 » MOVQ» SP, DX
124 124
125 // setup dummy m, g 125 // setup dummy m, g
126 SUBQ $m_end, SP // space for M 126 SUBQ $m_end, SP // space for M
127 MOVQ SP, 0(SP)
128 MOVQ $m_end, 8(SP)
129 CALL runtime·memclr(SB) // smashes AX,BX,CX
130
127 LEAQ m_tls(SP), CX 131 LEAQ m_tls(SP), CX
128 MOVQ CX, 0x58(GS) 132 MOVQ CX, 0x58(GS)
129 MOVQ SP, m(CX) 133 MOVQ SP, m(CX)
130 » MOVQ» SP, DX 134 » MOVQ» SP, BX
131 SUBQ $g_end, SP // space for G 135 SUBQ $g_end, SP // space for G
132 MOVQ SP, g(CX) 136 MOVQ SP, g(CX)
133 » MOVQ» SP, m_g0(DX) 137 » MOVQ» SP, m_g0(BX)
138
139 » MOVQ» SP, 0(SP)
140 » MOVQ» $g_end, 8(SP)
141 » CALL» runtime·memclr(SB)» // smashes AX,BX,CX
134 LEAQ -8192(SP), CX 142 LEAQ -8192(SP), CX
135 MOVQ CX, g_stackguard(SP) 143 MOVQ CX, g_stackguard(SP)
136 » MOVQ» BX, g_stackbase(SP) 144 » MOVQ» DX, g_stackbase(SP)
137 145
138 PUSHQ 32(BP) // arg for handler 146 PUSHQ 32(BP) // arg for handler
139 CALL 16(BP) 147 CALL 16(BP)
140 POPQ CX 148 POPQ CX
141 149
142 get_tls(CX) 150 get_tls(CX)
143 MOVQ g(CX), CX 151 MOVQ g(CX), CX
144 MOVQ g_stackbase(CX), SP 152 MOVQ g_stackbase(CX), SP
145 POPQ 0x58(GS) 153 POPQ 0x58(GS)
146 POPQ DI 154 POPQ DI
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 TEXT runtime·notok(SB),7,$0 269 TEXT runtime·notok(SB),7,$0
262 MOVQ $0xf1, BP 270 MOVQ $0xf1, BP
263 MOVQ BP, (BP) 271 MOVQ BP, (BP)
264 RET 272 RET
265 273
266 // set tls base to DI 274 // set tls base to DI
267 TEXT runtime·settls(SB),7,$0 275 TEXT runtime·settls(SB),7,$0
268 CALL runtime·setstacklimits(SB) 276 CALL runtime·setstacklimits(SB)
269 MOVQ DI, 0x58(GS) 277 MOVQ DI, 0x58(GS)
270 RET 278 RET
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b