summaryrefslogtreecommitdiffstats
path: root/libgo/runtime/mgc0.c
Commit message (Collapse)AuthorAgeFilesLines
* runtime: Don't get confused if m changes during runtime_gc.ian2014-08-151-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214047 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to Go 1.2.1 release.ian2014-03-031-1/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208286 138bc75d-0d04-0410-961f-82ee72b054a4
* PR go/59866ian2014-01-171-1/+1
| | | | | | | runtime: Force work variable in mgc0 to be aligned on 8-byte boundary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206738 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: fix 32-bit malloc for pointers >= 0x80000000ian2014-01-091-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spans array is allocated in runtime_mallocinit. On a 32-bit system the number of entries in the spans array is MaxArena32 / PageSize, which (2U << 30) / (1 << 12) == (1 << 19). So we are allocating an array that can hold 19 bits for an index that can hold 20 bits. According to the comment in the function, this is intentional: we only allocate enough spans (and bitmaps) for a 2G arena, because allocating more would probably be wasteful. But since the span index is simply the upper 20 bits of the memory address, this scheme only works if memory addresses are limited to the low 2G of memory. That would be OK if we were careful to enforce it, but we're not. What we are careful to enforce, in functions like runtime_MHeap_SysAlloc, is that we always return addresses between the heap's arena_start and arena_start + MaxArena32. We generally get away with it because we start allocating just after the program end, so we only run into trouble with programs that allocate a lot of memory, enough to get past address 0x80000000. This changes the code that computes a span index to subtract arena_start on 32-bit systems just as we currently do on 64-bit systems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206501 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Add netpoll code that uses select.ian2013-11-141-0/+1
| | | | | | | Required for Solaris support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204817 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to October 24 version of master library.ian2013-11-061-286/+324
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204466 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Use runtime functions to pass closure value.ian2013-09-031-4/+3
| | | | | | | | | | | | This changes the compiler and runtime to not pass a closure value as the last argument, but to instead pass it via __go_set_closure and retrieve it via __go_get_closure. This eliminates the need for function descriptor wrapper functions. It will make it possible to retrieve the closure value in a reflect.MakeFunc function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202233 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to Go 1.1.1.ian2013-07-161-160/+693
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200974 138bc75d-0d04-0410-961f-82ee72b054a4
* compiler, runtime: Use function descriptors.ian2013-06-181-5/+5
| | | | | | | | | | | | | | | | This changes the representation of a Go value of function type from being a pointer to function code (like a C function pointer) to being a pointer to a struct. The first field of the struct points to the function code. The remaining fields, if any, are the addresses of variables referenced in enclosing functions. For each call to a function, the address of the function descriptor is passed as the last argument. This lets us avoid generating trampolines, and removes the use of writable/executable sections of the heap. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200181 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update Go library to master revision 15489/921e53d4863c.ian2013-01-291-63/+297
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195560 138bc75d-0d04-0410-961f-82ee72b054a4
* PR go/46986ian2013-01-241-1/+1
| | | | | | | | all: prepend #__USER_LABEL_PREFIX__ to mangled Go symbols For old-fashioned Darwin. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195438 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to revision 15193:6fdc1974457c of master library.ian2012-12-221-158/+392
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194692 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to current master library sources.ian2012-12-121-9/+37
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194460 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to current version of master library.ian2012-11-211-3/+77
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193688 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to current sources.ian2012-10-231-304/+337
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192704 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to Go 1.0.2 release.ian2012-06-251-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188943 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: More efficient implementation of trampolines.ian2012-05-251-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187899 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Copy runtime_printf from other Go library.ian2012-05-241-14/+13
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187848 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Use -fgo-pkgpath.ian2012-05-141-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187485 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Ignore stack sizes when deciding when to GC.ian2012-04-201-2/+9
| | | | | | | | Also allocate heap bitmaps bit in page size units and clear context when putting G structures on free list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186607 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2012-03-04 release.ian2012-03-061-8/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185010 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2012-02-22 release.ian2012-03-021-13/+31
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184819 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Save all registers on stack for GC scan.ian2012-02-101-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184098 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2012-02-07.ian2012-02-091-3/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184034 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2012-01-15.ian2012-01-251-55/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183539 138bc75d-0d04-0410-961f-82ee72b054a4
* libgo: Update to weekly.2011-11-18.ian2011-12-121-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182266 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Multiplex goroutines onto OS threads.ian2011-11-281-51/+193
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181772 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: New lock/note implementation.ian2011-11-221-6/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181633 138bc75d-0d04-0410-961f-82ee72b054a4
* runtime: Use some of 6g runtime.c for easier merging.ian2011-11-141-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181368 138bc75d-0d04-0410-961f-82ee72b054a4
* Introduce G structure and thread-local global g.ian2011-11-111-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181301 138bc75d-0d04-0410-961f-82ee72b054a4
* Update Go library to last weekly.ian2011-10-261-115/+519
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180552 138bc75d-0d04-0410-961f-82ee72b054a4
* Update Go library to r60.ian2011-09-161-11/+31
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178910 138bc75d-0d04-0410-961f-82ee72b054a4
* Update to current version of Go library.ian2011-05-201-1/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173931 138bc75d-0d04-0410-961f-82ee72b054a4
* Update to current version of Go library (revision 94d654be2064).ian2011-03-161-174/+597
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171076 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove the types float and complex.ian2011-01-211-17/+4
| | | | | | | | | | | | | Update to current version of Go library. Update testsuite for removed types. * go-lang.c (go_langhook_init): Omit float_type_size when calling go_create_gogo. * go-c.h: Update declaration of go_create_gogo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169098 138bc75d-0d04-0410-961f-82ee72b054a4
* Rework locking code to split stack much less.ian2010-12-171-10/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167973 138bc75d-0d04-0410-961f-82ee72b054a4
* Add Go frontend, libgo library, and Go testsuite.ian2010-12-031-0/+405
gcc/: * gcc.c (default_compilers): Add entry for ".go". * common.opt: Add -static-libgo as a driver option. * doc/install.texi (Configuration): Mention libgo as an option for --enable-shared. Mention go as an option for --enable-languages. * doc/invoke.texi (Overall Options): Mention .go as a file name suffix. Mention go as a -x option. * doc/frontends.texi (G++ and GCC): Mention Go as a supported language. * doc/sourcebuild.texi (Top Level): Mention libgo. * doc/standards.texi (Standards): Add section on Go language. Move references for other languages into their own section. * doc/contrib.texi (Contributors): Mention that I contributed the Go frontend. gcc/testsuite/: * lib/go.exp: New file. * lib/go-dg.exp: New file. * lib/go-torture.exp: New file. * lib/target-supports.exp (check_compile): Match // Go. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167407 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud