summaryrefslogtreecommitdiff
path: root/libgo
Commit message (Collapse)AuthorAgeFilesLines
* runtime: set runtime.GOROOT value at build timeIan Lance Taylor2021-09-213-4/+21
| | | | | | | | | | | In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link (previously it was runtime/internal/sys.GOROOT). Do the same in libgo. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/351313 gotools/: * Makefile.am (check-runtime): Add goroot.go to --extrafiles. * Makefile.in: Regenerate.
* libgo: update to go1.17.1 releaseIan Lance Taylor2021-09-1613-20/+153
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/350414
* runtime: use hash32, not hash64, for amd64p32, mips64p32, mips64p32leIan Lance Taylor2021-09-072-4/+4
| | | | | | Fixes PR go/102102 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/348015
* libgo: update to final Go 1.17 releaseIan Lance Taylor2021-09-0512-65/+215
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/343729
* libgo: various fixes for Solaris supportIan Lance Taylor2021-08-149-16/+34
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342189
* runtime: use C cast syntax in stack.cIan Lance Taylor2021-08-131-1/+1
| | | | | | | Didn't notice earlier because this code is only used on systems that do not support -fsplit-stack. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/342051
* libgo: update to Go1.17rc2Ian Lance Taylor2021-08-122003-22813/+74652
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
* runtime: run gofmt on testdata/testwinsignal/main.goIan Lance Taylor2021-08-121-19/+19
|
* compiler: store pointers to go:notinheap types indirectlyIan Lance Taylor2021-08-121-2/+2
| | | | | | | | This is the gofrontend version of https://golang.org/cl/264480. For golang/go#42076 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/340609
* runtime: extend internal atomics to comply with sync/atomicIan Lance Taylor2021-08-052-0/+105
| | | | | | This is the gofrontend version of https://golang.org/cl/289152. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339690
* compile, runtime: make selectnbrecv return two valuesIan Lance Taylor2021-08-031-28/+3
| | | | | | | | | | | | | The only different between selectnbrecv and selectnbrecv2 is the later set the input pointer value by second return value from chanrecv. So by making selectnbrecv return two values from chanrecv, we can get rid of selectnbrecv2, the compiler can now call only selectnbrecv and generate simpler code. This is the gofrontend version of https://golang.org/cl/292890. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/339529
* compiler, runtime: allow slice to array pointer conversionIan Lance Taylor2021-08-022-0/+9
| | | | | | | | Panic if the slice is too short. For golang/go#395 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338630
* compiler, runtime: support unsafe.Add and unsafe.SliceIan Lance Taylor2021-08-021-0/+29
| | | | | | | For golang/go#19367 For golang/go#40481 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338949
* runtime: remove direct assignments to memory locationsIan Lance Taylor2021-07-092-3/+3
| | | | | | | | PR bootstrap/101374 They cause a warning with the updated GCC -Warray-bounds option. Replace them with calls to abort, which for our purposes is fine. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/333409
* libgo: update to Go1.16.5 releaseIan Lance Taylor2021-06-1031-131/+781
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/326772
* libgo: update configure to current sourcesIan Lance Taylor2021-05-181-2/+2
| | | | | | | | Change-Id: I12766baf02bfdf2233f1c5bde1a270f06b020aa7 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/321076 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
* libgo: update bzip2 binary test cases to match source repoIan Lance Taylor2021-05-182-0/+0
|
* libgo: use Windows line endings in testwinsignalIan Lance Taylor2021-05-181-19/+19
|
* libgo: update to Go1.16.3 releaseIan Lance Taylor2021-04-1220-67/+354
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/309490
* libgo: update to Go 1.16.2 releaseIan Lance Taylor2021-03-1532-191/+509
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/301459
* misc/cgo/testcarchive: don't use == for string equality in C codeIan Lance Taylor2021-03-121-1/+1
| | | | | | | | Backport of https://golang.org/cl/300993. For PR go/99553 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/301458
* runtime: cast SIGSTKSZ to uintptrIan Lance Taylor2021-03-081-2/+2
| | | | | | | In newer versions of glibc it is long, which causes a signed comparison warning. Fixes PR go/99458
* libgo: ensure memmove, memset 8 byte atomicity on ppc64xLynn Boger2021-02-256-6/+143
| | | | | | | | | | | | | | | | | Go requires that pointer moves are done 8 bytes at a time, but gccgo uses libc's memmove and memset which does not require that, and there are some cases where an 8 byte move might be done as 4+4. To enforce 8 byte moves for memmove and memset, this adds a C implementation in libgo/runtime for memmove and memset to be used on ppc64le and ppc64. Asm implementations were considered but discarded to avoid different implementations for different target ISAs. Fixes golang/go#41428 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/294931
* libgo: update to Go1.16 releaseIan Lance Taylor2021-02-1938-81/+434
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/293793
* libgo: install new 1.16 packagesIan Lance Taylor2021-02-032-17/+60
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/289069
* internal/cpu: correctly link to getsystemcfgClément Chigot2021-01-292-4/+1
| | | | | | | Directly set getsystemcfg as //extern in internal/cpu instead of trying to use the runtime as in Go toolchain. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287932
* libgo: update to Go1.16rc1Ian Lance Taylor2021-01-29187-10091/+10352
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/287493
* libgo: update hurd supportIan Lance Taylor2021-01-147-14/+20
| | | | | | | | Patch from Svante Signell. Fixes PR go/98496 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/283692
* syscall: ensure openat uses variadic libc wrapperPaul E. Murphy2021-01-121-1/+1
| | | | | | | | | | | | On powerpc64le, this caused a failure in TestUnshareUidGidMapping due to stack corruption which resulted in a bogus execve syscall. Use the existing c wrapper to ensure we respect the ppc abi for variadic functions. Fixes PR go/98610 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/282717
* Update GNU/Hurd configure supportSamuel Thibault2021-01-052-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ChangeLog: * libtool.m4: Match gnu* along other GNU systems. * libgo/config/libtool.m4: Match gnu* along other GNU systems. * libgo/configure: Re-generate. libffi/ * configure: Re-generate. libgomp/ * configure: Re-generate. gcc/ * configure: Re-generate. libatomic/ * configure: Re-generate. libbacktrace/ * configure: Re-generate. libcc1/ * configure: Re-generate. libgfortran/ * configure: Re-generate. libgomp/ * configure: Re-generate. libhsail-rt/ * configure: Re-generate. libitm/ * configure: Re-generate. libobjc/ * configure: Re-generate. liboffloadmic/ * configure: Re-generate. * plugin/configure: Re-generate. libphobos/ * configure: Re-generate. libquadmath/ * configure: Re-generate. libsanitizer/ * configure: Re-generate. libssp/ * configure: Re-generate. libstdc++-v3/ * configure: Re-generate. libvtv/ * configure: Re-generate. lto-plugin/ * configure: Re-generate. zlib/ * configure: Re-generate.
* syscall: don't define sys_SETREUID and friendsIan Lance Taylor2021-01-052-12/+0
| | | | | | | | | We don't use them, since we always call the C library functions which do the right thing anyhow. And they aren't defined on all GNU/Linux variants. Fixes PR go/98510 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281473
* internal/cpu: more build fixes for Go1.16beta1 releaseIan Lance Taylor2021-01-059-0/+63
| | | | | | | | | | | | Some files were missing from the libgo copy of internal/cpu, because they used to only declare CacheLinePadSize which libgo gets from goarch.sh. Now they also declare doinit, so copy them over. Adjust cpu_other.go. Fix the amd64p32 build by adding a build constraint to cpu_no_name.go. Fixes PR go/98493 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281472
* internal/cpu: add aarch64 support functionsIan Lance Taylor2021-01-011-0/+26
| | | | | | Patch from Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281000
* runtime: move startupRandomData back to runtime2.goIan Lance Taylor2021-01-012-4/+4
| | | | | | | | In libgo it's referenced from os_gccgo.go on all platforms. Fixes go/98496 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280999
* internal/cpu, golang.org/x/sys/cpu: support other GOARCH valuesIan Lance Taylor2021-01-019-48/+77
| | | | | | | | | Add support (mostly dummy support) for GOARCH values supported by gofrontend but not gc. Fix PPC handling. Fixes https://gcc.gnu.org/PR98493 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280932
* libgo: update to Go1.16beta1 releaseIan Lance Taylor2020-12-301186-30816/+67381
| | | | | | | | | | | | | This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
* runtime: eliminate scase.kind fieldIan Lance Taylor2020-12-221-40/+53
| | | | | | | | | | | | | | | | | | | | | | | | This is the gofrontend version of https://golang.org/cl/245125. Original CL description: Currently, we include a "kind" field on scase to distinguish the three kinds of cases in a select statement: sends, receives, and defaults. This commit removes by kind field by instead arranging for the compiler to always place sends before receives, and to provide their counts separately. It also passes an explicit "block bool" parameter to avoid needing to include a default case in the array. It's safe to shuffle cases like this because the runtime will randomize the order they're polled in anyway. For golang/go#40410. This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279735
* runtime: add "success" field to sudogIan Lance Taylor2020-12-223-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the gofrontend version of https://golang.org/cl/245019. Original CL description: The current wakeup protocol for channel communications is that the second goroutine sets gp.param to the sudog when a value is successfully communicated over the channel, and to nil when the wakeup is due to closing the channel. Setting nil to indicate channel closure works okay for chansend and chanrecv, because they're only communicating with one channel, so they know it must be the channel that was closed. However, it means selectgo has to re-poll all of the channels to figure out which one was closed. This commit adds a "success" field to sudog, and changes the wakeup protocol to always set gp.param to sg, and to use sg.success to indicate successful communication vs channel closure. While here, this also reorganizes the chansend code slightly so that the sudog is still released to the pool if the send blocks and then is awoken because the channel closed. For golang/go#40410 This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1, setting up for more compiler changes related to select handling. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279734
* runtime: omit nil-channel cases from selectgo's ordersIan Lance Taylor2020-12-221-40/+28
| | | | | | | | | | | | | | | | | | | | | This is the gofrontend version of https://golang.org/cl/245123. Original CL description: Currently, selectgo does an initial pass over the cases array to look for entries with nil channels, so they can be easily recognized and skipped later on. But this still involves actually visiting the cases. This commit changes selectgo to omit cases with nil channels when constructing pollorder, so that they'll be skipped over entirely later on. It also checks for caseDefault up front, which will facilitate changing it to use a "block bool" parameter instead. Updates golang/go#40410 This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1, setting up for more compiler changes related to select handling. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279733
* runtime: remove scase.releasetime fieldIan Lance Taylor2020-12-221-12/+9
| | | | | | | | | | | | | | | | This is the gofrontend version of https://golang.org/cl/245122. Original CL description: selectgo will report at most one block event, so there's no need to keep a releasetime for every select case. It suffices to simply track the releasetime of the case responsible for the wakeup. Updates golang/go#40410. This is being brought over to gofrontend as a step toward upgrading to Go1.16beta1. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279732
* libgo: adjust sysinfo scripts for changed -fdump-go-specNikhil Benesch2020-12-203-91/+21
| | | | | | | | | | | | | | | | | | | | | | | The -fdump-go-spec flag to GCC recently changed to be more fastidious about handling incomplete types. This caused some breakage in mk[r]sysinfo.sh on Solaris. This commit adjusts for the new behavior. Specifically: * Types that refer to _in6_addr may be hidden behind a typedef and can no longer be filtered out with `grep -v in6_addr`. Instead just rewrite the definition of _in6_addr to [16]byte wherever it appears. * timestruc_t is now (correctly) emitted as an alias for timespec, so this case is handled specially. * stdio.h is included in sysinfo.c to avoid emitting an incomplete definition of the FILE type. * Dummy definitions for _u?pad128_t are now emitted automatically, which conflict with the definitions installed by mk[r]sysinfo.sh. These definitions were actually dead code, so just remove them. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278672
* compiler: check for floating-point exponent overflowIan Lance Taylor2020-12-182-0/+2
| | | | | | | Adjust mksysinfo and mkrsysinfo to strip out floating-point max numbers, as they can trigger this error. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278476
* libgo: update to 1.15.6 releaseIan Lance Taylor2020-12-0810-20/+201
| | | | Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/276153
* syscall: don't use AF_LINK on hurdIan Lance Taylor2020-12-072-1/+102
| | | | | | | | Patch from Svante Signell. Fixes PR go/98153 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275939
* runtime: update type descriptor name in fieldtrack C support codeIan Lance Taylor2020-12-041-1/+1
| | | | | | | | We were using the old name, but nothing noticed because it is a weak reference that is permitted to be nil, so that it works with code that does not use the field tracking library. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/275449
* compiler: defer to middle-end for complex divisionIan Lance Taylor2020-12-033-60/+5
| | | | | | | | | | Go used to use slightly different semantics than C99 for complex division, so we used runtime routines to handle the different. The gc compiler has changes its behavior to match C99, so changes ours as well. For golang/go#14644 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274213
* internal/cpu: don't define CacheLinePadSize for mips64xIan Lance Taylor2020-11-301-2/+0
| | | | | | | | For libgo the definition comes from the generated file cpugen.go. Fixes PR go/98041 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273866
* compiler, runtime: check len/cap for append(s, make(T, l)...)Ian Lance Taylor2020-11-301-2/+9
| | | | | | | | The overflow checks done in growslice always reported an error for the capacity argument, even if it was the length argument that overflowed. This change lets the code pass the current issue4085b.go test. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273806
* libgo: define SO_RCVTIMEO on 32-bit GNU/LinuxIan Lance Taylor2020-11-302-0/+12
| | | | | | Fixes golang/go#42872 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273892
* log/syslog: correct asm name for C functionIan Lance Taylor2020-11-231-1/+1
| | | | | | Patch from Rainer Orth. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/272259