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

Side by Side Diff: src/runtime/sys_netbsd_386.s

Issue 168510043: [dev.cc] code review 168510043: runtime: convert assembly files for C to Go transition (Closed)
Patch Set: diff -r 022e3ed374e79747b98f073a69de1c7c6ca53efc https://code.google.com/p/go Created 10 years, 4 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/runtime/sys_nacl_arm.s ('k') | src/runtime/sys_netbsd_amd64.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 // System calls and other sys.stuff for 386, NetBSD 5 // System calls and other sys.stuff for 386, NetBSD
6 // /usr/src/sys/kern/syscalls.master for syscall numbers. 6 // /usr/src/sys/kern/syscalls.master for syscall numbers.
7 // 7 //
8 8
9 #include "zasm_GOOS_GOARCH.h" 9 #include "go_asm.h"
10 #include "go_tls.h"
10 #include "textflag.h" 11 #include "textflag.h"
11 12
12 // Exit the entire program (like C exit) 13 // Exit the entire program (like C exit)
13 TEXT runtime·exit(SB),NOSPLIT,$-4 14 TEXT runtime·exit(SB),NOSPLIT,$-4
14 MOVL $1, AX 15 MOVL $1, AX
15 INT $0x80 16 INT $0x80
16 MOVL $0xf1, 0xf1 // crash 17 MOVL $0xf1, 0xf1 // crash
17 RET 18 RET
18 19
19 TEXT runtime·exit1(SB),NOSPLIT,$-4 20 TEXT runtime·exit1(SB),NOSPLIT,$-4
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 MOVL $92, AX // fcntl 376 MOVL $92, AX // fcntl
376 // 0(SP) is where the caller PC would be; kernel skips it 377 // 0(SP) is where the caller PC would be; kernel skips it
377 MOVL fd+0(FP), BX 378 MOVL fd+0(FP), BX
378 MOVL BX, 4(SP) // fd 379 MOVL BX, 4(SP) // fd
379 MOVL $2, 8(SP) // F_SETFD 380 MOVL $2, 8(SP) // F_SETFD
380 MOVL $1, 12(SP) // FD_CLOEXEC 381 MOVL $1, 12(SP) // FD_CLOEXEC
381 INT $0x80 382 INT $0x80
382 JAE 2(PC) 383 JAE 2(PC)
383 NEGL AX 384 NEGL AX
384 RET 385 RET
OLDNEW
« no previous file with comments | « src/runtime/sys_nacl_arm.s ('k') | src/runtime/sys_netbsd_amd64.s » ('j') | no next file with comments »

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