aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/linux/arm/sys.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-10 15:01:02 -0800
committerRuss Cox <rsc@golang.org>2010-02-10 15:01:02 -0800
commit66cdc699b28c44a448a6a502b0ee69c9a942f959 (patch)
tree7585d14a63eb828537bb698c2692c70226e5cf82 /src/pkg/runtime/linux/arm/sys.s
parentfb94be55dc2d93544189fccef0decee39121e57b (diff)
downloadgo-66cdc699b28c44a448a6a502b0ee69c9a942f959.tar.xz
arm: fix build on android
R=kaib CC=golang-dev https://golang.org/cl/206059
Diffstat (limited to 'src/pkg/runtime/linux/arm/sys.s')
-rw-r--r--src/pkg/runtime/linux/arm/sys.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pkg/runtime/linux/arm/sys.s b/src/pkg/runtime/linux/arm/sys.s
index 218bdd8f0d..78c03db3e5 100644
--- a/src/pkg/runtime/linux/arm/sys.s
+++ b/src/pkg/runtime/linux/arm/sys.s
@@ -16,6 +16,7 @@
#define SYS_exit (SYS_BASE + 1)
#define SYS_write (SYS_BASE + 4)
+#define SYS_gettimeofday (SYS_BASE + 78)
#define SYS_clone (SYS_BASE + 120)
#define SYS_mmap2 (SYS_BASE + 192)
#define SYS_gettid (SYS_BASE + 224)
@@ -60,6 +61,33 @@ TEXT ·mmap(SB),7,$0
SWI $0
RET
+TEXT gettime(SB),7,$32
+ /* dummy version - return 0,0 */
+ MOVW $0, R1
+ MOVW 0(FP), R0
+ MOVW R1, 0(R0)
+ MOVW R1, 4(R0)
+ MOVW 4(FP), R0
+ MOVW R1, 0(R0)
+
+/*
+ attempt at real version - seg faults
+
+ MOVW $8(SP), R0
+ MOVW $0, R1
+ MOVW $SYS_gettimeofday, R7
+ SWI $0
+
+ MOVW 0(FP), R0 // sec
+ MOVW 8(SP), R1
+ MOVW R1, 0(R0)
+
+ MOVW 4(FP), R0 // usec
+ MOVW 12(SP), R1
+ MOVW R1, 0(R0)
+*/
+ RET
+
// int32 futex(int32 *uaddr, int32 op, int32 val,
// struct timespec *timeout, int32 *uaddr2, int32 val2);
TEXT futex(SB),7,$0