summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/sys_openbsd_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/sys_openbsd_amd64.s')
-rw-r--r--src/pkg/runtime/sys_openbsd_amd64.s22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/pkg/runtime/sys_openbsd_amd64.s b/src/pkg/runtime/sys_openbsd_amd64.s
index 26dc61f71..b2a61820a 100644
--- a/src/pkg/runtime/sys_openbsd_amd64.s
+++ b/src/pkg/runtime/sys_openbsd_amd64.s
@@ -9,6 +9,8 @@
#include "zasm_GOOS_GOARCH.h"
#include "../../cmd/ld/textflag.h"
+#define CLOCK_MONOTONIC $3
+
// int64 tfork(void *param, uintptr psize, M *mp, G *gp, void (*fn)(void));
TEXT runtime·tfork(SB),NOSPLIT,$32
@@ -62,7 +64,7 @@ TEXT runtime·thrsleep(SB),NOSPLIT,$0
MOVQ 24(SP), DX // arg 3 - tp
MOVQ 32(SP), R10 // arg 4 - lock
MOVQ 40(SP), R8 // arg 5 - abort
- MOVL $300, AX // sys___thrsleep
+ MOVL $94, AX // sys___thrsleep
SYSCALL
RET
@@ -130,7 +132,7 @@ TEXT runtime·usleep(SB),NOSPLIT,$16
MOVQ SP, DI // arg 1 - rqtp
MOVQ $0, SI // arg 2 - rmtp
- MOVL $240, AX // sys_nanosleep
+ MOVL $91, AX // sys_nanosleep
SYSCALL
RET
@@ -138,7 +140,7 @@ TEXT runtime·raise(SB),NOSPLIT,$16
MOVL $299, AX // sys_getthrid
SYSCALL
MOVQ AX, DI // arg 1 - pid
- MOVL sig+0(FP), SI // arg 2 - signum
+ MOVL sig+0(FP), SI // arg 2 - signum
MOVL $37, AX // sys_kill
SYSCALL
RET
@@ -147,7 +149,7 @@ TEXT runtime·setitimer(SB),NOSPLIT,$-8
MOVL 8(SP), DI // arg 1 - which
MOVQ 16(SP), SI // arg 2 - itv
MOVQ 24(SP), DX // arg 3 - oitv
- MOVL $83, AX // sys_setitimer
+ MOVL $69, AX // sys_setitimer
SYSCALL
RET
@@ -155,9 +157,9 @@ TEXT runtime·setitimer(SB),NOSPLIT,$-8
TEXT time·now(SB), NOSPLIT, $32
MOVQ $0, DI // arg 1 - clock_id
LEAQ 8(SP), SI // arg 2 - tp
- MOVL $232, AX // sys_clock_gettime
+ MOVL $87, AX // sys_clock_gettime
SYSCALL
- MOVL 8(SP), AX // sec
+ MOVQ 8(SP), AX // sec
MOVQ 16(SP), DX // nsec
// sec is in AX, nsec in DX
@@ -166,11 +168,11 @@ TEXT time·now(SB), NOSPLIT, $32
RET
TEXT runtime·nanotime(SB),NOSPLIT,$24
- MOVQ $0, DI // arg 1 - clock_id
+ MOVQ CLOCK_MONOTONIC, DI // arg 1 - clock_id
LEAQ 8(SP), SI // arg 2 - tp
- MOVL $232, AX // sys_clock_gettime
+ MOVL $87, AX // sys_clock_gettime
SYSCALL
- MOVL 8(SP), AX // sec
+ MOVQ 8(SP), AX // sec
MOVQ 16(SP), DX // nsec
// sec is in AX, nsec in DX
@@ -318,7 +320,7 @@ TEXT runtime·kevent(SB),NOSPLIT,$0
MOVQ 32(SP), R10
MOVL 40(SP), R8
MOVQ 48(SP), R9
- MOVL $270, AX
+ MOVL $72, AX
SYSCALL
JCC 2(PC)
NEGQ AX