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
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
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
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
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
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
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
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
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
The .note.GNU-stack section tells the linker that this object does not
require an executable stack.
The .note.GNU-split-stack section tells the linker that functions in
this object can be called directly by split-stack functions, without
require a large stack.
The .note.GNU-no-split-stack section tells the linker that functions
in this object do not have a split-stack prologue.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198440
From-SVN: r276488
This CL serves as part of an initial change for enabling gollvm
building on arm64 linux, the rest of the change will be covered by
another one to the gollvm repo.
Incorporate type definition of 'uint128' to 'runtime' and 'syscall'
packges, the change is not specific to arm64 linux but made available
for all platforms.
Verified by building and unit-testing gollvm on linux x86-64 and arm64.
Verified by building and checking gccgo on linux x86-64 and arm64.
Fixesgolang/go#33711
Change-Id: I4720c7d810cfd4ef720962fb4104c5641b2459c0
From-SVN: r275919
This only matters on systems that pass a struct with a single pointer
field differently than passing a single pointer. I noticed it on
32-bit PPC, where the reflect package TestDirectIfaceMethod failed.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/195878
From-SVN: r275814