aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_solaris_amd64.s
AgeCommit message (Collapse)Author
2019-10-11runtime: make nanotime use monotonic clock in SolarisJerrin Shaji George
nanotime() currently uses the REALTIME clock to get the elapsed time in Solaris. This commit changes it to use the MONOTONIC clock instead, similar to how it's done in Linux and other OSs. Also changed nanotime() and walltime() to call clock_gettime() library function directly from Go code rather than from assembly. Fixes #33674 Change-Id: Ie4a687b17d2140998ecd97af6ce048c86cf5fc02 Reviewed-on: https://go-review.googlesource.com/c/go/+/199502 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2019-09-04runtime: wrap nanotime, walltime, and writeAustin Clements
In preparation for general faketime support, this renames the existing nanotime, walltime, and write functions to nanotime1, walltime1, and write1 and wraps them with trivial Go functions. This will let us inject different implementations on all platforms when faketime is enabled. Updates #30439. Change-Id: Ice5ccc513a32a6d89ea051638676d3ee05b00418 Reviewed-on: https://go-review.googlesource.com/c/go/+/192738 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-09runtime: fix vet complaints for solaris/amd64, illumos/amd64Russ Cox
Working toward making the tree vet-safe instead of having so many exceptions in cmd/vet/all/whitelist. This CL makes "go vet -unsafeptr=false runtime" happy for these GOOS/GOARCHes, while keeping "GO_BUILDER_NAME=misc-vetall go tool dist test" happy too. For #31916. Change-Id: Ic64f7f4034695dd4c32c9b7f258960faf3742a83 Reviewed-on: https://go-review.googlesource.com/c/go/+/176103 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-03all: this big patch remove whitespace from assembly filesZhou Peng
Don't worry, this patch just remove trailing whitespace from assembly files, and does not touch any logical changes. Change-Id: Ia724ac0b1abf8bc1e41454bdc79289ef317c165d Reviewed-on: https://go-review.googlesource.com/c/113595 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-29runtime: call sigtrampgo on solarisElias Naur
CL 57291 broke on solaris because it depends on signal forwarding working for signals raised by dieFromSignal. Call sigtrampgo instead of sighandler directly, like the other unix platforms. Fixes the solaris builders. Change-Id: I6bf314c436d1edeaecc4b03f15a9155270919524 Reviewed-on: https://go-review.googlesource.com/59811 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-03time: record monotonic clock reading in time.Now, for more accurate comparisonsRuss Cox
See https://golang.org/design/12914-monotonic for details. Fixes #12914. Change-Id: I80edc2e6c012b4ace7161c84cf067d444381a009 Reviewed-on: https://go-review.googlesource.com/36255 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Caleb Spare <cespare@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-01runtime: align stack pointer in sigfwdBryan C. Mills
sigfwd calls an arbitrary C signal handler function. The System V ABI for x86_64 (and the most recent revision of the ABI for i386) requires the stack to be 16-byte aligned. Fixes: #17641 Change-Id: I77f53d4a8c29c1b0fe8cfbcc8d5381c4e6f75a6b Reviewed-on: https://go-review.googlesource.com/32107 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-21runtime: merge signal[12]_unix.go into signal_unix.goIan Lance Taylor
Requires adding a sigfwd function for Solaris, as previously signal2_unix.go was not built for Solaris. Change-Id: Iea3ff0ddfa15af573813eb075bead532b324a3fc Reviewed-on: https://go-review.googlesource.com/29550 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-25runtime: fix signal handling on SolarisJoe Sylve
This fixes the problems with signal handling that were inadvertently introduced in https://go-review.googlesource.com/21006. Fixes #14899 Change-Id: Ia746914dcb3146a52413d32c57b089af763f0810 Reviewed-on: https://go-review.googlesource.com/21145 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-24runtime: improve last ditch signal forwarding for Unix librariesJoe Sylve
The current runtime attempts to forward signals generated by non-Go code to the original signal handler. If it can't call the original handler directly, it currently attempts to re-raise the signal after resetting the handler. In this case, the original context is lost. This fix prevents that problem by simply returning from the go signal handler after resetting the original handler. It only does this when the original handler is the system default handler, which in all cases is known to not recover. The signal is not reset, so it is retriggered and the original handler takes over with the proper context. Fixes #14899 Change-Id: Ib1c19dfa4b50d9732d7a453de3784c8141e1cbb3 Reviewed-on: https://go-review.googlesource.com/21006 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-02-24all: fix typos and spellingMartin Möhrmann
Change-Id: Icd06d99c42b8299fd931c7da821e1f418684d913 Reviewed-on: https://go-review.googlesource.com/19829 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-24runtime: adjust gsignal stack to current signal stackIan Lance Taylor
If non-Go code calls sigaltstack before a signal is received, use sigaltstack to determine the current signal stack and set the gsignal stack to use it. This makes the Go runtime more robust in the face of non-Go code. We still can't handle a disabled signal stack or a signal triggered with SA_ONSTACK clear, but we now give clear errors for those cases. Fixes #7227. Update #9896. Change-Id: Icb1607e01fd6461019b6d77d940e59b3aed4d258 Reviewed-on: https://go-review.googlesource.com/18102 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2015-11-20runtime: make it possible to call syscall on solaris without gShenghou Ma
The nosplit stack is now much bigger, so we can afford to allocate libcall on stack. Fix asmsysvicall6 to not update errno if g == nil. These two fixes TestCgoCallbackGC on solaris, which used to stuck in a loop. Change-Id: Id1b13be992dae9f059aa3d47ffffd37785300933 Reviewed-on: https://go-review.googlesource.com/17076 Run-TryBot: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-10-22runtime: split plan9 and solaris's m fields into new embedded mOS typeMatthew Dempsky
Reduces the size of m by ~8% on linux/amd64 (1040 bytes -> 960 bytes). There are also windows-specific fields, but they're currently referenced in OS-independent source files (but only when GOOS=="windows"). Change-Id: I13e1471ff585ccced1271f74209f8ed6df14c202 Reviewed-on: https://go-review.googlesource.com/16173 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-05-06runtime: always load address of libcFunc on SolarisAram Hăvărneanu
The linker always uses .plt for externals, so libcFunc is now an actual external symbol instead of a pointer to one. Fixes most of the breakage introduced in previous CL. Change-Id: I64b8c96f93127f2d13b5289b024677fd3ea7dbea Reviewed-on: https://go-review.googlesource.com/8215 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
2015-01-05Revert "liblink, cmd/ld, runtime: remove stackguard1"Russ Cox
This reverts commit ab0535ae3fb45ba734d47542cc4845f27f708d1b. I think it will remain useful to distinguish code that must run on a system stack from code that can run on either stack, even if that distinction is no longer based on the implementation language. That is, I expect to add a //go:systemstack comment that, in terms of the old implementation, tells the compiler, to pretend this function was written in C. Change-Id: I33d2ebb2f99ae12496484c6ec8ed07233d693275 Reviewed-on: https://go-review.googlesource.com/2275 Reviewed-by: Russ Cox <rsc@golang.org>
2014-12-29liblink, cmd/ld, runtime: remove stackguard1Shenghou Ma
Now that we've removed all the C code in runtime and the C compilers, there is no need to have a separate stackguard field to check for C code on Go stack. Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard. Adjust liblink and cmd/ld as necessary. Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33 Reviewed-on: https://go-review.googlesource.com/2144 Reviewed-by: Keith Randall <khr@golang.org>
2014-11-14[dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.ccRuss Cox
This is to reduce the delta between dev.cc and dev.garbage to just garbage collector changes. These are the files that had merge conflicts and have been edited by hand: malloc.go mem_linux.go mgc.go os1_linux.go proc1.go panic1.go runtime1.go LGTM=austin R=austin CC=golang-codereviews https://golang.org/cl/174180043
2014-11-13[dev.cc] runtime: convert Solaris port to GoAram Hăvărneanu
Memory management was consolitated with the BSD ports, since it was almost identical. Assembly thunks are gone, being replaced by the new //go:linkname feature. This change supersedes CL 138390043 (runtime: convert solaris netpoll to Go), which was previously reviewed and tested. This change is only the first step, the port now builds, but doesn't run. Binaries fail to exec: ld.so.1: 6.out: fatal: 6.out: TLS requirement failure : TLS support is unavailable Killed This seems to happen because binaries don't link with libc.so anymore. We will have to solve that in a different CL. Also this change is just a rough translation of the original C code, cleanup will come in a different CL. [This CL is part of the removal of C code from package runtime. See golang.org/s/dev.cc for an overview.] LGTM=rsc R=rsc, dave CC=golang-codereviews, iant, khr, minux, r, rlh https://golang.org/cl/174960043
2014-11-11[dev.cc] runtime: convert assembly files for C to Go transitionRuss Cox
The main change is that #include "zasm_GOOS_GOARCH.h" is now #include "go_asm.h" and/or #include "go_tls.h". Also, because C StackGuard is now Go _StackGuard, the assembly name changes from const_StackGuard to const__StackGuard. In asm_$GOARCH.s, add new function getg, formerly implemented in C. The renamed atomics now have Go wrappers, to get escape analysis annotations right. Those wrappers are in CL 174860043. LGTM=r, aram R=r, aram CC=austin, dvyukov, golang-codereviews, iant, khr https://golang.org/cl/168510043
2014-10-28[dev.power64] cmd/5a, cmd/6a, cmd/8a, cmd/9a: make labels function-scopedRuss Cox
I removed support for jumping between functions years ago, as part of doing the instruction layout for each function separately. Given that, it makes sense to treat labels as function-scoped. This lets each function have its own 'loop' label, for example. Makes the assembly much cleaner and removes the last reason anyone would reach for the 123(PC) form instead. Note that this is on the dev.power64 branch, but it changes all the assemblers. The change will ship in Go 1.5 (perhaps after being ported into the new assembler). Came up as part of CL 167730043. LGTM=r R=r CC=austin, dave, golang-codereviews, minux https://golang.org/cl/159670043
2014-09-09runtime: fix build failures after CL 137410043Russ Cox
No promise about correctness, but they do build. TBR=khr CC=golang-codereviews https://golang.org/cl/143720043
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.