- 09 Oct, 2017 5 commits
-
-
Gabriel Aszalos authored
The //go:nosplit directive was visible in GoDoc because the function that it preceeded (Gosched) is exported. This change moves the directive above the documentation, hiding it from the output. Change-Id: I281fd7573f11d977487809f74c9cc16b2af0dc88 Reviewed-on: https://go-review.googlesource.com/69120 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josselin Costanzi authored
Optimize base64 decoding speed by adding 32-bits and 64-bits specialized methods that don't perform any error checking and fall back to the more complex decodeQuantum method when a non-base64 character is present. On a 64-bits cpu: name old time/op new time/op delta DecodeString/2-4 70.0ns ± 6% 69.2ns ± 0% ~ (p=0.169 n=5+8) DecodeString/4-4 91.3ns ± 2% 80.4ns ± 0% -11.89% (p=0.001 n=5+10) DecodeString/8-4 126ns ± 5% 106ns ± 0% -16.14% (p=0.000 n=5+7) DecodeString/64-4 652ns ±21% 361ns ± 0% -44.57% (p=0.000 n=5+7) DecodeString/8192-4 61.0µs ±13% 31.5µs ± 1% -48.38% (p=0.001 n=5+9) name old speed new speed delta DecodeString/2-4 57.2MB/s ± 6% 57.7MB/s ± 2% ~ (p=0.419 n=5+9) DecodeString/4-4 87.7MB/s ± 2% 99.5MB/s ± 0% +13.45% (p=0.001 n=5+10) DecodeString/8-4 94.8MB/s ± 5% 112.6MB/s ± 1% +18.82% (p=0.001 n=5+9) DecodeString/64-4 136MB/s ±19% 243MB/s ± 0% +78.17% (p=0.003 n=5+7) DecodeString/8192-4 180MB/s ±11% 347MB/s ± 1% +92.94% (p=0.001 n=5+9) Improves #19636 Change-Id: Ic10a454851093a7e1d46ca0c140deed73535d990 Reviewed-on: https://go-review.googlesource.com/38632 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Daniel Martí authored
The existing logic for whether the left and right parts of an assignment were equal only checked that the gofmt representation of the two was equal. This only checks that the ASTs were equal. However, that method is flawed. For example, if either of the expressions contains a function call, the expressions may actually be different even if their ASTs are the same. An obvious case is a func call to math/rand to get a random integer, such as the one added in the test. If either of the expressions may have side effects, simply skip the check. Reuse the logic from bool.go's hasSideEffects. Fixes #22174. Change-Id: Ied7f7543dc2bb8852e817230756c6d23bc801d90 Reviewed-on: https://go-review.googlesource.com/69116 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Elias Naur authored
Updates #19320. Change-Id: Id38df033e3f0873986e668c8ff3855b6e08407a9 Reviewed-on: https://go-review.googlesource.com/69114 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Fixes #22176 Change-Id: If47ec9a25da6b480868d8eeccc518dc97d48bda7 Reviewed-on: https://go-review.googlesource.com/69230Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 08 Oct, 2017 3 commits
-
-
Alex Brainman authored
Updates #11058 Change-Id: I2a8bf4403b680ab8bf06fff18291f3bf67261e27 Reviewed-on: https://go-review.googlesource.com/69090Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Restores linker behavior that existed before CL 68930. Hopefully fixes the macOS 10.8 builder. Change-Id: Ib8d6923b59543008cf71c4625addb4e2045cedf6 Reviewed-on: https://go-review.googlesource.com/69170 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
-
Laurent Voisin authored
Change-Id: I6aee75a6ae1470dfc658d72a5b6508fb93503057 Reviewed-on: https://go-review.googlesource.com/69115Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
-
- 07 Oct, 2017 4 commits
-
-
David Chase authored
This attempts to choose better values for values that are rematerialized (uses the XPos of the consumer, not the original) and for unconditional branches (uses the last assigned XPos in the block). The JMP branches seem to sometimes end up with a PC in the destination block, I think because of register movement or rematerialization that gets placed in predecessor blocks. This may be acceptable because (eyeball-empirically) that is often the line number of the target block, so the line number flow is correct. Added proper test, that checks both -N -l and regular compilation. The test is also capable (for gdb, delve soon) of tracking variable printing based on comments in the source code. There's substantial room for improvement in debugger behavior. Updates #21098. Change-Id: I13abd48a39141583b85576a015f561065819afd0 Reviewed-on: https://go-review.googlesource.com/50610 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Marvin Stenger authored
Move some local declarations closer to their use, reducing their respective lifetimes, also improve few error messages. Follow up of CL 67370. Updates #22095 Change-Id: I6131159ae8de571015ef5459b33d5c186e543a37 Reviewed-on: https://go-review.googlesource.com/69110Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
Also add some b.ReportAllocs calls to other image codec benchmarks. Change-Id: I0f055dc76bffb66329c621a5f1ccd239f0cdd30b Reviewed-on: https://go-review.googlesource.com/68390Reviewed-by: Jed Denlea <jed@fastly.com> Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Alex Brainman authored
Otherwise we end up with testp?.exe files after the tests run. Updates #11058 Change-Id: Ieccfc42da6192622bdab1f9a411ccd50bb59fd5b Reviewed-on: https://go-review.googlesource.com/68770 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 06 Oct, 2017 16 commits
-
-
David Crawshaw authored
For #22095 Change-Id: I660080279692b74669c45f42c28cccff71bd33b5 Reviewed-on: https://go-review.googlesource.com/68930Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Also add -V=full to print a unique identifier of the specific tool being invoked. This will be used for content-based staleness. Also sort and clean up a few of the flag doc comments. Change-Id: I786fe50be0b8e5f77af809d8d2dab721185c2abd Reviewed-on: https://go-review.googlesource.com/68590 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Peter Wu authored
The BadCBCPadding255 test from bogo failed because at most 255 trailing bytes were checked, but for a padding of 255 there are 255 padding bytes plus 1 length byte with value 255. Change-Id: I7dd237c013d2c7c8599067246e31b7ba93106cf7 Reviewed-on: https://go-review.googlesource.com/68070Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
griesemer authored
Increase MaxBase from 36 to 62 and extend the conversion alphabet with the upper-case letters 'A' to 'Z'. For int conversions with bases <= 36, the letters 'A' to 'Z' have the same values (10 to 35) as the corresponding lower-case letters. For conversion bases > 36 up to 62, the upper-case letters have the values 36 to 61. Added MaxBase to api/except.txt: Clients should not make assumptions about the value of MaxBase being constant. The core of the change is in natconv.go. The remaining changes are adjusted tests and documentation. Fixes #21558. Change-Id: I5f74da633caafca03993e13f32ac9546c572cc84 Reviewed-on: https://go-review.googlesource.com/65970Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
David Chase authored
From a compact specification of control flow graphs, generate complete set of possible assignment patterns to output y, and also generate an interpretable specification. Compiles (hoping for crash, or not) and then runs, where the run checks function output against interpreted output for various inputs observed to terminate in the interpreter. In ssa_test.go, added ability to generate a test and run (compile and run) the generated test, possibly with modified environment variables. The generated test is compiled including the -D=ssa/check/on flag, and if the interpreter terminates in a small number of steps, then it is also run to check the result. Change-Id: I392c828e36c543411b7733ca0799628452733276 Reviewed-on: https://go-review.googlesource.com/22751 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
griesemer authored
Change-Id: Icbe6885ffd3aa4e77441ab03a2b9a04a9276d5eb Reviewed-on: https://go-review.googlesource.com/68311Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
griesemer authored
Keep left-to-right order when referring to the number of variables and values involved. Fixes #22159. Change-Id: Iccca12d3222f9d5e049939a9ccec07513c393faa Reviewed-on: https://go-review.googlesource.com/68690Reviewed-by: Russ Cox <rsc@golang.org>
-
isharipo authored
Fix ytab table for EXTRACTPS. Related to https://go-review.googlesource.com/#/c/go/+/63490/. Change-Id: I11672d6bb731a204a08905f8321450f02c5bed76 Reviewed-on: https://go-review.googlesource.com/68950 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
isharipo authored
"VEX.vvvv" field (VSR, VEX-specified-register) made explicit in Optab encoding. vexNDS, vexNDD, vexDDS and vexNOVSR do nothing, this change does not produce any noticeable effect. Rationale behind this change: - keep more information inside optab entries - make encodings match SDM more closely - one less special rule to keep in mind Pvex optabs are updated based on the Intel SDM descriptions. Unused VEX combinations are removed; it is problematic to choose VSR combinations for them without actual Optabs that use them. The origin of this idea can be found in: https://go-review.googlesource.com/#/c/arch/+/66972/ Change-Id: I54634a72b44d61f4b924a1e45f2240aab7384dc2 Reviewed-on: https://go-review.googlesource.com/67890 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
isharipo authored
Adds last missing SSE4 instruction. Also introduces additional ytab set 'yextractps'. See https://golang.org/cl/57470 that adds other SSE4 instructions but skips this one due to 'yextractps'. To make EXTRACTPS less "sloppy", Yu2 oclass added to forbid usage of invalid offset values in immediate operand. Part of the mission to add missing amd64 SSE4 instructions to Go asm. Change-Id: I0e67e3497054f53257dd8eb4c6268da5118b4853 Reviewed-on: https://go-review.googlesource.com/57490 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Aliaksandr Valialkin authored
This CL optimizes assembly for len() or cap() division by a power of 2 constants: func lenDiv(s []int) int { return len(s) / 16 } amd64 assembly before the CL: MOVQ "".s+16(SP), AX MOVQ AX, CX SARQ $63, AX SHRQ $60, AX ADDQ CX, AX SARQ $4, AX MOVQ AX, "".~r1+32(SP) RET amd64 assembly after the CL: MOVQ "".s+16(SP), AX SHRQ $4, AX MOVQ AX, "".~r1+32(SP) RET The CL relies on the fact that len() and cap() result cannot be negative. Trigger stats for the added SSA rules on linux/amd64 when running make.bash: 46 Div64 12 Mod64 The added SSA rules may trigger on more cases in the future when SSA values will be populated with the info on their lower bounds. For instance: func f(i int16) int16 { if i < 3 { return -1 } // Lower bound of i is 3 here -> i is non-negative, // so unsigned arithmetics may be used here. return i % 16 } Change-Id: I8bc6be5a03e71157ced533c01416451ff6f1a7f0 Reviewed-on: https://go-review.googlesource.com/65530Reviewed-by: Keith Randall <khr@golang.org>
-
David Crawshaw authored
Replace Buildmode with BuildMode and Linkmode with LinkMode. For #22095 Change-Id: I51a6f5719d107727bca29ec8e68e3e9d87e31e33 Reviewed-on: https://go-review.googlesource.com/68334 Run-TryBot: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
For #22095 Change-Id: Ie9ae84c758af99ac7daed26d0b3e3b0a47599edd Reviewed-on: https://go-review.googlesource.com/67315 Run-TryBot: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alberto Donizetti authored
amd64 and 386 have rules to reduce multiplication by a positive power of two, but a more general reduction (both for positive and negative powers of two) is already performed by generic rules that were added in CL 36323 to replace walkmul (see lines 166:173 in generic.rules). The x86 and amd64 rules are never triggered during all.bash and can be removed, reducing rules duplication. The change also adds a few code generation tests for amd64 and 386. Change-Id: I566d48186643bd722a4c0137fe94e513b8b20e36 Reviewed-on: https://go-review.googlesource.com/68450 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Afanasev Stanislav authored
This is only to aid in human debugging, and for that reason we maintain a panic, and not return an error. Fixes #22097 Change-Id: If72e4d1e47ec9125ca7bc97d5fe4cedb7f76ae72 Reviewed-on: https://go-review.googlesource.com/67970Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jeff authored
Change-Id: I34008f56c191df0edcaafc20d569bbc6184f89fc Reviewed-on: https://go-review.googlesource.com/68470 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 05 Oct, 2017 12 commits
-
-
Marvin Stenger authored
This reverts https://golang.org/cl/66372. Updates #22148 Change-Id: I3e94af3dfc11a2883bf28e1d5e1f32f98760b3ee Reviewed-on: https://go-review.googlesource.com/68431Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Marvin Stenger authored
This reverts https://golang.org/cl/65930. Fixes #22148 Change-Id: Ie0712621ed89c43bef94417fc32de9af77607760 Reviewed-on: https://go-review.googlesource.com/68430Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
TestUnexportedSymbols requires dup2 that my gcc installation does not have. TestSignalHandlersWithNotify fails with: undefined: syscall.SIGIO. TestSignalHandlers fails with: sched.h: No such file or directory. TestExportedSymbolsWithDynamicLoad fails with: dlfcn.h: No such file or directory. Also add t.Helper calls to better error messages. Updates #11058 Change-Id: I7eb514968464256b8337e45f57fcb7d7fe0e4693 Reviewed-on: https://go-review.googlesource.com/68410 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
ORETJMP doesn't need an ONAME if we just set the target method on Sym instead of Left. Conveniently, this is where fmt.go was looking for it anyway. Change the iface parameter and global compiling_wrappers to bool. Passes toolstash-check. Change-Id: I5333f8bcb4e06bf8161808041125eb95c439aafe Reviewed-on: https://go-review.googlesource.com/68252 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Cherry Zhang authored
C_PPAUTO was matching offsets that is a multiple 8. But this condition is dropped in CL 55610, causing unaligned offset between 256 and 504 mistakenly matched to some classes, e.g. C_UAUTO8K. This CL restores this condition, also fixes an error that C_PPAUTO shouldn't match C_PSAUTO, because the latter is not guaranteed to be multiple of 8. C_PPAUTO_8 is unnecessary, removed. Fixes #21992. Change-Id: I75d5a0e5f5dc3dae335721fbec1bbcd4a3b862f2 Reviewed-on: https://go-review.googlesource.com/65730Reviewed-by: David Chase <drchase@google.com>
-
Ilya Tocar authored
Combine setcc and store of result into setcc that writes directly to memory. Triggers 200+ times in go tool. Fixes #21630 Change-Id: Iafa22607426f4120140c88fae4b9aecb46e0bba8 Reviewed-on: https://go-review.googlesource.com/67950 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Austin Clements authored
exit1 calls the bsdthread_terminate system call on Darwin. Currently it passes no arguments on 386, arm, and arm64, and an exit status on amd64. None of these are right. The signature of bsdthread_terminate is: int bsdthread_terminate(user_addr_t stackaddr, size_t freesize, uint32_t port, uint32_t sem); Fix all of the Darwin exit1 implementations to call bsdthread_terminate with 0 for all of these arguments so it doesn't try to unmap some random memory, free some random port, or signal a random semaphore. This isn't a problem in practice because exit1 is never called. However, we're about to start using exit1. Change-Id: Idc534d196e3104e5253fc399553f21eb608693d7 Reviewed-on: https://go-review.googlesource.com/46036 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
This was for cmd/cgo, and cmd/cgo isn't special anymore. Change-Id: I71efaf553b24798b523c7102859428d36b470698 Reviewed-on: https://go-review.googlesource.com/68530 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Keith Randall authored
The core dump reader wants to know the layout of this type. No variable has this type, so it wasn't previously dumped to DWARF output. Change-Id: I982040b81bff202976743edc7fe53247533a9d81 Reviewed-on: https://go-review.googlesource.com/68312Reviewed-by: Austin Clements <austin@google.com>
-
Austin Clements authored
Currently, there is a single bit for LockOSThread, so two calls to LockOSThread followed by one call to UnlockOSThread will unlock the thread. There's evidence (#20458) that this is almost never what people want or expect and it makes these APIs very hard to use correctly or reliably. Change this so LockOSThread/UnlockOSThread can be nested and the calling goroutine will not be unwired until UnlockOSThread has been called as many times as LockOSThread has. This should fix the vast majority of incorrect uses while having no effect on the vast majority of correct uses. Fixes #20458. Change-Id: I1464e5e9a0ea4208fbb83638ee9847f929a2bacb Reviewed-on: https://go-review.googlesource.com/45752 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Russ Cox authored
The primary build tools cmd/asm, cmd/compile, and cmd/link are built during cmd/dist bootstrap and then assumed by cmd/go to be available for any future builds. The only tool invoked by cmd/go during a build and not in this list is cmd/cgo; instead of being built during cmd/dist and assumed by cmd/go, cmd/go arranges to build cmd/cgo if needed as part of the regular build. We got here because at the time cmd/go was written, cmd/cgo was the only build tool written in Go (the others were in C), and so it made some sense to put cmd/dist in charge of building the C tools and to have custom code in cmd/go to build cmd/cgo just in time for it to be used by a particular build. This custom code has historically been quite subtle, though, because the build of cmd/cgo inherits whatever build flags apply to the build that wants to use cmd/cgo. If you're not careful, "go install -race strings" might under the wrong circumstances also install a race-enabled cmd/cgo binary, which is unexpected at the least. The custom code is only going to get more problematic as we move toward more precise analysis of whether dependencies are up-to-date. In that case, "go build -race strings" will check to see if there is not just a cmd/cgo already but a race-enabled cmd/cgo, which makes no sense. Instead of perpetuating the special case, treat cgo like all the other build tools: build it first in cmd/dist, and then assume it is present. This simplifies cmd/go. Building cmd/cgo during bootstrap also allows the default build of cmd/cgo to be built using cgo, which may be necessary on future essentially-cgo-only systems. Change-Id: I414e22c10c9920f4e98f97fa35ff22058c0f143d Reviewed-on: https://go-review.googlesource.com/68338 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
David Chase authored
The loop finder doesn't return good information if it encounters an irreducible loop. Make a start on improving this, and set a function-level flag to indicate when there is such a loop (and the returned information might be flaky). Use that flag to prevent the loop rotater from getting confused; the existing code seems to depend on artifacts of the previous loop-finding algorithm. (There is one irreducible loop in the go library, in "inflate.go"). Change-Id: If6e26feab38d9b009d2252d556e1470c803bde40 Reviewed-on: https://go-review.googlesource.com/42150 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-