Commit Graph

38 Commits

Author SHA1 Message Date
Ian Lance Taylor 6736ef96ea libgo: Merge to master revision 19184.
The next revision, 19185, renames several runtime files, and
will be handled in a separate change.

From-SVN: r211328
2014-06-06 22:37:27 +00:00
Ian Lance Taylor bae90c989c libgo: Merge from revision 18783:00cce3a34d7e of master library.
This revision was committed January 7, 2014.  The next
revision deleted runtime/mfinal.c.  That will be done in a
subsequent merge.

This merge changes type descriptors to add a zero field,
pointing to a zero value for that type.  This is implemented
as a common variable.

	* go-gcc.cc (Gcc_backend::implicit_variable): Add is_common and
	alignment parameters.  Permit init parameter to be NULL.

From-SVN: r211249
2014-06-04 23:15:33 +00:00
Ian Lance Taylor 91d6f071fb runtime: Use a better heap location on arm64 systems.
Before this, the heap location used on a 64-bit system was not
available to user-space on arm64, so the "32-bit" strategy ended up
being used.  So use somewhere that is available, and for bonus points
is far away from where the kernel allocates address space by default.

From-SVN: r207977
2014-02-21 03:24:03 +00:00
Ian Lance Taylor abd471378c runtime: fix 32-bit malloc for pointers >= 0x80000000
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.

From-SVN: r206501
2014-01-09 23:16:56 +00:00
Ian Lance Taylor 7d608db296 runtime: Fix GC flag in when allocating memory from cgo.
From-SVN: r204815
2013-11-14 20:04:32 +00:00
Ian Lance Taylor 86dedeba36 runtime: Correct flag (FlagNoGC => FlagNoInvokeGC).
From-SVN: r204617
2013-11-09 16:23:00 +00:00
Ian Lance Taylor f038dae646 libgo: Update to October 24 version of master library.
From-SVN: r204466
2013-11-06 19:49:01 +00:00
Ian Lance Taylor b0c5dc1655 runtime: Handle allocating memory in cgo/SWIG function.
A function that returns an interface type and returns a value
that requires memory allocation will try to allocate while
appearing to be in a syscall.  This patch lets that work.

From-SVN: r201226
2013-07-24 22:30:25 +00:00
Ian Lance Taylor 08d22f9b41 runtime: Check _end rather than end to find end of program.
This fixes a problem on Solaris, where end is not defined in
the main program but comes from some shared library.  This
only matters for 32-bit targets.

From-SVN: r201220
2013-07-24 17:37:07 +00:00
Ian Lance Taylor be47d6ecef libgo: Update to Go 1.1.1.
From-SVN: r200974
2013-07-16 06:54:42 +00:00
Ian Lance Taylor d6f2922e91 libgo: Update Go library to master revision 15489/921e53d4863c.
From-SVN: r195560
2013-01-29 20:52:43 +00:00
Ian Lance Taylor f6b1e65ec3 re PR go/46986 (Go is not supported on Darwin)
PR go/46986
all: prepend #__USER_LABEL_PREFIX__ to mangled Go symbols
For old-fashioned Darwin.

From-SVN: r195438
2013-01-24 19:44:23 +00:00
Ian Lance Taylor 409a5e7eb4 libgo: Update to revision 15193:6fdc1974457c of master library.
From-SVN: r194692
2012-12-22 01:15:33 +00:00
Ian Lance Taylor fabcaa8df3 libgo: Update to current version of master library.
From-SVN: r193688
2012-11-21 07:03:38 +00:00
Ian Lance Taylor 776f27a67f compiler, runtime: More steps toward separating int and intgo.
From-SVN: r193059
2012-11-01 03:02:13 +00:00
Ian Lance Taylor 4ccad563d2 libgo: Update to current sources.
From-SVN: r192704
2012-10-23 04:31:11 +00:00
Ian Lance Taylor 08a680a887 libgo: Update to Go 1.0.2 release.
From-SVN: r188943
2012-06-25 16:20:03 +00:00
Ian Lance Taylor 86ba147f54 runtime: Copy runtime_printf from other Go library.
From-SVN: r187848
2012-05-24 20:44:34 +00:00
Ian Lance Taylor f3ab5720f7 libgo: Use -fgo-pkgpath.
From-SVN: r187485
2012-05-14 22:08:42 +00:00
Ian Lance Taylor 8a72417502 runtime: Ignore stack sizes when deciding when to GC.
Also allocate heap bitmaps bit in page size units and clear
context when putting G structures on free list.

