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

Side by Side Diff: src/pkg/runtime/freebsd/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/freebsd/386/sys.s ('k') | src/pkg/runtime/linux/386/sys.s » ('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, FreeBSD 5 // System calls and other sys.stuff for AMD64, FreeBSD
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 RET 78 RET
79 79
80 TEXT runtime·setitimer(SB), 7, $-8 80 TEXT runtime·setitimer(SB), 7, $-8
81 MOVL 8(SP), DI 81 MOVL 8(SP), DI
82 MOVQ 16(SP), SI 82 MOVQ 16(SP), SI
83 MOVQ 24(SP), DX 83 MOVQ 24(SP), DX
84 MOVL $83, AX 84 MOVL $83, AX
85 SYSCALL 85 SYSCALL
86 RET 86 RET
87 87
88 // func now() (sec int64, nsec int32)
89 TEXT time·now(SB), 7, $32
90 MOVL $116, AX
91 LEAQ 8(SP), DI
92 MOVQ $0, SI
93 SYSCALL
94 MOVQ 8(SP), AX // sec
95 MOVL 16(SP), DX // usec
96
97 // sec is in AX, usec in DX
98 MOVQ AX, sec+0(FP)
99 IMULQ $1000, DX
100 MOVL DX, nsec+8(FP)
101 RET
102
88 TEXT runtime·nanotime(SB), 7, $32 103 TEXT runtime·nanotime(SB), 7, $32
89 MOVL $116, AX 104 MOVL $116, AX
90 LEAQ 8(SP), DI 105 LEAQ 8(SP), DI
91 MOVQ $0, SI 106 MOVQ $0, SI
92 SYSCALL 107 SYSCALL
93 MOVQ 8(SP), AX // sec 108 MOVQ 8(SP), AX // sec
94 MOVL 16(SP), DX // usec 109 MOVL 16(SP), DX // usec
95 110
96 // sec is in AX, usec in DX 111 // sec is in AX, usec in DX
97 // return nsec in AX 112 // return nsec in AX
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 TEXT runtime·settls(SB),7,$8 192 TEXT runtime·settls(SB),7,$8
178 ADDQ $16, DI // adjust for ELF: wants to use -16(FS) and -8(FS) for g and m 193 ADDQ $16, DI // adjust for ELF: wants to use -16(FS) and -8(FS) for g and m
179 MOVQ DI, 0(SP) 194 MOVQ DI, 0(SP)
180 MOVQ SP, SI 195 MOVQ SP, SI
181 MOVQ $129, DI // AMD64_SET_FSBASE 196 MOVQ $129, DI // AMD64_SET_FSBASE
182 MOVQ $165, AX // sysarch 197 MOVQ $165, AX // sysarch
183 SYSCALL 198 SYSCALL
184 JCC 2(PC) 199 JCC 2(PC)
185 CALL runtime·notok(SB) 200 CALL runtime·notok(SB)
186 RET 201 RET
OLDNEW
« no previous file with comments | « src/pkg/runtime/freebsd/386/sys.s ('k') | src/pkg/runtime/linux/386/sys.s » ('j') | no next file with comments »

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