mirror of
https://github.com/golang/go
synced 2024-11-19 21:54:40 -07:00
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
This commit is contained in:
parent
5cf803f438
commit
1250f94f93
@ -175,7 +175,7 @@ TEXT runtime·usleep(SB),7,$16
|
|||||||
MOVL $0, DX
|
MOVL $0, DX
|
||||||
MOVL $0, R10
|
MOVL $0, R10
|
||||||
MOVQ SP, R8
|
MOVQ SP, R8
|
||||||
MOVL $(0x2000000+23), AX
|
MOVL $(0x2000000+93), AX
|
||||||
SYSCALL
|
SYSCALL
|
||||||
RET
|
RET
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#define SYS_gettid (SYS_BASE + 224)
|
#define SYS_gettid (SYS_BASE + 224)
|
||||||
#define SYS_tkill (SYS_BASE + 238)
|
#define SYS_tkill (SYS_BASE + 238)
|
||||||
#define SYS_sched_yield (SYS_BASE + 158)
|
#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 ARM_BASE (SYS_BASE + 0x0f0000)
|
||||||
#define SYS_ARM_cacheflush (ARM_BASE + 2)
|
#define SYS_ARM_cacheflush (ARM_BASE + 2)
|
||||||
@ -313,10 +313,10 @@ TEXT runtime·usleep(SB),7,$12
|
|||||||
MOVW usec+0(FP), R0
|
MOVW usec+0(FP), R0
|
||||||
MOVW R0, R1
|
MOVW R0, R1
|
||||||
MOVW $1000000, R2
|
MOVW $1000000, R2
|
||||||
DIV R1, R0
|
DIV R2, R0
|
||||||
MOD R2, R0
|
MOD R2, R1
|
||||||
MOVW R1, 4(SP)
|
MOVW R0, 4(SP)
|
||||||
MOVW R2, 8(SP)
|
MOVW R1, 8(SP)
|
||||||
MOVW $0, R0
|
MOVW $0, R0
|
||||||
MOVW $0, R1
|
MOVW $0, R1
|
||||||
MOVW $0, R2
|
MOVW $0, R2
|
||||||
|
Loading…
Reference in New Issue
Block a user