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

Side by Side Diff: src/pkg/runtime/386/asm.s

Issue 1696051: code review 1696051: runtime: implementation of callback functions for windows (Closed)
Patch Set: code review 1696051: runtime: implementation of callback functions for windows Created 13 years, 2 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:
View unified diff | Download patch
« no previous file with comments | « src/pkg/exp/wingui/zwinapi.go ('k') | src/pkg/runtime/windows/386/sys.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 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 "386/asm.h" 5 #include "386/asm.h"
6 6
7 TEXT _rt0_386(SB),7,$0 7 TEXT _rt0_386(SB),7,$0
8 // copy arguments forward on an even stack 8 // copy arguments forward on an even stack
9 MOVL 0(SP), AX // argc 9 MOVL 0(SP), AX // argc
10 LEAL 4(SP), BX // argv 10 LEAL 4(SP), BX // argv
(...skipping 29 matching lines...) Expand all
40 get_tls(BX) 40 get_tls(BX)
41 LEAL runtime·g0(SB), CX 41 LEAL runtime·g0(SB), CX
42 MOVL CX, g(BX) 42 MOVL CX, g(BX)
43 LEAL runtime·m0(SB), AX 43 LEAL runtime·m0(SB), AX
44 MOVL AX, m(BX) 44 MOVL AX, m(BX)
45 45
46 // save m->g0 = g0 46 // save m->g0 = g0
47 MOVL CX, m_g0(AX) 47 MOVL CX, m_g0(AX)
48 48
49 // create istack out of the OS stack 49 // create istack out of the OS stack
50 » LEAL» (-8192+104)(SP), AX» // TODO: 104? 50 » LEAL» (-16*1024+104)(SP), AX» // TODO: 104?
51 MOVL AX, g_stackguard(CX) 51 MOVL AX, g_stackguard(CX)
52 MOVL SP, g_stackbase(CX) 52 MOVL SP, g_stackbase(CX)
53 CALL runtime·emptyfunc(SB) // fault if stack check is wrong 53 CALL runtime·emptyfunc(SB) // fault if stack check is wrong
54 54
55 // convention is D is always cleared 55 // convention is D is always cleared
56 CLD 56 CLD
57 57
58 CALL runtime·check(SB) 58 CALL runtime·check(SB)
59 59
60 // saved argc, argv 60 // saved argc, argv
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 MOVL g(CX), AX 409 MOVL g(CX), AX
410 CMPL g_stackbase(AX), SP 410 CMPL g_stackbase(AX), SP
411 JHI 2(PC) 411 JHI 2(PC)
412 INT $3 412 INT $3
413 CMPL SP, g_stackguard(AX) 413 CMPL SP, g_stackguard(AX)
414 JHI 2(PC) 414 JHI 2(PC)
415 INT $3 415 INT $3
416 RET 416 RET
417 417
418 GLOBL runtime·tls0(SB), $32 418 GLOBL runtime·tls0(SB), $32
OLDNEW
« no previous file with comments | « src/pkg/exp/wingui/zwinapi.go ('k') | src/pkg/runtime/windows/386/sys.s » ('j') | no next file with comments »

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