From ce8f49f42ff98a87a6766aa50efa0449c4525ce3 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Tue, 27 Oct 2015 19:46:49 -0400 Subject: runtime: android/arm64 support Not all tests passing yet, but a good chunk are. Change-Id: I5daebaeabf3aecb380674ece8830a86751a8d139 Reviewed-on: https://go-review.googlesource.com/16458 Reviewed-by: Rahul Chaudhry Reviewed-by: David Crawshaw --- src/runtime/sys_linux_arm64.s | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/runtime/sys_linux_arm64.s') diff --git a/src/runtime/sys_linux_arm64.s b/src/runtime/sys_linux_arm64.s index 7b58d67305..ca0e07aaa4 100644 --- a/src/runtime/sys_linux_arm64.s +++ b/src/runtime/sys_linux_arm64.s @@ -43,6 +43,9 @@ #define SYS_epoll_ctl 21 #define SYS_epoll_pwait 22 #define SYS_clock_gettime 113 +#define SYS_faccessat 48 +#define SYS_socket 198 +#define SYS_connect 203 TEXT runtime·exit(SB),NOSPLIT,$-8-4 MOVW code+0(FP), R0 @@ -445,3 +448,33 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$-8 MOVD $SYS_fcntl, R8 SVC RET + +// int access(const char *name, int mode) +TEXT runtime·access(SB),NOSPLIT,$0-20 + MOVD $AT_FDCWD, R0 + MOVD name+0(FP), R1 + MOVW mode+8(FP), R2 + MOVD $SYS_faccessat, R8 + SVC + MOVW R0, ret+16(FP) + RET + +// int connect(int fd, const struct sockaddr *addr, socklen_t len) +TEXT runtime·connect(SB),NOSPLIT,$0-28 + MOVW fd+0(FP), R0 + MOVD addr+8(FP), R1 + MOVW len+16(FP), R2 + MOVD $SYS_connect, R8 + SVC + MOVW R0, ret+24(FP) + RET + +// int socket(int domain, int typ, int prot) +TEXT runtime·socket(SB),NOSPLIT,$0-20 + MOVW domain+0(FP), R0 + MOVW typ+4(FP), R1 + MOVW prot+8(FP), R2 + MOVD $SYS_socket, R8 + SVC + MOVW R0, ret+16(FP) + RET -- cgit v1.3