aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
AgeCommit message (Collapse)AuthorFilesLines
2020-06-15libgo: update x/sys/cpu to add all GOARCHes supported by gccgoTobias Klauser1-1/+1
CL 237897 added additional GOARCHes supported by gccgo to x/sys/cpu. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/238038
2020-06-15internal/syscall/unix: use getrandom_linux_generic.go on riscvTobias Klauser1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237899
2020-06-12runtime: fix arenaBaseOffset for aix/ppcClément Chigot1-1/+1
The arenaBaseOffset modifications was aimed only for aix/ppc64. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237038
2020-05-25libgo: update x/sys/cpu after gccgo support addedClément Chigot1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234597
2020-05-15libgo: only build syscall test with -static if it worksIan Lance Taylor1-1/+1
Test whether -static works, and use it if possible. This time for sure. For PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234024
2020-05-14libgo: only build syscall test with -static on GNU/LinuxIan Lance Taylor1-1/+1
For PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234019
2020-05-13libgo: build syscall test with -staticIan Lance Taylor1-1/+1
This avoids problems finding libgo.so when running the test as root, which invokes the test as a child process in various limited environments. Fixes PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233897
2020-05-11runtime: fix TestCallersNilPointerPaniceric fang1-1/+1
The expected result of TestCallersNilPointerPanic has changed in GoLLVM. This CL makes some elements of the expected result optional so that this test passes in both gccgo and GoLLVM. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/230138
2020-05-11syscall: append to environment in tests, don't clobber itIan Lance Taylor1-1/+1
This is a partial backport of https://golang.org/cl/233318. It's only a partial backport because part of the change was already applied to libgo in CL 193497 as part of the update to the Go 1.13beta1 release. Fixes PR go/95061 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
2020-05-11compiler: use const std::string& in a couple of placesIan Lance Taylor3-4/+4
Use a reference to avoid copying a std::string. Fixes go/94766 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233320
2020-04-23gotest: increase the test timeouteric fang1-1/+1
The default test timeout duration of the gc compiler is 10 minutes, and the current default timeout duration of gofrontend is 240 seconds, which is not long enough for some big tests. This CL changes it to 600s, so that all tests have enough time to complete. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/229657
2020-04-20gccgo: fix runtime compilation on NetBSDBenny Siegert1-1/+1
si_code in siginfo_t is a macro on NetBSD, not a member of the struct itself, so add a C trampoline for receiving its value. Also replace references to mos.waitsemacount with the replacement and add some helpers from os_netbsd.go in the GC repository. Update golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/228918
2020-04-15runtime: use 64 bits of hash seed on arm64eric fang1-1/+1
This is the same issue as #33960, but on gofrontend. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220297
2020-04-15Go Gcc_backend class: mark prefetch as novopsIan Lance Taylor2-88/+100
PR go/94607 * go-gcc.cc (class Gcc_backend): Define builtin_const, builtin_noreturn, builtin_novops. (Gcc_backend::define_builtin): Change const_p and noreturn_p parameters to a single flags parameter. Change all callers. (Gcc_backend::Gcc_backend): Pass novops for prefetch.
2020-04-09libgo: update to final 1.14.2 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227551
2020-04-09compiler: look up composite literal keys in the global namespaceIan Lance Taylor2-4/+12
A composite literal key may not have a global definition, so Gogo::define_global_names may not see it. In order to correctly handle the case in which a predeclared identifier is used as a composite literal key, do an explicit check of the global namespace. Test case is https://golang.org/cl/227783. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227784
2020-04-06libgo: update to almost the 1.14.2 releaseIan Lance Taylor1-1/+1
Update to edea4a79e8d7dea2456b688f492c8af33d381dc2 which is likely to be approximately the 1.14.2 release. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/227377
2020-02-28runtime: handle linux/arm64 signal registereric fang1-1/+1
Set sigpc and implement dumpregs for linux/arm64. Without this change, cmd/vet tool test will fail randomly. Updates golang/go#20931 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220543
2020-02-26libgo: update to final Go1.14 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/221158
2020-02-24internal/poll: add hurd build tagIan Lance Taylor1-1/+1
Patch from Svante Signell. Fixes GCC PR go/93900 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220592
2020-02-24internal/syscall/unix: add hurd build tagIan Lance Taylor1-1/+1
Patch from Svante Signell. Fixes GCC PR go/93900 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220589
2020-02-18cmd/go: update -DGOPKGPATH to use current pkgpath encodingIan Lance Taylor1-1/+1
This will need to be done in the gc version too, probably more cleverly. This version will ensure that the next GCC release works correctly when using the GCC version of the go tool. Updates golang/go#37272 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219817
2020-02-16libgo: install internal/reflectlite.goxIan Lance Taylor1-1/+1
This makes it possible to use gccgo to bootstrap Go 1.14. If we don't install this, gccgo can't compile the sort package. Fixes GCC PR go/93679 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219617
2020-02-15libgo: update to Go1.14rc1 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
2020-02-15runtime: on 32-bit systems, limit default GOMAXPROCS to 32Ian Lance Taylor1-1/+1
Otherwise we can easily run out of stack space for threads. The user can still override by setting GOMAXPROCS. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219278
2020-02-03syscall: fix riscv64 GNU/Linux buildIan Lance Taylor1-1/+1
Make syscall_linux_riscv64.go, new in the 1.14beta1 release, look like the other syscall_linux_GOARCH.go files. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/217577
2020-01-29runtime, syscall: add a couple of hurd build tagsIan Lance Taylor1-1/+1
Patch by Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216959
2020-01-29runtime: update netpoll_hurd.go for go1.14beta1 changesIan Lance Taylor1-1/+1
Patch from Svante Signell. Updates PR go/93468 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216958
2020-01-27compiler: cleanups permitted by GCC requirement of MPFR 3.1.0Ian Lance Taylor4-58/+58
For MPFR functions, change from GMP_RND* to MPFR_RND*. Also change mp_exp_t to mpfr_expt_t. Fixes PR go/92463 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216417
2020-01-24libgo: handle --with-toolexeclibdir=.Ian Lance Taylor1-1/+1
Patch by Maciej W. Rozycki. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239
2020-01-23internal/cpu: don't define CacheLinePadSize for riscv64Ian Lance Taylor1-1/+1
In libgo CacheLinePadSize is defined by the generated file cpugen.go. Keep cpu_riscv64.go around, even though it is now empty, so that we will pick up changes to it in future merges. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216077
2020-01-22gotest: explicitly skip type descriptorsIan Lance Taylor1-1/+1
Type descriptors are normally weak and nm will report them as V, so we will skip them when collecting the list of symbols. But when not using GNU nm, they may be reported as D, so also skip them in symstogo. This fixes go/doc/check on Solaris. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215900
2020-01-22runtime: for Solaris, add osinit, and drop duplicate getncpuIan Lance Taylor1-1/+1
Fixes a build breakage introduced in the 1.14beta1 upgrade. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215857
2020-01-22internal/syscall/unix: use getrandom_linux_generic.go on arm64beAndrew Pinski1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215342
2020-01-22runtime: call runtime_nanotime1, not runtime_nanotimeIan Lance Taylor1-1/+1
The function name was changed in 1.14beta1. Fix the non-x86, non-s390 code. Fixes golang/go#36694 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215724
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2020-01-10gotest: don't use localIan Lance Taylor1-1/+1
It's not part of the POSIX shell standard. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214300 From-SVN: r280118
2020-01-10compiler: permit duplicate methods from embedded interfacesIan Lance Taylor2-10/+18
This is a language change for Go 1.14. Updates golang/go#6977 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214240 From-SVN: r280109
2020-01-09libgo: compile examples in _test packagesIan Lance Taylor1-1/+1
Previously if the only names defined by _test packages were examples, the gotest script would emit an incorrect _testmain.go file. I worked around that by marking the example_test.go files +build ignored. This CL changes the gotest script to handle this case correctly, and removes the now-unnecessary build tags. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214039 From-SVN: r280085
2020-01-09compiler: don't localize names in export dataIan Lance Taylor2-2/+2
Localizing names in export data causes the compiler output to change depending on the LANG environment variable, so don't do it. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214038 From-SVN: r280057
2020-01-09compiler: don't add composite literal keys to package bindingsIan Lance Taylor5-33/+101
Adding composite literal keys to package bindings gets confusing when it is combined with dot imports. The test case showing the resulting compilation failure is https://golang.org/cl/213899. Fix this by adding a new expression type to hold composite literal keys. We shouldn't see it during lowering if it is a struct field name, because Composite_literal_expression::do_traverse skips struct field names. Or, it should, but that didn't quite work with pointer types so it had to be tweaked. This lets us remove the code that recorded whether an Unknown_expression is a composite literal key. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214017 From-SVN: r280056
2020-01-08compiler: fix loopdepth tracking in array slicing expression in escape analysisIan Lance Taylor2-2/+3
In the gc compiler, for slicing an array, its AST has an implicit address operation node. There isn't such node in the gofrontend AST. During the escape analysis, we create a fake node to mimic the gc compiler's behavior. For the fake node, the loopdepth was not tracked correctly, causing miscompilation. Since this is an address operation, do the same thing as we do for the address operator. Fixes golang/go#36404. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213643 From-SVN: r279984
2020-01-07compiler, runtime: stop using __go_runtime_errorIan Lance Taylor6-100/+42
Use specific panic functions instead, which are mostly already in the runtime package. Also correct "defer nil" to panic when we execute the defer, rather than throw when we queue it. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213642 From-SVN: r279979
2020-01-07compiler: avoid write barrier for a[i] = a[i][:v]Ian Lance Taylor2-1/+19
This avoids generating a write barrier for code that appears in the Go1.14beta1 runtime package in (*pageAlloc).sysGrow: s.summary[l] = s.summary[l][:needIdxLimit] Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213558 From-SVN: r279962
2020-01-07compiler: avoid a couple of compiler crashesIan Lance Taylor2-1/+10
These came up while building 1.14beta1 while the code was still invalid. The policy is to not bother committing invalid test cases that cause compiler crashes. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/213537 From-SVN: r279956
2020-01-02compiler, runtime, reflect: generate hash functions only for map keysIan Lance Taylor6-161/+106
Right now we generate hash functions for all types, just in case they are used as map keys. That's a lot of wasted effort and binary size for types which will never be used as a map key. Instead, generate hash functions only for types that we know are map keys. Just doing that is a bit too simple, since maps with an interface type as a key might have to hash any concrete key type that implements that interface. So for that case, implement hashing of such types at runtime (instead of with generated code). It will be slower, but only for maps with interface types as keys, and maybe only a bit slower as the aeshash time probably dominates the dispatch time. Reorg where we keep the equals and hash functions. Move the hash function from the key type to the map type, saving a field in every non-map type. That leaves only one function in the alg structure, so get rid of that and just keep the equal function in the type descriptor itself. While we're here, reorganize the rtype struct to more closely match the gc version. This is the gofrontend version of https://golang.org/cl/191198. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212843 From-SVN: r279848
2020-01-02compiler: split writing of equal and hash functions for typesIan Lance Taylor7-361/+545
Separate the generation of type equality and hash functions, rather than doing them in a single operation. This is almost entirely a pure refactoring in preparation for generating hash functions only for types that are map keys. The only change in generated code is that for types that are the size of numeric types, but not aligned like numeric types, such as [8]byte, now use standard hash functions. They previously used special-purpose hash functions because they required special-purpose equal functions. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212842 From-SVN: r279847
2020-01-01Update copyright years.Jakub Jelinek14-14/+16
From-SVN: r279813
2020-01-01gcc.c (process_command): Update copyright notice dates.Jakub Jelinek2-1/+5
* gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/d/ * gdc.texi: Bump @copyrights-d year. gcc/go/ * gccgo.texi: Bump @copyrights-go year. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. libitm/ * libitm.texi: Bump @copying's copyright year. libgomp/ * libgomp.texi: Bump @copying's copyright year. libquadmath/ * libquadmath.texi: Bump @copying's copyright year. From-SVN: r279811
2019-12-24re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd)Ian Lance Taylor1-1/+1
PR go/93020 libgo: Hurd portability patches By Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212409 From-SVN: r279724