LEFT | RIGHT |
(no file at all) | |
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, OpenBSD | 5 // System calls and other sys.stuff for 386, OpenBSD |
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 "zasm_GOOS_GOARCH.h" |
10 | 10 |
11 // Exit the entire program (like C exit) | 11 // Exit the entire program (like C exit) |
12 TEXT runtime·exit(SB),7,$-4 | 12 TEXT runtime·exit(SB),7,$-4 |
13 MOVL $1, AX | 13 MOVL $1, AX |
14 INT $0x80 | 14 INT $0x80 |
15 MOVL $0xf1, 0xf1 // crash | 15 MOVL $0xf1, 0xf1 // crash |
16 RET | 16 RET |
17 | 17 |
18 TEXT runtime·exit1(SB),7,$8 | 18 TEXT runtime·exit1(SB),7,$8 |
19 MOVL $0, 0(SP) | 19 MOVL $0, 0(SP) |
20 MOVL $0, 4(SP) // arg 1 - notdead | 20 MOVL $0, 4(SP) // arg 1 - notdead |
21 MOVL $302, AX // sys___threxit | 21 MOVL $302, AX // sys___threxit |
22 INT $0x80 | 22 INT $0x80 |
23 JAE 2(PC) | 23 JAE 2(PC) |
24 MOVL $0xf1, 0xf1 // crash | 24 MOVL $0xf1, 0xf1 // crash |
| 25 RET |
| 26 |
| 27 TEXT runtime·open(SB),7,$-4 |
| 28 MOVL $5, AX |
| 29 INT $0x80 |
| 30 RET |
| 31 |
| 32 TEXT runtime·close(SB),7,$-4 |
| 33 MOVL $6, AX |
| 34 INT $0x80 |
| 35 RET |
| 36 |
| 37 TEXT runtime·read(SB),7,$-4 |
| 38 MOVL $3, AX |
| 39 INT $0x80 |
25 RET | 40 RET |
26 | 41 |
27 TEXT runtime·write(SB),7,$-4 | 42 TEXT runtime·write(SB),7,$-4 |
28 MOVL $4, AX // sys_write | 43 MOVL $4, AX // sys_write |
29 INT $0x80 | 44 INT $0x80 |
30 RET | 45 RET |
31 | 46 |
32 TEXT runtime·usleep(SB),7,$20 | 47 TEXT runtime·usleep(SB),7,$20 |
33 MOVL $0, DX | 48 MOVL $0, DX |
34 MOVL usec+0(FP), AX | 49 MOVL usec+0(FP), AX |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 MOVSL // arg 6 - newlen | 344 MOVSL // arg 6 - newlen |
330 MOVL $202, AX // sys___sysctl | 345 MOVL $202, AX // sys___sysctl |
331 INT $0x80 | 346 INT $0x80 |
332 JCC 3(PC) | 347 JCC 3(PC) |
333 NEGL AX | 348 NEGL AX |
334 RET | 349 RET |
335 MOVL $0, AX | 350 MOVL $0, AX |
336 RET | 351 RET |
337 | 352 |
338 GLOBL runtime·tlsoffset(SB),$4 | 353 GLOBL runtime·tlsoffset(SB),$4 |
LEFT | RIGHT |