summaryrefslogtreecommitdiff
path: root/libgo/go/internal
AgeCommit message (Collapse)Author
2020-04-06libgo: update to almost the 1.14.2 releaseIan Lance Taylor
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-24internal/poll: add hurd build tagIan Lance Taylor
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 Taylor
Patch from Svante Signell. Fixes GCC PR go/93900 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220589
2020-02-15libgo: update to Go1.14rc1 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/218017
2020-01-23internal/cpu: don't define CacheLinePadSize for riscv64Ian Lance Taylor
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-22internal/syscall/unix: use getrandom_linux_generic.go on arm64beAndrew Pinski
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215342
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2020-01-02compiler, runtime, reflect: generate hash functions only for map keysIan Lance Taylor
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
2019-12-24re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd)Ian Lance Taylor
PR go/93020 libgo: Hurd portability patches By Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212409 From-SVN: r279724
2019-10-14internal/cpu: define kdsaQuery for s390Ian Lance Taylor
Patch from Andreas Krebbel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/201037 From-SVN: r276962
2019-09-12libgo: update to Go1.13Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194698 From-SVN: r275691
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-04-08libgo: update to Go 1.12.2Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170706 From-SVN: r270214
2019-03-19libgo: fix build on AIXIan Lance Taylor
Since aix/ppc64 has been added to GC toolchain, a mix between new and old files were created in gcc toolchain. This commit corrects this merge for aix/ppc64 and aix/ppc. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167658 From-SVN: r269797
2019-03-18libgo: update to Go 1.12.1Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167749 From-SVN: r269780
2019-03-09re PR go/89447 (libgo largefile support is incomplete and inconsistent)Ian Lance Taylor
PR go/89447 syscall, internal/syscall: adjust use of largefile functions Consistently call __go_openat for openat. Use fstatat64, creat64, sendfile64, and getdents64 where needed. Based on patch by Rainer Orth. Fixes https://gcc.gnu.org/PR89447 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166420 From-SVN: r269521
2019-02-21re PR go/89407 (go bootstrap failure on s390x starting with r268941)Ian Lance Taylor
PR go/89407 internal/cpu: use #ifdef __s390x__ in C code Patch by Jakub Jelinek. Fixes https://gcc.gnu.org/PR89407 Reviewed-on: https://go-review.googlesource.com/c/163297 From-SVN: r269063
2019-02-19re PR go/89169 (FAIL: internal/cpu)Ian Lance Taylor
PR go/89169 internal/cpu: do not require POWER8 Although the gc toolchain requires POWER8, the gccgo toolchain does not. Fixes https://gcc.gnu.org/PR89169 Reviewed-on: https://go-review.googlesource.com/c/162979 From-SVN: r269019
2019-02-15re PR go/89123 (Too many go test failures on s390x-linux)Ian Lance Taylor
PR go/89123 internal/cpu, runtime: add S/390 CPU capability support Patch by Robin Dapp. Updates https://gcc.gnu.org/PR89123 Reviewed-on: https://go-review.googlesource.com/c/162887 From-SVN: r268941
2019-02-07os, net, crypto/x509: add hurd supportIan Lance Taylor
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161519 From-SVN: r268604
2019-02-07internal/syscall/unix: add constants for hurdIan Lance Taylor
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/161517 From-SVN: r268602
2019-02-01libgo: add hurd build tags to test filesIan Lance Taylor
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160823 From-SVN: r268460
2019-02-01libgo: add hurd build tagsIan Lance Taylor
Patch by Svante Signell. Reviewed-on: https://go-review.googlesource.com/c/160822 From-SVN: r268459
2019-01-22re PR go/88927 (Bootstrap failure on arm in libgo starting with r268084)Ian Lance Taylor
PR go/88927 runtime, internal/cpu: fix build for ARM GNU/Linux Was failing with ../../../libgo/go/internal/cpu/cpu.go:138:2: error: reference to undefined name 'doinit' 138 | doinit() | ^ Fix it by adding in Go 1.12 internal/cpu/cpu_arm.go, and the code in runtime that initializes the values. Fixes https://gcc.gnu.org/PR88927. Reviewed-on: https://go-review.googlesource.com/c/158717 From-SVN: r268131
2019-01-21libgo: fix building, and some testing, on SolarisIan Lance Taylor
Restore some of the fixes that were applied to golang_org/x/net/lif but were lost when 1.12 moved the directory to internal/x/net/lif. Add support for reading /proc to fetch argc/argv/env for c-archive mode. Reviewed-on: https://go-review.googlesource.com/c/158640 From-SVN: r268130
2019-01-18libgo: update to Go1.12beta2Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
2018-10-25compiler: improve name mangling for packpathsIan Lance Taylor
The current implementation of Gogo::pkgpath_for_symbol was written in a way that allowed two distinct package paths to map to the same symbol, which could cause collisions at link- time or compile-time. Switch to a better mangling scheme to insure that we get a unique packagepath symbol for each package. In the new scheme instead of having separate mangling schemes for identifiers and package paths, the main identifier mangler ("go_encode_id") now handles mangling of both packagepath characters and identifier characters. The new mangling scheme is more intrusive: "foo/bar.Baz" is mangled as "foo..z2fbar.Baz" instead of "foo_bar.Baz". To mitigate this, this patch also adds a demangling capability so that function names returned from runtime.CallersFrames are converted back to their original unmangled form. Changing the pkgpath_for_symbol scheme requires updating a number of //go:linkname directives and C "__asm__" directives to match the new scheme, as well as updating the 'gotest' driver (which makes assumptions about the correct mapping from pkgpath symbol to package name). Fixes golang/go#27534. Reviewed-on: https://go-review.googlesource.com/c/135455 From-SVN: r265510
2018-10-05libgo: use inline assembly in favor of call to _xgetbv()Ian Lance Taylor
Use inline assembly in the implementation of internal_cpu.xgetbv as opposed to a call to the intrinsic _xgetbv(), since non-gcc compilers (e.g. clang) may or may not have support for it. Reviewed-on: https://go-review.googlesource.com/c/140137 From-SVN: r264882
2018-10-02internal/bytealg: support systems that don't have memmemIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/138839 From-SVN: r264798
2018-10-01libgo: support x32 as GOARCH=amd64p32 GOOS=linuxIan Lance Taylor
This is enough to let libgo build when configured using --with-multilib-list=m64,m32,mx32. I don't have an x32-enabled kernel so I haven't tested whether it executes correctly. For https://gcc.gnu.org/PR87470 Reviewed-on: https://go-review.googlesource.com/138817 From-SVN: r264772
2018-09-25internal/bytealg, internal/cpu, internal/poll: portability fixesIan Lance Taylor
In internal/bytealg correct a +build tag to never build indexbyte_generic.go for the gofrontend, where we always use indexbyte_native.go. For internal/cpu let the Makefile define CacheLineSize using goarch.sh, rather than trying to enumerate all the possibilities in cpu_ARCH.go files. In internal/poll call the C fcntl function rather than using SYS_FCNTL. Change mksysinfo.sh to ensure that F_GETPIPE_SZ is always defined, and check that in internal/poll. Reviewed-on: https://go-review.googlesource.com/137256 From-SVN: r264572
2018-09-24libgo: update to Go 1.11Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546
2018-05-31libgo: update to Go 1.10.2 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/115196 From-SVN: r261041
2018-05-02libgo: add support for the Nios II architectureIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/90775 From-SVN: r259866
2018-02-22re PR go/84484 (libgo configure tests fail to find -latomic)Andreas Schwab
PR go/84484 libgo: add support for riscv64 Patch by Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/96377 * go.test/go-test.exp (go-set-goarch): Recognize riscv64-*-*. From-SVN: r257914
2018-01-30internal/syscall/unix: add randomTrap for sh/shbeIan Lance Taylor
CL 84555 added support for the SuperH architecture, but didn't add the randomTrap definition to be used for the getrandom syscall on Linux. Add it now. Reviewed-on: https://go-review.googlesource.com/90535 From-SVN: r257171
2018-01-17libgo: update to Go1.10beta2 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/87897 From-SVN: r256794
2018-01-09libgo: update to Go1.10beta1Ian Lance Taylor
Update the Go library to the 1.10beta1 release. Requires a few changes to the compiler for modifications to the map runtime code, and to handle some nowritebarrier cases in the runtime. Reviewed-on: https://go-review.googlesource.com/86455 gotools/: * Makefile.am (go_cmd_vet_files): New variable. (go_cmd_buildid_files, go_cmd_test2json_files): New variables. (s-zdefaultcc): Change from constants to functions. (noinst_PROGRAMS): Add vet, buildid, and test2json. (cgo$(EXEEXT)): Link against $(LIBGOTOOL). (vet$(EXEEXT)): New target. (buildid$(EXEEXT)): New target. (test2json$(EXEEXT)): New target. (install-exec-local): Install all $(noinst_PROGRAMS). (uninstall-local): Uninstasll all $(noinst_PROGRAMS). (check-go-tool): Depend on $(noinst_PROGRAMS). Copy down objabi.go. (check-runtime): Depend on $(noinst_PROGRAMS). (check-cgo-test, check-carchive-test): Likewise. (check-vet): New target. (check): Depend on check-vet. Look at cmd_vet-testlog. (.PHONY): Add check-vet. * Makefile.in: Rebuild. From-SVN: r256365
2017-09-20internal,net,os,runtime,syscall: fixes for AIX following update to go1.9Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/64551 From-SVN: r253016
2017-09-14libgo: update to go1.9Ian Lance Taylor
Reviewed-on: https://go-review.googlesource.com/63753 From-SVN: r252767
2017-06-21Forgot to remove this file in the last libgo commit.Ian Lance Taylor
libgo: remove old MIPS architecture names This removes the old names for the 3 main MIPS ABIs: mipso32, mipsn32 and mipsn64. It also removes the mipso64 ABI which has no equivalent architecture name in go. This ABI has been dead for sometime and I doubt anyone will miss it. Change-Id: I087b243784edf6705fdaf9c32e3233da5e387283 From-SVN: r249485
2017-06-21libgo: remove old MIPS architecture namesIan Lance Taylor
This removes the old names for the 3 main MIPS ABIs: mipso32, mipsn32 and mipsn64. It also removes the mipso64 ABI which has no equivalent architecture name in go. This ABI has been dead for sometime and I doubt anyone will miss it. Reviewed-on: https://go-review.googlesource.com/46154 From-SVN: r249477
2017-06-21internal/syscall/unix: implement randomTrap on mips64p32*Ian Lance Taylor
Rename getrandom_linux_mipsn32.go to use the new architecture name for the n32 ABI and enable building it on mips64p32 and mips64p32le. Reviewed-on: https://go-review.googlesource.com/46151 From-SVN: r249474
2017-06-14internal/testenv: support testing gccgoIan Lance Taylor
If GO_TESTING_GOTOOLS is set in the environment, permit tests using gccgo to run the go tool. Like GO_BUILDER_NAME, this should not be set normally. But it is needed when testing the go tool itself, and will be set by the gotools Makefile in a future CL. Reviewed-on: https://go-review.googlesource.com/45693 From-SVN: r249195
2017-04-17libgo: update to Go 1.8.1 releaseIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/40775 From-SVN: r246957
2017-03-22internal/syscall/unix: add randomTrap for m68kIan Lance Taylor
Patch by Andrwas Schwab. Reviewed-on: https://go-review.googlesource.com/38456 From-SVN: r246410
2017-01-14libgo: update to Go 1.8 release candidate 1Ian Lance Taylor
Compiler changes: * Change map assignment to use mapassign and assign value directly. * Change string iteration to use decoderune, faster for ASCII strings. * Change makeslice to take int, and use makeslice64 for larger values. * Add new noverflow field to hmap struct used for maps. Unresolved problems, to be fixed later: * Commented out test in go/types/sizes_test.go that doesn't compile. * Commented out reflect.TestStructOf test for padding after zero-sized field. Reviewed-on: https://go-review.googlesource.com/35231 gotools/: Updates for Go 1.8rc1. * Makefile.am (go_cmd_go_files): Add bug.go. (s-zdefaultcc): Write defaultPkgConfig. * Makefile.in: Rebuild. From-SVN: r244456
2016-10-12syscall, internal/syscall/unix: Fix getrandom, clone on sparc64Ian Lance Taylor
Since sparc is a valid architecture, the name of getrandom_linux_sparc.go means that it will be ignored on sparc64, even though it's whitelisted with a +build line. On SPARC, clone has a unique return value convention which requires some inline assembly to convert it to the normal convention. Reviewed-on: https://go-review.googlesource.com/30873 From-SVN: r241051
2016-09-23internal/syscall/unix: add getrandom syscall for MIPS and SPARCIan Lance Taylor
Reviewed-on: https://go-review.googlesource.com/29678 From-SVN: r240457
2016-08-07internal/syscall/unix: fix syscalls for alpha, ia64, s390Ian Lance Taylor
Also change the configure script to set GOARCH correctly for ia64, and add ia64 as a processor to match.sh and gotest. Reviewed-on: https://go-review.googlesource.com/25549 From-SVN: r239225