- 22 Aug, 2017 4 commits
-
-
fanzha02 authored
The current code gets shift arguments value from prog.From3.Offset. But prog.From3.Offset is not assigned the shift arguments value in instructions assemble process. The fix calls movcon() function to get the correct value. Uncomment the movk/movkw cases. Fixes #21398 Change-Id: I78d40c33c24bd4e3688a04622e4af7ddb5333fa6 Reviewed-on: https://go-review.googlesource.com/54990 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Thomas Wanielista authored
Previously, go/doc would only consider functions that return types of T or any number of pointers to T: *T, **T, etc. This change expands the definition of a constructor to also include functions that return slices of a type (or pointer to that type) in its first return. With this change, the following return types classify a function as a constructor of type T: T *T **T (and so on) []T []*T []**T (and so on) Fixes #18063. Change-Id: I9a1a689933e13c6b8eb80b74ceec85bd4cab236d Reviewed-on: https://go-review.googlesource.com/54971Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brian Kessler authored
Replace z.mul(x, x) calls on nats in internal code with z.sqr(x) that employs optimized squaring routines. Benchmark results: Exp-4 12.9ms ± 2% 12.8ms ± 3% ~ (p=0.165 n=10+10) Exp2-4 13.0ms ± 4% 12.8ms ± 2% -2.14% (p=0.015 n=8+9) ModSqrt225_Tonelli-4 987µs ± 4% 989µs ± 2% ~ (p=0.673 n=8+9) ModSqrt224_3Mod4-4 300µs ± 2% 301µs ± 3% ~ (p=0.546 n=9+9) ModSqrt5430_Tonelli-4 4.88s ± 6% 4.82s ± 5% ~ (p=0.247 n=10+10) ModSqrt5430_3Mod4-4 1.62s ±10% 1.57s ± 1% ~ (p=0.094 n=9+9) Exp3Power/0x10-4 496ns ± 7% 426ns ± 7% -14.21% (p=0.000 n=10+10) Exp3Power/0x40-4 575ns ± 5% 470ns ± 7% -18.20% (p=0.000 n=9+10) Exp3Power/0x100-4 929ns ±19% 770ns ±10% -17.13% (p=0.000 n=10+10) Exp3Power/0x400-4 1.96µs ± 7% 1.79µs ± 5% -8.68% (p=0.000 n=10+10) Exp3Power/0x1000-4 10.9µs ± 9% 7.9µs ± 5% -28.02% (p=0.000 n=10+10) Exp3Power/0x4000-4 86.8µs ± 8% 67.3µs ± 8% -22.41% (p=0.000 n=10+10) Exp3Power/0x10000-4 750µs ± 8% 731µs ± 1% ~ (p=0.074 n=9+8) Exp3Power/0x40000-4 7.07ms ± 7% 7.05ms ± 4% ~ (p=0.931 n=9+9) Exp3Power/0x100000-4 64.7ms ± 2% 65.6ms ± 6% ~ (p=0.661 n=9+10) Exp3Power/0x400000-4 577ms ± 2% 580ms ± 3% ~ (p=0.931 n=9+9) ProbablyPrime/n=0-4 9.08ms ±17% 9.09ms ±16% ~ (p=0.447 n=9+10) ProbablyPrime/n=1-4 10.8ms ± 4% 10.7ms ± 2% ~ (p=0.243 n=10+9) ProbablyPrime/n=5-4 18.5ms ± 3% 18.5ms ± 1% ~ (p=0.863 n=9+9) ProbablyPrime/n=10-4 28.6ms ± 6% 28.2ms ± 1% ~ (p=0.050 n=9+9) ProbablyPrime/n=20-4 48.4ms ± 4% 48.4ms ± 2% ~ (p=0.739 n=10+10) ProbablyPrime/Lucas-4 6.75ms ± 4% 6.75ms ± 2% ~ (p=0.963 n=9+8) ProbablyPrime/MillerRabinBase2-4 2.00ms ± 5% 2.00ms ± 7% ~ (p=0.931 n=9+9) Change-Id: Ibe9f58d11dbad25eb369faedf480b666a0250a6b Reviewed-on: https://go-review.googlesource.com/56773Reviewed-by: Robert Griesemer <gri@golang.org>
-
Martin Möhrmann authored
name old time/op new time/op delta NewEmptyMap 53.2ns ± 7% 48.0ns ± 5% -9.77% (p=0.000 n=20+20) NewSmallMap 111ns ± 1% 106ns ± 2% -3.78% (p=0.000 n=20+19) Change-Id: I979d21ab16eae9f6893873becca517db57e054b5 Reviewed-on: https://go-review.googlesource.com/56290 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 21 Aug, 2017 15 commits
-
-
Elias Naur authored
If set, GOIOS_DEVICE_ID specifies the device id for the iOS exec wrapper. With that, a single builder can host multiple iOS devices. Change-Id: If3cc049552f5edbd7344befda7b8d7f73b4236e2 Reviewed-on: https://go-review.googlesource.com/57296 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: JBD <jbd@google.com> Reviewed-by: Chris Broadfoot <cbro@golang.org>
-
Kevin Burke authored
Change-Id: I159bd1313e617c929008f6ac54ec7d702293360b Reviewed-on: https://go-review.googlesource.com/57430Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ben Shi authored
BFX extracts given bits from the source register, sign extends them to 32-bit, and writes to destination register. BFXU does the similar operation with zero extention. They were introduced in ARMv6T2. Change-Id: I6822ebf663497a87a662d3645eddd7c611de2b1e Reviewed-on: https://go-review.googlesource.com/56071 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
philhofer authored
On arm64, all boolean-generating instructions (CSET, etc.) set the upper 63 bits of the destination register to zero, so there is no need to zero-extend the lower 8 bits again. Fixes #21445 Change-Id: I3b176baab706eb684105400bacbaa24175f721f3 Reviewed-on: https://go-review.googlesource.com/55671 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Ian Lance Taylor authored
The go tool assumed that -buildmode=pie implied internal linking on linux-amd64. However, that was changed by CL 36417 for issue #18968. Fixes #21452 Change-Id: I8ed13aea52959cc5c53223f4c41ba35329445545 Reviewed-on: https://go-review.googlesource.com/57231 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Rob Pike <r@golang.org>
-
Ryuji IWATA authored
Change-Id: I71bfff6a3462e6dfd7a65ef76ec56644bae37c34 Reviewed-on: https://go-review.googlesource.com/57272Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ryuji IWATA authored
Change-Id: I79fee40370dc6758ca1869227f076c61d07f21a5 Reviewed-on: https://go-review.googlesource.com/57390Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: I4377c478159129ab3f3b5ddc58d1944f8f4a4b07 Reviewed-on: https://go-review.googlesource.com/56320Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: Iecff99e85e2cca1127dca79747bb0d5362cd4125 Reviewed-on: https://go-review.googlesource.com/56319Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: Ia4abb76a8fa9e9ab280cd9162238ebd3fba79e4d Reviewed-on: https://go-review.googlesource.com/56318Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: I6a1d33a759deaa4788bafb1c288d9b0e2fe3b026 Reviewed-on: https://go-review.googlesource.com/56317Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: I068e9bb6e692b5eff193ddb46af3f04785f98518 Reviewed-on: https://go-review.googlesource.com/56316Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: Idaab6516dae609e1707d4bce7bf7809ebfc8ec40 Reviewed-on: https://go-review.googlesource.com/56315Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: I093b79a8dd298bce8e8774c51a86a4873718978a Reviewed-on: https://go-review.googlesource.com/56314Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Change-Id: I8b23bfb85da9ece47e337f262bafd97f303dd1d1 Reviewed-on: https://go-review.googlesource.com/56313Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 20 Aug, 2017 1 commit
-
-
Josh Bleecher Snyder authored
If there are no pointers, then clearing memory doesn't help GC, and the memory is otherwise dead, so don't bother clearing it. Change-Id: I953f4a3264939f2825e82292030eda2e835cbb97 Reviewed-on: https://go-review.googlesource.com/57350 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
- 19 Aug, 2017 7 commits
-
-
Elias Naur authored
This reverts commit a6ffab6b. Reason for revert: with CL 57290 the tests run on Android again. Change-Id: Ifeb29762a4cd0178463acfeeb3696884d99d2993 Reviewed-on: https://go-review.googlesource.com/57310Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Elias Naur authored
The testcshared test.bash was rewritten in Go, but the rewritten script broke on Android. Make the tests run on Android again by: - Restoring the LD_LIBRARY_PATH path (.). - Restoring the Android specific C flags (-pie -fuse-ld=gold). - Adding runExe to run test executables. All other commands must run on the host. Fixes #21513. Change-Id: I3ea617a943c686b15437cc5c118e9802a913d93a Reviewed-on: https://go-review.googlesource.com/57290 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Alex Brainman authored
For #21513 Change-Id: Ibe9479f8afc6f425779a737a807ff2f839a4f311 Reviewed-on: https://go-review.googlesource.com/57250 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Josh Bleecher Snyder authored
Ask whether the issue reproduces with the latest release. 'go bug' places the version and system details last, in part because they're automatically filled. I'd like to do the same here, but I worry that they'll get ignored. Change-Id: Iec636a27e6e36d61dca421deaf24ed6fe35d4b11 Reviewed-on: https://go-review.googlesource.com/50931Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Avelino <t@avelino.xxx>
-
Russ Cox authored
Fixes #21522. Change-Id: Ifec1681b265576c47a4d736f6f124cc25485c593 Reviewed-on: https://go-review.googlesource.com/57011 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alex Brainman authored
Hopefully this will fix android build. Maybe fixes #21513 Change-Id: I98f760562646f06b56e385c36927e79458465b92 Reviewed-on: https://go-review.googlesource.com/56790Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joe Tsai authored
This CL is the first step (of two) for adding sparse file support to the Writer. This CL only refactors the logic of sparse-file handling in the Reader so that common logic can be easily shared by the Writer. As a result of this CL, there are some new publicly visible API changes: type SparseEntry struct { Offset, Length int64 } type Header struct { ...; SparseHoles []SparseEntry } A new type is defined to represent a sparse fragment and a new field Header.SparseHoles is added to represent the sparse holes in a file. The API intentionally represent sparse files using hole fragments, rather than data fragments so that the zero value of SparseHoles naturally represents a normal file (i.e., a file without any holes). The Reader now populates SparseHoles for sparse files. It is necessary to export the sparse hole information, otherwise it would be impossible for the Writer to specify that it is trying to encode a sparse file, and what it looks like. Some unexported helper functions were added to common.go: func validateSparseEntries(sp []SparseEntry, size int64) bool func alignSparseEntries(src []SparseEntry, size int64) []SparseEntry func invertSparseEntries(src []SparseEntry, size int64) []SparseEntry The validation logic that used to be in newSparseFileReader is now moved to validateSparseEntries so that the Writer can use it in the future. alignSparseEntries is currently unused by the Reader, but will be used by the Writer in the future. Since TAR represents sparse files by only recording the data fragments, we add the invertSparseEntries function to convert a list of data fragments to a normalized list of hole fragments (and vice-versa). Some other high-level changes: * skipUnread is deleted, where most of it's logic is moved to the Discard methods on regFileReader and sparseFileReader. * readGNUSparsePAXHeaders was rewritten to be simpler. * regFileReader and sparseFileReader were completely rewritten in simpler and easier to understand logic. * A bug was fixed in sparseFileReader.Read where it failed to report an error if the logical size of the file ends before consuming all of the underlying data. * The tests for sparse-file support was completely rewritten. Updates #13548 Change-Id: Ic1233ae5daf3b3f4278fe1115d34a90c4aeaf0c2 Reviewed-on: https://go-review.googlesource.com/56771 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 18 Aug, 2017 13 commits
-
-
Vlad Krasnov authored
By processing 8 blocks in parallel GHASH achieves higher throughput on amd64 Results on Skylake i7: benchmark old ns/op new ns/op delta BenchmarkAESGCMSeal1K-8 316 314 -0.63% BenchmarkAESGCMOpen1K-8 282 281 -0.35% BenchmarkAESGCMSign8K-8 5611 1099 -80.41% BenchmarkAESGCMSeal8K-8 1869 1922 +2.84% BenchmarkAESGCMOpen8K-8 1718 1724 +0.35% benchmark old MB/s new MB/s speedup BenchmarkAESGCMSeal1K-8 3237.10 3260.94 1.01x BenchmarkAESGCMOpen1K-8 3629.74 3638.10 1.00x BenchmarkAESGCMSign8K-8 1459.82 7452.99 5.11x BenchmarkAESGCMSeal8K-8 4382.45 4260.93 0.97x BenchmarkAESGCMOpen8K-8 4766.41 4750.54 1.00x Change-Id: I479f2a791a968caa1c516115b0b6b96a791a20d2 Reviewed-on: https://go-review.googlesource.com/57150Reviewed-by: Adam Langley <agl@golang.org>
-
Austin Clements authored
Because profile labels are copied from the goroutine into the tag buffer by the signal handler, there's a carefully-crafted set of race detector annotations to create the necessary happens-before edges between setting a goroutine's profile label and retrieving it from the profile tag buffer. Given the constraints of the signal handler, we have to approximate the true synchronization behavior. Currently, that approximation is too weak. Ideally, runtime_setProfLabel would perform a store-release on &getg().labels and copying each label into the profile would perform a load-acquire on &getg().labels. This would create the necessary happens-before edges through each individual g.labels object. Since we can't do this in the signal handler, we instead synchronize on a "labelSync" global. The problem occurs with the following sequence: 1. Goroutine 1 calls setProfLabel, which does a store-release on labelSync. 2. Goroutine 2 calls setProfLabel, which does a store-release on labelSync. 3. Goroutine 3 reads the profile, which does a load-acquire on labelSync. The problem is that the load-acquire only synchronizes with the *most recent* store-release to labelSync, and the two store-releases don't synchronize with each other. So, once goroutine 3 touches the label set by goroutine 1, we report a race. The solution is to use racereleasemerge. This is like a read-modify-write, rather than just a store-release. Each RMW of labelSync in runtime_setProfLabel synchronizes with the previous RMW of labelSync, and this ultimately carries forward to the load-acquire, so it synchronizes with *all* setProfLabel operations, not just the most recent. Change-Id: Iab58329b156122002fff12cfe64fbeacb31c9613 Reviewed-on: https://go-review.googlesource.com/56670 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Ilya Tocar authored
We can add a constant to loaction in memory with 1 instruction, as opposed to load+add+store, so add a new op and relevent ssa rules. Triggers in e. g. encoding/json isValidNumber: NumberIsValid-6 36.4ns ± 0% 35.2ns ± 1% -3.32% (p=0.000 n=6+10) Shaves ~2.5 kb from go tool. Change-Id: I7ba576676c2522432360f77b290cecb9574a93c3 Reviewed-on: https://go-review.googlesource.com/54431 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Daniel Martí authored
All of these are uints of different sizes, so checking >= 0 or < 0 are effectively no-ops. Found with staticcheck. Change-Id: I16ac900eb7007bc8f9018b302136d42e483a4180 Reviewed-on: https://go-review.googlesource.com/56950Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This will reduce duplication when evacuate is specialized. Change-Id: I34cdfb7103442d3e0ea908c970fb46334b86d5c4 Reviewed-on: https://go-review.googlesource.com/56934 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Minor refactoring. This is a step towards specializing evacuate for mapfast key types. Change-Id: Icffe2759b7d38e5c008d03941918d5a912ce62f6 Reviewed-on: https://go-review.googlesource.com/56933 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Since oldbucket == h.nevacuate, we can just increment h.nevacuate here. This removes oldbucket from scope, which will be useful shortly. Change-Id: I70f81ec3995f17845ebf5d77ccd20ea4338f23e6 Reviewed-on: https://go-review.googlesource.com/56932 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
The number of times that alg has to be spilled and restored makes it better to just reload it. Change-Id: I2674752a889ecad59dab54da1d68fad03db1ca85 Reviewed-on: https://go-review.googlesource.com/56931 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
The new code is not quite equivalent to the old, in that if newbit was very large it might have altered the new tophash. The old behavior is unnecessary and probably undesirable. Change-Id: I7fb3222520cb61081a857adcddfbb9078ead7122 Reviewed-on: https://go-review.googlesource.com/56930 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Marvin Stenger authored
Clean-up changes in no particular order: - use uint8 instead of int for readOp - remove duplicated code in ReadFrom() - introduce (*Buffer).empty() - remove naked returns Change-Id: Ie6e673c20c398f980f8be0448969a36ad4778804 Reviewed-on: https://go-review.googlesource.com/42816Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
Normally 64-bit div/mod is turned into runtime calls on 32-bit arch, but the front end leaves power-of-two constant division and hopes the SSA backend turns into a shift or AND. The SSA rule is (Mod64u <t> n (Const64 [c])) && isPowerOfTwo(c) -> (And64 n (Const64 <t> [c-1])) But isPowerOfTwo returns true only for positive int64, which leaves out 1<<63 unhandled. Add a special case for 1<<63. Fixes #21517. Change-Id: I02d27dc7177d4af0ee8d7f5533714edecddf8c95 Reviewed-on: https://go-review.googlesource.com/56890Reviewed-by: Keith Randall <khr@golang.org>
-
Kevin Burke authored
I'm writing a matching implementation of the time package and missed the "add one day in a leap year" block. This test would have caught my error. I understand we can't add test cases for every Date but it seems like "tripped up someone attempting to reimplement this" is a good indicator it may trip up people in the future. Change-Id: I4c3b51e52e269215ec0e52199afe604482326edb Reviewed-on: https://go-review.googlesource.com/56490Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #21486. Change-Id: I01794f008404f0e2d8a1408309ae6055513c5b49 Reviewed-on: https://go-review.googlesource.com/57030 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-