An error occurred fetching the project authors.
- 05 Sep, 2014 1 commit
-
-
Russ Cox authored
I did this just to clean things up, but it will be important when we drop the pkg directory later. LGTM=bradfitz R=r, bradfitz CC=golang-codereviews https://golang.org/cl/132600043
-
- 28 Aug, 2014 1 commit
-
-
Anthony Martin authored
LGTM=0intro, rsc R=rsc, 0intro CC=golang-codereviews https://golang.org/cl/132320043
-
- 27 Aug, 2014 2 commits
-
-
Russ Cox authored
sighandler now returns its value on the stack. TBR=0intro CC=golang-codereviews https://golang.org/cl/135900043
-
Russ Cox authored
To date, the C compilers and Go compilers differed only in how values were returned from functions. This made it difficult to call Go from C or C from Go if return values were involved. It also made assembly called from Go and assembly called from C different. This CL changes the C compiler to use the Go conventions, passing results on the stack, after the arguments. [Exception: this does not apply to C ... functions, because you can't know where on the stack the arguments end.] By doing this, the CL makes it possible to rewrite C functions into Go one at a time, without worrying about which languages call that function or which languages it calls. This CL also updates all the assembly files in package runtime to use the new conventions. Argument references of the form 40(SP) have been rewritten to the form name+10(FP) instead, and there are now Go func prototypes for every assembly function called from C or Go. This means that 'go vet runtime' checks effectively every assembly function, and go vet's output was used to automate the bulk of the conversion. Some functions, like seek and nsec on Plan 9, needed to be rewritten. Many assembly routines called from C were reading arguments incorrectly, using MOVL instead of MOVQ or vice versa, especially on the less used systems like openbsd. These were found by go vet and have been corrected too. If we're lucky, this may reduce flakiness on those systems. Tested on: darwin/386 darwin/amd64 linux/arm linux/386 linux/amd64 If this breaks another system, the bug is almost certainly in the sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested by the combination of the above systems. LGTM=dvyukov, iant R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant CC=golang-codereviews, josharian, r https://golang.org/cl/135830043
-
- 09 Jul, 2014 1 commit
-
-
Aram Hăvărneanu authored
LGTM=0intro R=0intro CC=ality, dave, golang-codereviews, jas, mischief, rsc https://golang.org/cl/104570043
-
- 02 Jul, 2014 1 commit
-
-
Aram Hăvărneanu authored
A TLS slot is reserved by _rt0_.*_plan9 as an automatic and its address (which is static on Plan 9) is saved in the global _privates symbol. The startup linkage now is exactly like that from Plan 9 libc, and the way we access g is exactly as if we'd have used privalloc(2). Aside from making the code more standard, this change drastically simplifies it, both for 386 and for amd64, and makes the Plan 9 code in liblink common for both 386 and amd64. The amd64 runtime code was cleared of nxm assumptions, and now runs on the standard Plan 9 kernel. Note handling fixes will follow in a separate CL. LGTM=rsc R=golang-codereviews, rsc, bradfitz, dave CC=0intro, ality, golang-codereviews, jas, minux.ma, mischief https://golang.org/cl/101510049
-
- 26 Jun, 2014 1 commit
-
-
Russ Cox authored
The runtime has historically held two dedicated values g (current goroutine) and m (current thread) in 'extern register' slots (TLS on x86, real registers backed by TLS on ARM). This CL removes the extern register m; code now uses g->m. On ARM, this frees up the register that formerly held m (R9). This is important for NaCl, because NaCl ARM code cannot use R9 at all. The Go 1 macrobenchmarks (those with per-op times >= 10 µs) are unaffected: BenchmarkBinaryTree17 5491374955 5471024381 -0.37% BenchmarkFannkuch11 4357101311 4275174828 -1.88% BenchmarkGobDecode 11029957 11364184 +3.03% BenchmarkGobEncode 6852205 6784822 -0.98% BenchmarkGzip 650795967 650152275 -0.10% BenchmarkGunzip 140962363 141041670 +0.06% BenchmarkHTTPClientServer 71581 73081 +2.10% BenchmarkJSONEncode 31928079 31913356 -0.05% BenchmarkJSONDecode 117470065 113689916 -3.22% BenchmarkMandelbrot200 6008923 5998712 -0.17% BenchmarkGoParse 6310917 6327487 +0.26% BenchmarkRegexpMatchMedium_1K 114568 114763 +0.17% BenchmarkRegexpMatchHard_1K 168977 169244 +0.16% BenchmarkRevcomp 935294971 914060918 -2.27% BenchmarkTemplate 145917123 148186096 +1.55% Minux previous reported larger variations, but these were caused by run-to-run noise, not repeatable slowdowns. Actual code changes by Minux. I only did the docs and the benchmarking. LGTM=dvyukov, iant, minux R=minux, josharian, iant, dave, bradfitz, dvyukov CC=golang-codereviews https://golang.org/cl/109050043
-
- 15 Apr, 2014 1 commit
-
-
Russ Cox authored
When I did the original 386 ports on Linux and OS X, I chose to define GS-relative expressions like 4(GS) as relative to the actual thread-local storage base, which was usually GS but might not be (it might be FS, or it might be a different constant offset from GS or FS). The original scope was limited but since then the rewrites have gotten out of control. Sometimes GS is rewritten, sometimes FS. Some ports do other rewrites to enable shared libraries and other linking. At no point in the code is it clear whether you are looking at the real GS/FS or some synthesized thing that will be rewritten. The code manipulating all these is duplicated in many places. The first step to fixing issue 7719 is to make the code intelligible again. This CL adds an explicit TLS pseudo-register to the 386 and amd64. As a register, TLS refers to the thread-local storage base, and it can only be loaded into another register: MOVQ TLS, AX An offset from the thread-local storage base is written off(reg)(TLS*1). Semantically it is off(reg), but the (TLS*1) annotation marks this as indexing from the loaded TLS base. This emits a relocation so that if the linker needs to adjust the offset, it can. For example: MOVQ TLS, AX MOVQ 8(AX)(TLS*1), CX // load m into CX On systems that support direct access to the TLS memory, this pair of instructions can be reduced to a direct TLS memory reference: MOVQ 8(TLS), CX // load m into CX The 2-instruction and 1-instruction forms correspond roughly to ELF TLS initial exec mode and ELF TLS local exec mode, respectively. Liblink applies this rewrite on systems that support the 1-instruction form. The decision is made using only the operating system (and probably the -shared flag, eventually), not the link mode. If some link modes on a particular operating system require the 2-instruction form, then all builds for that operating system will use the 2-instruction form, so that the link mode decision can be delayed to link time. Obviously it is late to be making changes like this, but I despair of correcting issue 7719 and issue 7164 without it. To make sure I am not changing existing behavior, I built a "hello world" program for every GOOS/GOARCH combination we have and then worked to make sure that the rewrite generates exactly the same binaries, byte for byte. There are a handful of TODOs in the code marking kludges to get the byte-for-byte property, but at least now I can explain exactly how each binary is handled. The targets I tested this way are: darwin-386 darwin-amd64 dragonfly-386 dragonfly-amd64 freebsd-386 freebsd-amd64 freebsd-arm linux-386 linux-amd64 linux-arm nacl-386 nacl-amd64p32 netbsd-386 netbsd-amd64 openbsd-386 openbsd-amd64 plan9-386 plan9-amd64 solaris-amd64 windows-386 windows-amd64 There were four exceptions to the byte-for-byte goal: windows-386 and windows-amd64 have a time stamp at bytes 137 and 138 of the header. darwin-386 and plan9-386 have five or six modified bytes in the middle of the Go symbol table, caused by editing comments in runtime/sys_{darwin,plan9}_386.s. Fixes #7164. LGTM=iant R=iant, aram, minux.ma, dave CC=golang-codereviews https://golang.org/cl/87920043
-
- 14 Feb, 2014 1 commit
-
-
David du Colombier authored
Rfork is not splitting the stack when creating a new thread, so the parent and child are executing on the same stack. However, if the parent returns and keeps executing before the child can read the arguments from the parent stack, the child will not see the right arguments. The solution is to load the needed pieces from the parent stack into register before INT $64. Thanks to Russ Cox for the explanation. LGTM=rsc R=rsc CC=ality, golang-codereviews https://golang.org/cl/64140043
-
- 07 Aug, 2013 1 commit
-
-
Keith Randall authored
Remove NOPROF/DUPOK from everything. Edits done with a script, except pclinetest.asm which depended on the DUPOK flag on main(). R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12613044
-
- 11 Jul, 2013 1 commit
-
-
Shenghou Ma authored
Fixes #3250. R=rsc CC=golang-dev https://golang.org/cl/10757044
-
- 09 Mar, 2013 1 commit
-
-
Akshat Kumar authored
The call to the C function runtime.findnull() requires that we provide the argument at 0(SP). R=rsc, rminnich, ality CC=golang-dev https://golang.org/cl/7559047
-
- 07 Mar, 2013 1 commit
-
-
Akshat Kumar authored
Change 231af8ac63aa (CL 7314062) made runtime.enteryscall() set m->mcache = nil, which means that we can no longer use syscall.errstr in syscall.Syscall and syscall.Syscall6, since it requires a new buffer to be allocated for holding the error string. Instead, we use pre-allocated per-M storage to hold error strings from syscalls made while in entersyscall mode, and call runtime.findnull to calculate the lengths. Fixes #4994. R=rsc, rminnich, ality, dvyukov, rminnich, r CC=golang-dev https://golang.org/cl/7567043
-
- 30 Jan, 2013 1 commit
-
-
Akshat Kumar authored
This change also resolves some issues with note handling: we now make sure that there is enough room at the bottom of every goroutine to execute the note handler, and the `exitstatus' is no longer a global entity, which resolves some race conditions. R=rminnich, npe, rsc, ality CC=golang-dev https://golang.org/cl/6569068
-
- 17 Dec, 2012 1 commit
-
-
Anthony Martin authored
With this change the runtime can now read GOMAXPROCS, GOGC, etc. I'm not quite sure how we missed this. R=seed, lucio.dere, rsc CC=golang-dev https://golang.org/cl/6935062
-
- 05 Oct, 2012 1 commit
-
-
Akshat Kumar authored
The Go run-time assumes that all SSE floating-point exceptions are masked so that Go programs are not broken by such invalid operations. By default, the 64-bit version of the Plan 9 kernel masks only some SSE floating-point exceptions. Here, we mask them all on a per-thread basis. R=rsc, rminnich, minux.ma CC=golang-dev https://golang.org/cl/6592056
-
- 16 May, 2012 1 commit
-
-
Akshat Kumar authored
With the timed semacquire patch (kernel-tsemacquire) for Plan 9, we can now properly do a timed wait for the semaphore, in semasleep. R=golang-dev, rsc, rminnich, ality, r CC=0intro, golang-dev, john, mirtchovski https://golang.org/cl/6197046
-
- 04 May, 2012 1 commit
-
-
Akshat Kumar authored
This adds proper note handling for Plan 9, and fixes the issue of properly killing go procs. Without this change, the first go proc that dies (using runtime·exit()) would kill all the running go procs. Proper signal handling is needed. R=golang-dev, ality, rminnich, rsc CC=golang-dev, john, mirtchovski https://golang.org/cl/5617048
-
- 19 Dec, 2011 1 commit
-
-
Russ Cox authored
This is like the ill-fated CL 5493063 except that I have written a shell script (autogen.sh) instead of thinking I could possibly write a correct Makefile. R=golang-dev, r CC=golang-dev https://golang.org/cl/5496075
-
- 16 Dec, 2011 3 commits
-
-
Russ Cox authored
That was the last build that was close to working. I will try that change again next week. Make is being very subtle today. At the reverted-to CL, the ARM traceback appears to be broken. I'll look into that next week too. R=golang-dev, r CC=golang-dev https://golang.org/cl/5492063
-
Russ Cox authored
R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5493063
-
Russ Cox authored
Collapse the arch,os-specific directories into the main directory by renaming xxx/foo.c to foo_xxx.c, and so on. There are no substantial edits here, except to the Makefile. The assumption is that the Go tool will #define GOOS_darwin and GOARCH_amd64 and will make any file named something like signals_darwin.h available as signals_GOOS.h during the build. This replaces what used to be done with -I$(GOOS). There is still work to be done to make runtime build with standard tools, but this is a big step. After this we will have to write a script to generate all the generated files so they can be checked in (instead of generated during the build). R=r, iant, r, lucio.dere CC=golang-dev https://golang.org/cl/5490053
-
- 18 Nov, 2011 1 commit
-
-
Anthony Martin authored
R=paulzhol, rsc, dave, rminnich CC=golang-dev https://golang.org/cl/5327063
-
- 05 Oct, 2011 1 commit
-
-
Anthony Martin authored
This change adds the osyield and usleep functions and code to read the number of processors from /dev/sysstat. I also changed SysAlloc to return nil when brk fails (it was returning -1). R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5177049
-
- 10 Jun, 2011 1 commit
-
-
Yuval Pavel Zholkover authored
R=rsc, r CC=golang-dev https://golang.org/cl/4589042
-
- 11 Feb, 2011 1 commit
-
-
Yuval Pavel Zholkover authored
8l, runtime: place G and M pointers relative to _tos on Plan 9, instead of hardcoded values for USTKTOP. This should allow executing both on native Plan 9 and inside 9vx. R=rsc CC=golang-dev https://golang.org/cl/3993044
-
- 04 Nov, 2010 1 commit
-
-
Russ Cox authored
Prefix all external symbols in runtime by runtime·, to avoid conflicts with possible symbols of the same name in linked-in C libraries. The obvious conflicts are printf, malloc, and free, but hide everything to avoid future pain. The symbols left alone are: ** known to cgo ** _cgo_free _cgo_malloc libcgo_thread_start initcgo ncgocall ** known to linker ** _rt0_$GOARCH _rt0_$GOARCH_$GOOS text etext data end pclntab epclntab symtab esymtab ** known to C compiler ** _divv _modv _div64by32 etc (arch specific) Tested on darwin/386, darwin/amd64, linux/386, linux/amd64. Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386. R=r, PeterGo CC=golang-dev https://golang.org/cl/2899041
-
- 18 Oct, 2010 1 commit
-
-
Yuval Pavel Zholkover authored
No multiple processes/locks, managed to compile and run a hello.go (with print not fmt). Also test/sieve.go seems to run until 439 and stops with a 'throw: all goroutines are asleep - deadlock!' - just like runtime/tiny. based on Russ's suggestions at: http://groups.google.com/group/comp.os.plan9/browse_thread/thread/cfda8b82535d2d68/243777a597ec1612 Build instructions: cd src/pkg/runtime make clean && GOOS=plan9 make install this will build and install the runtime. When linking with 8l, you should pass -s to suppress symbol generation in the a.out, otherwise the generated executable will not run. This is runtime only, the porting of the toolchain has already been done: http://code.google.com/p/go-plan9/source/browse in the plan9-quanstro branch. R=rsc CC=golang-dev https://golang.org/cl/2273041
-