diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2012-01-10 20:48:02 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2012-01-10 20:48:02 -0800 |
| commit | 1250f94f93402a555a7dc905dfc5b0acc85c0b98 (patch) | |
| tree | 69573753dacfc5deb197000b1c7a6e6c4a6aafe1 /src/pkg/runtime/sys_linux_arm.s | |
| parent | 5cf803f438e1afd6ddd46c7536d45fd7a68731f1 (diff) | |
| download | go-1250f94f93402a555a7dc905dfc5b0acc85c0b98.tar.xz | |
runtime: runtime.usleep() bugfix on darwin/amd64 and linux/arm
pkg/runtime/sys_darwin_amd64.s: fixes syscall select nr
pkg/runtime/sys_linux_arm.s: uses newselect instead of the now unimplemented
(old) select, also fixes the wrong div/mod statements in runtime.usleep.
Fixes #2633
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5504096
Diffstat (limited to 'src/pkg/runtime/sys_linux_arm.s')
| -rw-r--r-- | src/pkg/runtime/sys_linux_arm.s | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/runtime/sys_linux_arm.s b/src/pkg/runtime/sys_linux_arm.s index e0e4135b54..c3a828a924 100644 --- a/src/pkg/runtime/sys_linux_arm.s +++ b/src/pkg/runtime/sys_linux_arm.s @@ -34,7 +34,7 @@ #define SYS_gettid (SYS_BASE + 224) #define SYS_tkill (SYS_BASE + 238) #define SYS_sched_yield (SYS_BASE + 158) -#define SYS_select (SYS_BASE + 82) +#define SYS_select (SYS_BASE + 142) // newselect #define ARM_BASE (SYS_BASE + 0x0f0000) #define SYS_ARM_cacheflush (ARM_BASE + 2) @@ -313,10 +313,10 @@ TEXT runtimeĀ·usleep(SB),7,$12 MOVW usec+0(FP), R0 MOVW R0, R1 MOVW $1000000, R2 - DIV R1, R0 - MOD R2, R0 - MOVW R1, 4(SP) - MOVW R2, 8(SP) + DIV R2, R0 + MOD R2, R1 + MOVW R0, 4(SP) + MOVW R1, 8(SP) MOVW $0, R0 MOVW $0, R1 MOVW $0, R2 |