From-SVN: r186607
2012-04-20 04:58:26 +00:00
Ian Lance Taylor 456fba2651 libgo: Update to weekly.2012-03-13.
From-SVN: r186023
2012-03-30 21:27:11 +00:00
Ian Lance Taylor 593f74bbab libgo: Update to weekly.2012-03-04 release.
From-SVN: r185010
2012-03-06 17:57:23 +00:00
Ian Lance Taylor 501699af16 libgo: Update to weekly.2012-02-22 release.
From-SVN: r184819
2012-03-02 20:01:37 +00:00
Ian Lance Taylor cbb6491d76 libgo: Update to weekly.2012-02-14 release.
From-SVN: r184798
2012-03-02 16:38:43 +00:00
Ian Lance Taylor df1304ee03 libgo: Update to weekly.2012-01-15.
From-SVN: r183539
2012-01-25 20:56:26 +00:00
Ian Lance Taylor b87974949f runtime: Copy runtime_panicstring from master library.
From-SVN: r181830
2011-11-30 00:21:52 +00:00
Ian Lance Taylor 737087cbc8 runtime: Multiplex goroutines onto OS threads.
From-SVN: r181772
2011-11-28 05:45:49 +00:00
Ian Lance Taylor 48e7d50e9f runtime: New lock/note implementation.
From-SVN: r181633
2011-11-22 20:24:44 +00:00
Ian Lance Taylor 787f74b487 runtime: Don't ask mmap for wrapping memory.
From-SVN: r180732
2011-11-01 05:20:40 +00:00
Ian Lance Taylor d8f412571f Update Go library to last weekly.
From-SVN: r180552
2011-10-26 23:57:58 +00:00
Ian Lance Taylor adb0401dac Update Go library to r60.
From-SVN: r178910
2011-09-16 15:47:21 +00:00
Ian Lance Taylor 9ff56c9570 Update to current version of Go library.
From-SVN: r173931
2011-05-20 00:18:15 +00:00
Rainer Orth 06ec98415a libgo: Always initialize semaphores.
2011-04-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR go/48222
	* runtime/malloc.goc (runtime_mallocinit): Call
	runtime_Mprof_Init, runtime_initfintab.
	* runtime/cpuprof.c (runtime_cpuprofinit): New function.
	* runtime/runtime.h (runtime_cpuprofinit): Declare it.
	* runtime/go-main.c (main): Use it.

From-SVN: r171960
2011-04-04 23:43:59 +00:00
Ian Lance Taylor 5133f00ef8 Update to current version of Go library (revision 94d654be2064).
From-SVN: r171076
2011-03-16 23:05:44 +00:00
Ian Lance Taylor 7e33c4aadc Avoid deadlock creating new thread.
From-SVN: r169114
2011-01-22 00:12:00 +00:00
Ian Lance Taylor ff5f50c52c Remove the types float and complex.
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.

From-SVN: r169098
2011-01-21 18:19:03 +00:00
Ian Lance Taylor a4ad1c7a08 Rework locking code to split stack much less.
From-SVN: r167973
2010-12-17 06:42:06 +00:00
Ian Lance Taylor 7a9389330e Add Go frontend, libgo library, and Go testsuite.
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.

From-SVN: r167407
2010-12-03 04:34:57 +00:00