LEFT | RIGHT |
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 // | 5 // |
6 // System calls and other sys.stuff for AMD64, Linux | 6 // System calls and other sys.stuff for AMD64, Linux |
7 // | 7 // |
8 | 8 |
9 #include "zasm_GOOS_GOARCH.h" | 9 #include "zasm_GOOS_GOARCH.h" |
10 #include "../../cmd/ld/textflag.h" | 10 #include "../../cmd/ld/textflag.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 MOVL op+8(FP), SI | 271 MOVL op+8(FP), SI |
272 MOVL val+12(FP), DX | 272 MOVL val+12(FP), DX |
273 MOVQ ts+16(FP), R10 | 273 MOVQ ts+16(FP), R10 |
274 MOVQ addr2+24(FP), R8 | 274 MOVQ addr2+24(FP), R8 |
275 MOVL val3+32(FP), R9 | 275 MOVL val3+32(FP), R9 |
276 MOVL $202, AX | 276 MOVL $202, AX |
277 SYSCALL | 277 SYSCALL |
278 MOVL AX, ret+40(FP) | 278 MOVL AX, ret+40(FP) |
279 RET | 279 RET |
280 | 280 |
281 // int64 clone(int32 flags, void *stack, M *mp, G *gp, void (*fn)(void)); | 281 // int32 clone(int32 flags, void *stack, M *mp, G *gp, void (*fn)(void)); |
282 TEXT runtime·clone(SB),NOSPLIT,$0 | 282 TEXT runtime·clone(SB),NOSPLIT,$0 |
283 MOVL flags+8(SP), DI | 283 MOVL flags+8(SP), DI |
284 MOVQ stack+16(SP), SI | 284 MOVQ stack+16(SP), SI |
285 | 285 |
286 // Copy mp, gp, fn off parent stack for use by child. | 286 // Copy mp, gp, fn off parent stack for use by child. |
287 // Careful: Linux system call clobbers CX and R11. | 287 // Careful: Linux system call clobbers CX and R11. |
288 MOVQ mm+24(SP), R8 | 288 MOVQ mm+24(SP), R8 |
289 MOVQ gg+32(SP), R9 | 289 MOVQ gg+32(SP), R9 |
290 MOVQ fn+40(SP), R12 | 290 MOVQ fn+40(SP), R12 |
291 | 291 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 RET | 401 RET |
402 | 402 |
403 // void runtime·closeonexec(int32 fd); | 403 // void runtime·closeonexec(int32 fd); |
404 TEXT runtime·closeonexec(SB),NOSPLIT,$0 | 404 TEXT runtime·closeonexec(SB),NOSPLIT,$0 |
405 MOVL fd+0(FP), DI // fd | 405 MOVL fd+0(FP), DI // fd |
406 MOVQ $2, SI // F_SETFD | 406 MOVQ $2, SI // F_SETFD |
407 MOVQ $1, DX // FD_CLOEXEC | 407 MOVQ $1, DX // FD_CLOEXEC |
408 MOVL $72, AX // fcntl | 408 MOVL $72, AX // fcntl |
409 SYSCALL | 409 SYSCALL |
410 RET | 410 RET |
LEFT | RIGHT |