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

Unified 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
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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/freebsd/amd64/sys.s
===================================================================
--- a/src/pkg/runtime/freebsd/amd64/sys.s
+++ b/src/pkg/runtime/freebsd/amd64/sys.s
@@ -85,6 +85,21 @@
SYSCALL
RET
+// func now() (sec int64, nsec int32)
+TEXT time·now(SB), 7, $32
+ MOVL $116, AX
+ LEAQ 8(SP), DI
+ MOVQ $0, SI
+ SYSCALL
+ MOVQ 8(SP), AX // sec
+ MOVL 16(SP), DX // usec
+
+ // sec is in AX, usec in DX
+ MOVQ AX, sec+0(FP)
+ IMULQ $1000, DX
+ MOVL DX, nsec+8(FP)
+ RET
+
TEXT runtime·nanotime(SB), 7, $32
MOVL $116, AX
LEAQ 8(SP), DI
« 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