| // Copyright 2013 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| #include "../runtime/syscall_nacl.h" |
| // System call support for amd64, Native Client |
| #define NACL_SYSCALL(code) \ |
| MOVL $(0x10000 + ((code)<<5)), AX; CALL AX |
| #define NACL_SYSJMP(code) \ |
| MOVL $(0x10000 + ((code)<<5)), AX; JMP AX |
| TEXT ·Syscall(SB),NOSPLIT,$0-28 |
| CALL runtime·entersyscall(SB) |
| // more args would use CX, R8, R9 |
| CALL runtime·exitsyscall(SB) |
| CALL runtime·exitsyscall(SB) |