Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(713)

Side by Side Diff: src/pkg/runtime/openbsd/amd64/sys.s

Issue 5392041: code review 5392041: time: new Time, Duration, ZoneInfo types (Closed)
Patch Set: diff -r 3c286b9b2206 https://go.googlecode.com/hg/ Created 13 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/openbsd/386/sys.s ('k') | src/pkg/runtime/time.goc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 // 4 //
5 // System calls and other sys.stuff for AMD64, OpenBSD 5 // System calls and other sys.stuff for AMD64, OpenBSD
6 // /usr/src/sys/kern/syscalls.master for syscall numbers. 6 // /usr/src/sys/kern/syscalls.master for syscall numbers.
7 // 7 //
8 8
9 #include "amd64/asm.h" 9 #include "amd64/asm.h"
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 RET 126 RET
127 127
128 TEXT runtime·setitimer(SB),7,$-8 128 TEXT runtime·setitimer(SB),7,$-8
129 MOVL 8(SP), DI // arg 1 - which 129 MOVL 8(SP), DI // arg 1 - which
130 MOVQ 16(SP), SI // arg 2 - itv 130 MOVQ 16(SP), SI // arg 2 - itv
131 MOVQ 24(SP), DX // arg 3 - oitv 131 MOVQ 24(SP), DX // arg 3 - oitv
132 MOVL $83, AX // sys_setitimer 132 MOVL $83, AX // sys_setitimer
133 SYSCALL 133 SYSCALL
134 RET 134 RET
135 135
136 // func now() (sec int64, nsec int32)
137 TEXT time·now(SB), 7, $32
138 LEAQ 8(SP), DI // arg 1 - tp
139 MOVQ $0, SI // arg 2 - tzp
140 MOVL $116, AX // sys_gettimeofday
141 SYSCALL
142 MOVQ 8(SP), AX // sec
143 MOVL 16(SP), DX // usec
144
145 // sec is in AX, usec in DX
146 MOVQ AX, sec+0(FP)
147 IMULQ $1000, DX
148 MOVL DX, nsec+8(FP)
149 RET
150
136 TEXT runtime·nanotime(SB),7,$32 151 TEXT runtime·nanotime(SB),7,$32
137 LEAQ 8(SP), DI // arg 1 - tp 152 LEAQ 8(SP), DI // arg 1 - tp
138 MOVQ $0, SI // arg 2 - tzp 153 MOVQ $0, SI // arg 2 - tzp
139 MOVL $116, AX // sys_gettimeofday 154 MOVL $116, AX // sys_gettimeofday
140 SYSCALL 155 SYSCALL
141 MOVQ 8(SP), AX // sec 156 MOVQ 8(SP), AX // sec
142 MOVL 16(SP), DX // usec 157 MOVL 16(SP), DX // usec
143 158
144 // sec is in AX, usec in DX 159 // sec is in AX, usec in DX
145 // return nsec in AX 160 // return nsec in AX
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 MOVQ 40(SP), R8 // arg 5 - newp 259 MOVQ 40(SP), R8 // arg 5 - newp
245 MOVQ 48(SP), R9 // arg 6 - newlen 260 MOVQ 48(SP), R9 // arg 6 - newlen
246 MOVQ $202, AX // sys___sysctl 261 MOVQ $202, AX // sys___sysctl
247 SYSCALL 262 SYSCALL
248 JCC 3(PC) 263 JCC 3(PC)
249 NEGL AX 264 NEGL AX
250 RET 265 RET
251 MOVL $0, AX 266 MOVL $0, AX
252 RET 267 RET
253 268
OLDNEW
« no previous file with comments | « src/pkg/runtime/openbsd/386/sys.s ('k') | src/pkg/runtime/time.goc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b