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

Delta Between Two Patch Sets: src/pkg/runtime/sys_nacl_386.s

Issue 109050043: code review 109050043: all: remove 'extern register M *m' from runtime (Closed)
Left Patch Set: Created 10 years, 9 months ago
Right Patch Set: diff -r 2699961d1143 https://code.google.com/p/go/ Created 10 years, 9 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/sys_linux_arm.s ('k') | src/pkg/runtime/sys_nacl_amd64p32.s » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2013 The Go Authors. All rights reserved. 1 // Copyright 2013 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 "zasm_GOOS_GOARCH.h" 5 #include "zasm_GOOS_GOARCH.h"
6 #include "../../cmd/ld/textflag.h" 6 #include "../../cmd/ld/textflag.h"
7 #include "syscall_nacl.h" 7 #include "syscall_nacl.h"
8 8
9 #define NACL_SYSCALL(code) \ 9 #define NACL_SYSCALL(code) \
10 MOVL $(0x10000 + ((code)<<5)), AX; CALL AX 10 MOVL $(0x10000 + ((code)<<5)), AX; CALL AX
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 TEXT runtime·setldt(SB),NOSPLIT,$8 158 TEXT runtime·setldt(SB),NOSPLIT,$8
159 MOVL addr+4(FP), BX // aka base 159 MOVL addr+4(FP), BX // aka base
160 ADDL $0x8, BX 160 ADDL $0x8, BX
161 MOVL BX, 0(SP) 161 MOVL BX, 0(SP)
162 NACL_SYSCALL(SYS_tls_init) 162 NACL_SYSCALL(SYS_tls_init)
163 RET 163 RET
164 164
165 TEXT runtime·sigtramp(SB),NOSPLIT,$0 165 TEXT runtime·sigtramp(SB),NOSPLIT,$0
166 get_tls(CX) 166 get_tls(CX)
167 167
168 » // check that m exists 168 » // check that g exists
169 » MOVL» m(CX), BX 169 » MOVL» g(CX), DI
170 » CMPL» BX, $0 170 » CMPL» DI, $0
171 JNE 6(PC) 171 JNE 6(PC)
172 MOVL $11, BX 172 MOVL $11, BX
173 » MOVL» BX, 0(SP) 173 » MOVL» $0, 0(SP)
174 MOVL $runtime·badsignal(SB), AX 174 MOVL $runtime·badsignal(SB), AX
175 CALL AX 175 CALL AX
176 JMP sigtramp_ret 176 JMP sigtramp_ret
177 177
178 // save g 178 // save g
179 MOVL g(CX), DI
180 MOVL DI, 20(SP) 179 MOVL DI, 20(SP)
181 ········ 180 ········
182 // g = m->gsignal 181 // g = m->gsignal
182 MOVL g_m(DI), BX
183 MOVL m_gsignal(BX), BX 183 MOVL m_gsignal(BX), BX
184 MOVL BX, g(CX) 184 MOVL BX, g(CX)
185 ········ 185 ········
186 // copy arguments for sighandler 186 // copy arguments for sighandler
187 MOVL $11, 0(SP) // signal 187 MOVL $11, 0(SP) // signal
188 MOVL $0, 4(SP) // siginfo 188 MOVL $0, 4(SP) // siginfo
189 LEAL ctxt+4(FP), AX 189 LEAL ctxt+4(FP), AX
190 MOVL AX, 8(SP) // context 190 MOVL AX, 8(SP) // context
191 MOVL DI, 12(SP) // g 191 MOVL DI, 12(SP) // g
192 192
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 MOVL 4(BP), CX 234 MOVL 4(BP), CX
235 MOVL 8(BP), DX 235 MOVL 8(BP), DX
236 MOVL 12(BP), BX 236 MOVL 12(BP), BX
237 MOVL 16(BP), SP 237 MOVL 16(BP), SP
238 // 20(BP) is saved BP, never to be seen again 238 // 20(BP) is saved BP, never to be seen again
239 MOVL 24(BP), SI 239 MOVL 24(BP), SI
240 MOVL 28(BP), DI 240 MOVL 28(BP), DI
241 // 36(BP) is saved EFLAGS, never to be seen again 241 // 36(BP) is saved EFLAGS, never to be seen again
242 MOVL 32(BP), BP // saved PC 242 MOVL 32(BP), BP // saved PC
243 JMP BP 243 JMP BP
LEFTRIGHT

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