aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
AgeCommit message (Collapse)AuthorFilesLines
2020-08-17libgo: correctly handle AIX FAT library creationClément Chigot1-1/+1
The previous patch wasn't working everytime. Especially when AR had "-X32_64", the new .so would replace the default one and not just being added. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247377
2020-08-17internal/syscall/unix: restore ppc build tagIan Lance Taylor1-1/+1
It was accidentally lost in the 1.15rc1 merge. Fixes PR go/96567 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247843
2020-08-17Daily bump.GCC Administrator1-0/+5
2020-08-17runtime: revert eqtype for AIXClément Chigot9-10/+43
AIX linker is not able to merge identical type descriptors in a single symbol if there are coming from different object or shared object files. This results into several pointers referencing the same type descriptors. Thus, eqtype is needed to ensure that these different symbols will be considered as the same type descriptor. Fixes golang/go#39276 gcc/go/ChangeLog: * go-c.h (struct go_create_gogo_args): Add need_eqtype field. * go-lang.c (go_langhook_init): Set need_eqtype. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/235697
2020-08-17libgo: update to Go1.15rc2 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/247517
2020-08-17compiler: delete lowered constant stringsIan Lance Taylor2-2/+9
If we lower a constant string operation in a Binary_expression, delete the strings. This is safe because constant strings are always newly allocated. This is a hack to use much less memory when compiling the new time/tzdata package, which has a file that contains the sum of over 13,000 constant strings. We don't do this for numeric expressions because that could cause us to delete an Iota_expression. We should have a cleaner approach to memory usage some day. Fixes PR go/96450
2020-08-17internal/syscall/unix: correct ia64 syscall numbersIan Lance Taylor1-1/+1
Per Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246264
2020-08-17internal/syscall/unix: define copyFileRangeTrap for all architecturesIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246363
2020-08-17libgo: update to go1.15rc1Ian Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-08-17compiler,runtime: pass only ptr and len to some runtime callsIan Lance Taylor3-35/+40
This ports https://golang.org/cl/227163 to the Go frontend. This is a step toward moving up to the go1.15rc1 release. Original CL description: cmd/compile,runtime: pass only ptr and len to some runtime calls Some runtime calls accept a slice, but only use ptr and len. This change modifies most such routines to accept only ptr and len. After this change, the only runtime calls that accept an unnecessary cap arg are concatstrings and slicerunetostring. Neither is particularly common, and both are complicated to modify. Negligible compiler performance impact. Shrinks binaries a little. There are only a few regressions; the one I investigated was due to register allocation fluctuation. Passes 'go test -race std cmd', modulo golang/go#38265 and golang/go#38266. Wow, does that take a long time to run. file before after Δ % compile 19655024 19655152 +128 +0.001% cover 5244840 5236648 -8192 -0.156% dist 3662376 3658280 -4096 -0.112% link 6680056 6675960 -4096 -0.061% pprof 14789844 14777556 -12288 -0.083% test2json 2824744 2820648 -4096 -0.145% trace 11647876 11639684 -8192 -0.070% vet 8260472 8256376 -4096 -0.050% total 115163736 115118808 -44928 -0.039% For golang/go#36890 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245099
2020-08-17compiler: for package-scope "a = b; b = x" just set "a = x"Ian Lance Taylor2-8/+31
This avoids requiring an init function to initialize the variable. This can only be done if x is a static initializer. The go1.15rc1 runtime package relies on this optimization. The package has a variable "var maxSearchAddr = maxOffAddr". The maxSearchAddr variable is used by code that runs before package initialization is complete. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245098
2020-08-17compiler: scan all function literals for escape analysisIan Lance Taylor2-12/+19
We were scanning only function literals with closures, but not all function literals have closures. Discovered because compiler failed building 1.15rc1, as there is a function literal in the runtime package (p1 in hexdumpWords) that has no closure and, without escape analysis, was forcing a variable to the heap which is not permitted in the runtime. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/244802
2020-08-17libgo: add AIX FAT libraries supportClément Chigot1-1/+1
AIX-style libraries contains both 32 and 64 bit shared objects. This patch follows the adding of FAT libraries support in other gcc libraries (libgcc, listdc++, etc). Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/242957
2020-08-17libgo: update to Go 1.14.6 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/243317
2020-08-17compiler: avoid generating unnamed bool type descriptorIan Lance Taylor4-7/+15
We were generating it in cases where a boolean expression was converted directly to an empty interface type. Fixes golang/go#40152 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/242002
2020-08-17compiler: handle aliases to pointer types with interfacesIan Lance Taylor2-6/+13
Test case is https://golang.org/cl/241997. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/241998
2020-08-17libgo: update to Go 1.14.4 releaseIan Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/241999
2020-08-17compiler: remove some erroneous code that was never runIan Lance Taylor2-10/+6
The code accidentally called Type::type_descriptor rather than the do_type_descriptor method. Calling Type::type_descriptor with a second argument of NULL would always crash. Since that never happened, it revealed that this code was never actually executed. Fixes PR go/95970 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/240477
2020-08-17libgo: 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-08-17internal/syscall/unix: use getrandom_linux_generic.go on riscvTobias Klauser1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/237899
2020-08-17runtime: 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-08-17libgo: update x/sys/cpu after gccgo support addedClément Chigot1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/234597
2020-08-17libgo: 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-08-17libgo: 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-08-17libgo: 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-08-17runtime: 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-08-17syscall: 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-08-17compiler: 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