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

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

Issue 6569068: code review 6569068: pkg/runtime: Plan 9: add support for recover() and pani... (Closed)
Left Patch Set: diff -r 43203aa69a8a https://code.google.com/p/go Created 11 years, 2 months ago
Right Patch Set: diff -r 5b5399bc3335 https://code.google.com/p/go Created 11 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/sys_plan9_386.s ('k') | src/pkg/runtime/thread_plan9.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 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 6
7 // setldt(int entry, int address, int limit) 7 // setldt(int entry, int address, int limit)
8 TEXT runtime·setldt(SB),7,$0 8 TEXT runtime·setldt(SB),7,$0
9 RET 9 RET
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 TEXT runtime·settls(SB),7,$0 145 TEXT runtime·settls(SB),7,$0
146 RET 146 RET
147 147
148 // void sigtramp(void *ureg, int8 *note) 148 // void sigtramp(void *ureg, int8 *note)
149 TEXT runtime·sigtramp(SB),7,$0 149 TEXT runtime·sigtramp(SB),7,$0
150 get_tls(AX) 150 get_tls(AX)
151 151
152 // check that m exists 152 // check that m exists
153 MOVQ m(AX), BX 153 MOVQ m(AX), BX
154 CMPQ BX, $0 154 CMPQ BX, $0
155 » JNE» 4(PC) 155 » JNE» 3(PC)
156 » MOVQ» $0, 8(SP)
157 CALL runtime·badsignal(SB) // will exit 156 CALL runtime·badsignal(SB) // will exit
158 RET 157 RET
159 158
160 // save args 159 // save args
161 MOVQ ureg+8(SP), CX 160 MOVQ ureg+8(SP), CX
162 MOVQ note+16(SP), DX 161 MOVQ note+16(SP), DX
163 162
164 // change stack 163 // change stack
165 MOVQ m_gsignal(BX), R10 164 MOVQ m_gsignal(BX), R10
166 MOVQ g_stackbase(R10), BP 165 MOVQ g_stackbase(R10), BP
167 MOVQ BP, SP 166 MOVQ BP, SP
168 167
169 // make room for args and g 168 // make room for args and g
170 » SUBQ» $40, SP 169 » SUBQ» $32, SP
171 170
172 // save g 171 // save g
173 MOVQ g(AX), BP 172 MOVQ g(AX), BP
174 » MOVQ» BP, 32(SP) 173 » MOVQ» BP, 24(SP)
175 174
176 // g = m->gsignal 175 // g = m->gsignal
177 MOVQ R10, g(AX) 176 MOVQ R10, g(AX)
178 177
179 // load args and call sighandler 178 // load args and call sighandler
180 MOVQ CX, 0(SP) 179 MOVQ CX, 0(SP)
181 MOVQ DX, 8(SP) 180 MOVQ DX, 8(SP)
182 MOVQ BP, 16(SP) 181 MOVQ BP, 16(SP)
183 182
184 CALL runtime·sighandler(SB) 183 CALL runtime·sighandler(SB)
185 184
186 // restore g 185 // restore g
187 get_tls(BX) 186 get_tls(BX)
188 » MOVQ» 32(SP), R10 187 » MOVQ» 24(SP), R10
189 MOVQ R10, g(BX) 188 MOVQ R10, g(BX)
190 189
191 // call noted(AX) 190 // call noted(AX)
192 MOVQ AX, 0(SP) 191 MOVQ AX, 0(SP)
193 CALL runtime·noted(SB) 192 CALL runtime·noted(SB)
194 RET 193 RET
195 194
196 TEXT runtime·setfpmasks(SB),7,$8 195 TEXT runtime·setfpmasks(SB),7,$8
197 STMXCSR 0(SP) 196 STMXCSR 0(SP)
198 MOVL 0(SP), AX 197 MOVL 0(SP), AX
199 ANDL $~0x3F, AX 198 ANDL $~0x3F, AX
200 ORL $(0x3F<<7), AX 199 ORL $(0x3F<<7), AX
201 MOVL AX, 0(SP) 200 MOVL AX, 0(SP)
202 LDMXCSR 0(SP) 201 LDMXCSR 0(SP)
203 RET 202 RET
LEFTRIGHT

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