- 28 Nov, 2018 8 commits
-
-
Keith Randall authored
There's nothing enforcing ordering between redundant nil checks when they may occur during the same memory state. Commit to using the earliest one in source order. Otherwise the choice of which to remove depends on the ordering of values in a block (before scheduling). That's unfortunate when trying to ensure that the compiler doesn't depend on that ordering for anything. Update #20178 Change-Id: I2cdd5be10618accd9d91fa07406c90cbd023ffba Reviewed-on: https://go-review.googlesource.com/c/151517 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Tobias Klauser authored
Update golang.org/x/net/internal/nettest to x/net git rev 9b4f9f5ad519 for: internal/nettest: add AIX operating system https://golang.org/cl/144077 This fixes the build failure of the vendored x/net/internal/nettest on aix/ppc64. Additionally this also pulls in: all: re-adjust build constraints for JS and NaCl https://golang.org/cl/122539 Updates #25893 Change-Id: I9abefc7d4ad158e9e68913362f7f1320321d6f5f Reviewed-on: https://go-review.googlesource.com/c/151301 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Updates #23011 Change-Id: I38360501c772ddf7cc4bd1b5d7b0225387ead535 Reviewed-on: https://go-review.googlesource.com/c/151361Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Alex Brainman authored
It appears that linux/arm64 https://build.golang.org/log/6808dbded6aebadf68cb65a0e30e4d1a62cd687b fails with /workdir/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1 /usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:4973 collect2: error: ld returned 1 exit status FAIL plugin [build failed] error. So stop building these tests on linux/arm64. Fixes linux/arm64 build Change-Id: I41eb3d9659f7967d80136513899a5203bbf03fb1 Reviewed-on: https://go-review.googlesource.com/c/151478 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Tobias Klauser authored
Now that the tree has been frozen for some time, update the tzdata database to version 2018g (released 2018-10-26) for Go 1.12. Updates #22487 Change-Id: I9e82bcdaef28d308643c08c9fd3472e4c14a196e Reviewed-on: https://go-review.googlesource.com/c/151299 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Wil Selwood authored
The comments on the category range tables in the unicode package are fairly redundent and require an external source to translate into human readable category names. This adds a look up table with the category descriptions and uses it if available when generating the comments for the range tables. Fixes #28954 Change-Id: I853e2d270def6492c2c1dd2ad0ec761a74c04e5d Reviewed-on: https://go-review.googlesource.com/c/151297Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Updates #23011 Change-Id: I0eccea5d08a8758585f183540787b78fb80aa36a Reviewed-on: https://go-review.googlesource.com/c/151360Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Fixes #25370 Change-Id: I12da0cc17f433ca12c85fb986d65ac9ecb2c3f20 Reviewed-on: https://go-review.googlesource.com/c/151359 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Nov, 2018 13 commits
-
-
Clément Chigot authored
This commit changes the code generated for addressing symbols on AIX operating system. On AIX, every symbol accesses must be done via another symbol near the TOC, named TOC anchor or TOC entry. This TOC anchor is a pointer to the symbol address. During Progedit function, when a symbol access is detected, its instructions are modified to create a load on its TOC anchor and retrieve the symbol. Change-Id: I00cf8f49c13004bc99fa8af13d549a709320f797 Reviewed-on: https://go-review.googlesource.com/c/151039 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit fixes and improves the generation of dynamic symbols for XCOFF files. This mainly adds for every dynamic symbols a new symbol named s.Extname(). Change-Id: I5b788f076d9a05e5d42f08eb1a74fd3e3efa9a86 Reviewed-on: https://go-review.googlesource.com/c/151038 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Tolpin authored
Parenthesized declaration must be printed if len(d.Specs) > 1 even if d.Lparen==token.NoPos. This happens if the node tree is created programmatically. Otherwise, all but the first specifications just silently disappear from the output. Change-Id: I17ab24bb1cd56fe1e611199698535ca60a97f5ea GitHub-Last-Rev: 2f168dc7ad4a29149685efc70f180987523271e4 GitHub-Pull-Request: golang/go#28533 Reviewed-on: https://go-review.googlesource.com/c/146657 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
We want to issue loads as soon as possible, especially when they are going to miss in the cache. Using a conditional move (CMOV) here: i := ... if cond { i++ } ... = a[i] means that we have to wait for cond to be computed before the load is issued. Without a CMOV, if the branch is predicted correctly the load can be issued in parallel with computing cond. Even if the branch is predicted incorrectly, maybe the speculative load is close to the real load, and we get a prefetch for free. In the worst case, when the prediction is wrong and the address is way off, we only lose by the time difference between the CMOV latency (~2 cycles) and the mispredict restart latency (~15 cycles). We only squash CMOVs that affect load addresses. Results of CMOVs that are used for other things (store addresses, store values) we use as before. Fixes #26306 Change-Id: I82ca14b664bf05e1d45e58de8c4d9c775a127ca1 Reviewed-on: https://go-review.googlesource.com/c/145717 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Clément Chigot authored
This commit fixes a mistake made in CL 144538. This nilcheck can be removed because OpPPC64LoweredMove will fault if arg0 is nil, as it's used to store. Further information can be found in cmd/compile/internal/ssa/nilcheck.go. Change-Id: Ifec0080c00eb1f94a8c02f8bf60b93308e71b119 Reviewed-on: https://go-review.googlesource.com/c/151298 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Elias Naur authored
After CL 151139 introduced a plugin test, the macOS linker for iOS outputs: ld: warning: -flat_namespace is deprecated on iOS Omit the -flat_namespace flag on iOS; plugins are not supported on iOS, and unlikely to ever be. Change-Id: I2d08f8b984efcfd442d572b4a0f3a2c95c551b9f Reviewed-on: https://go-review.googlesource.com/c/151300 Run-TryBot: Elias Naur <elias.naur@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
TestImportTableInUnknownSection uses kernel32.dll file, but the error message mentions atmfd.dll. Adjust error message to match the test. This change should have been part of CL 151137. Updates #27904 Change-Id: Ifc31a12134b328472191122f8426ab6ed234fbd4 Reviewed-on: https://go-review.googlesource.com/c/151477 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Alex Brainman authored
When building windows/386 executable that imports "plugin" package, cmd/link adds reference to DLL with blank name. Running objdump -x a.exe reports ... The Import Tables (interpreted .idata section contents) ... DLL Name: vma: Hint/Ord Member-Name Bound-To 25308a 0 _GLOBAL_OFFSET_TABLE_ ... So, obviously, executable cannot run, because Windows complains that it cannot find DLL when trying to run it. Stop using _GLOBAL_OFFSET_TABLE_ on windows/386. Fixes #28789 Change-Id: Idd489eafd998f6e329f40c5d90a2a8965ab1d873 Reviewed-on: https://go-review.googlesource.com/c/151139 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Bryan C. Mills authored
We were using the mode reported by ReadDir to decide whether each entry is a file, but in the case of symlinks that isn't sufficient: a symlink could point to either a file or a directory, and if it is a file we should treat it as such. Fixes #28107 Change-Id: Icf6e495dce427a7b1124c9cc9f085e40a215c169 Reviewed-on: https://go-review.googlesource.com/c/141097 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brian Kessler authored
Div panics when y<=hi because either the quotient overflows the size of the output or division by zero occurs when y==0. This provides a uniform behavior for all implementations. Fixes #28316 Change-Id: If23aeb10e0709ee1a60b7d614afc9103d674a980 Reviewed-on: https://go-review.googlesource.com/c/149517Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brian Kessler authored
Note that the intrinsic implementation panics separately for overflow and divide by zero, which matches the behavior of the pure go implementation. There is a modest performance improvement after intrinsic implementation. name old time/op new time/op delta Div-4 53.0ns ± 1% 47.0ns ± 0% -11.28% (p=0.008 n=5+5) Div32-4 18.4ns ± 0% 18.5ns ± 1% ~ (p=0.444 n=5+5) Div64-4 53.3ns ± 0% 47.5ns ± 4% -10.77% (p=0.008 n=5+5) Updates #28273 Change-Id: Ic1688ecc0964acace2e91bf44ef16f5fb6b6bc82 Reviewed-on: https://go-review.googlesource.com/c/144378 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Brian Kessler authored
Explicitly check for divide-by-zero/overflow and panic with the appropriate runtime error. The additional checks have basically no effect on performance since the branch is easily predicted. name old time/op new time/op delta Div-4 53.9ns ± 1% 53.0ns ± 1% -1.59% (p=0.016 n=4+5) Div32-4 17.9ns ± 0% 18.4ns ± 0% +2.56% (p=0.008 n=5+5) Div64-4 53.5ns ± 0% 53.3ns ± 0% ~ (p=0.095 n=5+5) Updates #28316 Change-Id: I36297ee9946cbbc57fefb44d1730283b049ecf57 Reviewed-on: https://go-review.googlesource.com/c/144377 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Don't convert values that aren't Go constants, like uintptr(unsafe.Pointer(nil)), to a literal constant. This avoids assuming they are constants for things like indexing, array sizes, case duplication, etc. Also, nil is an allowed duplicate in switches. CTNILs aren't Go constants. Fixes #28078 Fixes #28079 Change-Id: I9ab8af47098651ea09ef10481787eae2ae2fb445 Reviewed-on: https://go-review.googlesource.com/c/151320 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Nov, 2018 13 commits
-
-
Clément Chigot authored
XCOFF files can't have multiples text or data sections. The name of each type section must be .text, .data and .bss. This commit also updates cmd/internal/objfile/xcoff.go to retrieve Go sections using runtime symbols. Change-Id: Ib6315f19dad2d154a4531fc6508e7cbd8bc94743 Reviewed-on: https://go-review.googlesource.com/c/151037 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Fixes #28955 Change-Id: I738ad0c76f7bf8fc504a48cf55d3becd5ed7a9d6 Reviewed-on: https://go-review.googlesource.com/c/151337Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Clément Chigot authored
On XCOFF, it is forbidden relocation of a DATA pointer to a text section. It happens when a RODATA symbol needs a DATA symbol's address. This commit moves every RODATA symbols with a R_ADDR on a data symbol to .data sections to avoid these relocations. Change-Id: I7f34d8e0ebdc8352a74e6b40e4c893d8d9419f4d Reviewed-on: https://go-review.googlesource.com/c/146977Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
When a slice composite literal is sparse, initialize it dynamically instead of statically. s := []int{5:5, 20:20} To initialize the backing store for s, use 2 constant writes instead of copying from a static array with 21 entries. This CL also fixes pathologies in the compiler when the slice is *very* sparse. Fixes #23780 Change-Id: Iae95c6e6f6a0e2994675cbc750d7a4dd6436b13b Reviewed-on: https://go-review.googlesource.com/c/151319 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Abort evconst if its argument isn't a Go constant. The SSA backend will do the optimizations in question later. They tend to be weird cases, like uintptr(unsafe.Pointer(uintptr(1))). Fix OADDSTR and OCOMPLEX cases in isGoConst. OADDSTR has its arguments in n.List, not n.Left and n.Right. OCOMPLEX might have a 2-result function as its arg in List[0] (in which case it isn't a Go constant). Fixes #24760 Change-Id: Iab312d994240d99b3f69bfb33a443607e872b01d Reviewed-on: https://go-review.googlesource.com/c/151338 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
This experiment is less effective and less needed since the introduction of stack objects. We can't clobber stack objects because we don't know statically whether they are live or not. We don't really need this experiment that much any more, as it was primarily used to test the complicated ambiguously-live logic in the liveness analysis, which has been removed in favor of stack objects. It is also ~infeasible to maintain once we have safepoints everywhere. Fixes #27326 Change-Id: I3bdde480b93dd508d048703055d4586b496176af Reviewed-on: https://go-review.googlesource.com/c/151317 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Than McIntosh authored
This patch merges in support for reading indexed type export data, from the gofrontend CL https://golang.org/cl/143022 (which includes a change in the export data version number from V2 to V3). Also fixes the key tests to insure that they run both in gccgo builds and main Go repo builds if "gccgo" is present (prior to this the tests were not running in either scenario); this required fixing up some of the expected results. Fixes #28961. Change-Id: I644d171f2a46be9160f89dada06ab3c20468bab7 Reviewed-on: https://go-review.googlesource.com/c/149957 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
In assembly free packages (aka "complete" or "pure go"), allow bodyless functions if they are linkname'd to something else. Presumably the thing the function is linkname'd to has a definition. If not, the linker will complain. And linkname is unsafe, so we expect users to know what they are doing. Note this handles only one direction, where the linkname directive is in the local package. If the linkname directive is in the remote package, this CL won't help. (See os/signal/sig.s for an example.) Fixes #23311 Change-Id: I824361b4b582ee05976d94812e5b0e8b0f7a18a6 Reviewed-on: https://go-review.googlesource.com/c/151318 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Jordan Rhee authored
The exception handler modifies the stack and continuation context so it looks like the faulting code calls sigpanic() directly. The call was not set up correctly on ARM, because it did not handle the link register correctly. This change handles the link register correctly for ARM. Updates #28854 Change-Id: I7ccf838adfc05cd968a5edd7d19ebba6a2478360 Reviewed-on: https://go-review.googlesource.com/c/150957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Clément Chigot authored
This commit adapts compile tool to create correct nilchecks for AIX. AIX allows to load a nil pointer. Therefore, the default nilcheck which issues a load must be replaced by a CMP instruction followed by a store at 0x0 if the value is nil. The store will trigger a SIGSEGV as on others OS. The nilcheck algorithm must be adapted to do not remove nilcheck if it's only a read. Stores are detected with v.Type.IsMemory(). Tests related to nilptr must be adapted to the previous changements. nilptr.go cannot be used as it's because the AIX address space starts at 1<<32. Change-Id: I9f5aaf0b7e185d736a9b119c0ed2fe4e5bd1e7af Reviewed-on: https://go-review.googlesource.com/c/144538 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Clément Chigot authored
This commit allows the runtime to handle 64bits addresses returned by mmap syscall on AIX. Mmap syscall returns addresses on 59bits on AIX. But the Arena implementation only allows addresses with less than 48 bits. This commit increases the arena size up to 1<<60 for aix/ppc64. Update: #25893 Change-Id: Iea72e8a944d10d4f00be915785e33ae82dd6329e Reviewed-on: https://go-review.googlesource.com/c/138736Reviewed-by: Austin Clements <austin@google.com>
-
Rob Pike authored
Now that maps are printed in deterministic order, the map example can have multiple keys without breaking the build. Change-Id: Iccec0cd76a3d41c75d8d4eb768ec0ac09ad9f2ad Reviewed-on: https://go-review.googlesource.com/c/151218Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The String method is n-squared and overwrites its receiver. Fix both issues, with only a slight loss of clarity. Fixes #28773 Change-Id: I588f69d4cbd72931b28b984671512834473bd466 Reviewed-on: https://go-review.googlesource.com/c/151217Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Nov, 2018 1 commit
-
-
Alex Brainman authored
TestImportTableInUnknownSection was introduced in CL 110555 to test PE executable with import table located in section other than ".idata". We used atmfd.dll for that purpose, but it seems atmfd.dll is not present on some systems. Use kernel32.dll instead. kernel32.dll import table is located in ".rdata" section, so it should do the job. And every Windows system has kernel32.dll file. Also make TestImportTableInUnknownSection run on windows-arm, since windows-arm should also have kernel32.dll file. Updates #27904 Change-Id: Ie005ee10e46ae0c06e83929d581e89f86c051eea Reviewed-on: https://go-review.googlesource.com/c/151137 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Nov, 2018 4 commits
-
-
David Chase authored
This makes it easier to track names of function arguments for debugging purposes. Change-Id: Ic34856fe0b910005e1c7bc051d769d489a4b158e Reviewed-on: https://go-review.googlesource.com/c/150098 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Yury Smolsky authored
This CL adds a button that collapses values list of a block. Button is displayed for every block with non-empty values. Change-Id: I4b65af81e25349f38341df487d42698c9d006a00 Reviewed-on: https://go-review.googlesource.com/c/144557 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Austin Clements authored
On some platforms, assembly in internal/syscall/unix references unexported runtime symbols. Catch these references so the compiler can generate the necessary ABI wrappers. Fixes #28769. Updates #27539. Change-Id: I118eebfb8b3d907b4c3562198e6afb49854f5827 Reviewed-on: https://go-review.googlesource.com/c/149817 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Clément Chigot <clement.chigot@atos.net> Reviewed-by: Keith Randall <khr@golang.org>
-
Cherry Zhang authored
When using softfloat, floating point ops are rewritten to integer ops. The types of store ops were not rewritten. This may lower to floating point stores, which are problematic. This CL fixes this by rewriting the store types as well. This fixes test/fixedbugs/issue28688.go on Wasm. Softfloat mode is not used by default on Wasm, and it is not needed as Wasm spec supports floating points. But it is nice to have the correct types. Change-Id: Ib5e19e19fa9491b15c2f60320f8724cace5cefb5 Reviewed-on: https://go-review.googlesource.com/c/149965 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 22 Nov, 2018 1 commit
-
-
David Heuschmann authored
UserHomeDir used to return an empty string if the corresponding environment variable was not set. Changed it to return an error if the variable is not set, to have the same signature and behaviour as UserCacheDir. Fixes #28562 Change-Id: I42c497e8011ecfbbadebe7de1751575273be221c Reviewed-on: https://go-review.googlesource.com/c/150418 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-