- 06 Oct, 2017 4 commits
-
-
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 27 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>
-
Matthew Dempsky authored
Change-Id: Ied42c2778899ce12cc256f0a124b77bf0e141aee Reviewed-on: https://go-review.googlesource.com/68471 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Telling the truth about these will be important for content-based staleness checks. Change-Id: Iaed6ca6c945eb805d815156753a3e5dc48c6f0b9 Reviewed-on: https://go-review.googlesource.com/68336 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
Init functions are problematic because we want cmd/link to be able to insert an import of runtime/cgo for external linking. For all the other systems that just means putting runtime/cgo into the binary. The linker is not set up to generate calls to init functions, and luckily this one can be avoided entirely. This means people don't have to import _ "runtime/cgo" in their iOS programs anymore. The linker's default import is now enough. This CL also adjusts cmd/go to record the linker's default import, now that the explicit import is gone. Change-Id: I81d23476663e03664f90d531c24db2e4f2e6c66b Reviewed-on: https://go-review.googlesource.com/68490 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Historically, gc optimistically parsed the left-hand side of assignments as expressions. Later, if it discovered a ":=" assignment, it rewrote the parsed expressions as declarations. This failed in the presence of dot imports though, because we lost information about whether an imported object was named via a bare identifier "Foo" or a normal qualified "pkg.Foo". This CL fixes the issue by specially noding the left-hand side of ":=" assignments. Fixes #22076. Change-Id: I18190ecdb863112e7d009e1687e6112eec559921 Reviewed-on: https://go-review.googlesource.com/66810 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
This applies the amd64-specific changes from CL 42611 to the s390x P256 implementation. The s390x implementation was disabled in CL 62292 and this CL re-enables it. Adam Langley's commit message from CL 42611: The optimised P-256 includes a CombinedMult function, which doesn't do dual-scalar multiplication, but does avoid an affine conversion for ECDSA verification. However, it currently uses an assembly point addition function that doesn't handle exceptional cases. Fixes #20215. Change-Id: I2f6b532f495e85b8903475b4f64cc32a3b2f6769 Reviewed-on: https://go-review.googlesource.com/64290 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
We're going to start building cmd/cgo as part of the bootstrap, and with it debug/elf, so the copy here needs to work with Go 1.4. It does except for the use of the new io.SeekStart etc constants, so remove that use. Change-Id: Ib7fcf46e1e9060f96d2bacaaf349c9b0df347550 Reviewed-on: https://go-review.googlesource.com/68337 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
This shortens the args lists but also sets up better for the content-based staleness changes. While we're here, delete the now-unused Pkgpath method. Change-Id: Ic60fa03efbc37a7c7fe9758a1cfa5dddef1a4151 Reviewed-on: https://go-review.googlesource.com/68335Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Ben Shi authored
The following instructions were introduced in ARMv6, and the compiler can do more optimization with them. 1. "MOVBS Rm@>i, Rd": rotates Rm 0/8/16/24 bits, does signed byte extension to word, and writes the result to Rd. 2. "MOVHS Rm@>i, Rd": rotates Rm 0/8/16/24 bits, does signed halfword extension to word, and writes the result to Rd. 3. "MOVBU Rm@>i, Rd": rotates Rm 0/8/16/24 bits, does unsigned byte extension to word, and writes the result to Rd. 4. "MOVHU Rm@>i, Rd": rotates Rm 0/8/16/24 bits, does unsigned half-word extension to word, and writes the result to Rd. 5. "XTAB Rm@>i, Rn, Rd": rotates Rm 0/8/16/24 bits, does signed byte extension to word, adds Rn, and writes the result to Rd. 6. "XTAH Rm@>i, Rn, Rd": rotates Rm 0/8/16/24 bits, does signed half-word extension to word, adds Rn, and writes the result to Rd. 7. "XTABU Rm@>i, Rn, Rd": rotates Rm 0/8/16/24 bits, does unsigned byte extension to word, adds Rn, and writes the result to Rd. 8. "XTAHU Rm@>i, Rn, Rd": rotates Rm 0/8/16/24 bits, does unsigned half-word extension to word, adds Rn, and writes the result to Rd. Change-Id: I4306d7ebac93015d7e2e40d307f2c4271c03f466 Reviewed-on: https://go-review.googlesource.com/65790Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
For #22095 Change-Id: I2cb0d3e0aaf9f97952cf8dda0e99a4379e275020 Reviewed-on: https://go-review.googlesource.com/68332 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
For #22095 Change-Id: I07c288208d94dabae164c2ca0a067402a8e5c2e6 Reviewed-on: https://go-review.googlesource.com/68331 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Moves type symbol name mangling out of the object reader and into a separate pass. Requires some care, as changing the name of a type may require dealing with duplicate symbols for the first time. Disables DWARF for both plugins and programs that use plugin.Open, because type manging is currently incompatible with the go.info.* symbol generator in cmd/link. (It relies on the symbol names to find type information.) A future fix for this would be moving the go.info.* generation into the compiler, with the logic we use for generating the type.* symbols. Fixes #19529 Change-Id: I75615f8bdda86ff9e767e536d9aa36e15c194098 Reviewed-on: https://go-review.googlesource.com/67312 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
There is no cache here yet. This CL defines ActionID, Hash, and HashFile, which the new content-based staleness code can use. Eventually we'll put a real cache implementation here, but it's not necessary yet. Change-Id: Ide433cb449f4dbe658694453f348c947642df79b Reviewed-on: https://go-review.googlesource.com/67311Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Alex Brainman authored
CL 41834 used approach suggested by Raymond Chen in https://blogs.msdn.microsoft.com/oldnewthing/20100212-00/?p=14963/ to implement os.Stat by getting Windows I/O manager follow symbolic links. Do the same for filepath.EvalSymlinks, when existing strategy fails. Updates #19922 Fixes #20506 Change-Id: I15f3d3a80256bae86ac4fb321fd8877e84d8834f Reviewed-on: https://go-review.googlesource.com/55612Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
(*sigctxt).fault() currently returns either uintptr, uint32, or uint64 depending on the platform. Make them all return uintptr. For #10958 (but a nice change on its own). Change-Id: I7813e779d0edcba112dd47fda776f4ce6e50e227 Reviewed-on: https://go-review.googlesource.com/68015 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Austin Clements authored
Currently the linker figures out where runtime-gdb.py should be by looking for the path to runtime/debug.go. However, debug.go contains only a few symbols and can easily get dead-code eliminated entirely, especially from simple binaries. When this happens, the resulting binary lacks a reference to runtime-gdb.py, so the GDB helpers don't get loaded. Fix this by instead sniffing for runtime/proc.go. This contains runtime.main and the scheduler, so it's not going anywhere. Change-Id: Ie3380c77c840d28614fada68b8c5861625f2aff5 Reviewed-on: https://go-review.googlesource.com/68019 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 04 Oct, 2017 9 commits
-
-
Matthew Dempsky authored
All of the callers want a *obj.LSym instead of a *types.Sym, and the runtime type descriptors don't need Go source symbols anyway. Passes toolstash-check. Change-Id: I8ae4b64380fbb547857f49b42465118f41884eed Reviewed-on: https://go-review.googlesource.com/68251 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Chris Broadfoot authored
Change-Id: Ib042e472e62f48a6afaba1762beaf102a9b99cf5 Reviewed-on: https://go-review.googlesource.com/68290Reviewed-by: Russ Cox <rsc@golang.org>
-
Sokolov Yura authored
Before CL 62530 fastrand always returned non-zero value, and one condition in sema.go depends on this behavior. fastrand is used to generate random weight for treap of sudog, and it is checked against zero to verify sudog were inserted into treap or wait queue. Since its precision is not very important for correctness, lets just always set its lowest bit in this place. Updates #22047 Updates #21806 Change-Id: Iba0b56d81054e6ef9c49ffd293fc5d92a6a31e9b Reviewed-on: https://go-review.googlesource.com/68050Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Chris Broadfoot authored
Change-Id: Ib42fabc6829b6033373c0378713733f88e73e73d Reviewed-on: https://go-review.googlesource.com/68230Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
PlainAuth originally refused to send passwords to non-TLS servers and was documented as such. In 2013, issue #5184 was filed objecting to the TLS requirement, despite the fact that it is spelled out clearly in RFC 4954. The only possibly legitimate use case raised was using PLAIN auth for connections to localhost, and the suggested fix was to let the server decide: if it advertises that PLAIN auth is OK, believe it. That approach was adopted in CL 8279043 and released in Go 1.1. Unfortunately, this is exactly wrong. The whole point of the TLS requirement is to make sure not to send the password to the wrong server or to a man-in-the-middle. Instead of implementing this rule, CL 8279043 blindly trusts the server, so that if a man-in-the-middle says "it's OK, you can send me your password," PlainAuth does. And the documentation was not updated to reflect any of this. This CL restores the original TLS check, as required by RFC 4954 and as promised in the documentation for PlainAuth. It then carves out a documented exception for connections made to localhost (defined as "localhost", "127.0.0.1", or "::1"). Change-Id: I1d3729bbd33aa2f11a03f4c000e6bb473164957b Reviewed-on: https://go-review.googlesource.com/68170 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Matthew Dempsky authored
These are redundant with checking x.Sym.Pkg == localpkg. Passes toolstash-check -all. Change-Id: Iebe25f7932cd15a036141b468ad75c239abcdcf7 Reviewed-on: https://go-review.googlesource.com/66670 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
Avoids generating useless equality and hash functions. Shrinks cmd/go executable size on linux/amd64 by ~17kB. Change-Id: Ifde5315cc5cbceb3a7260195c8803cace952359f Reviewed-on: https://go-review.googlesource.com/66650 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Russ Cox authored
This can only lead to confusion. Change-Id: Iae84c6404ab5eeb6950faa2364f97a017c67c506 Reviewed-on: https://go-review.googlesource.com/68110 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Simon Rawet <Simon@rawet.se>
-
Marvin Stenger authored
This removes some of the []byte/string conversions currently existing in the (un)marshaling methods of Int and Rat. For Int we introduce a new function (*Int).setFromScanner() essentially implementing the SetString method being given an io.ByteScanner instead of a string. So we can handle the string case in (*Int).SetString with a *strings.Reader and the []byte case in (*Int).UnmarshalText() with a *bytes.Reader now avoiding the []byte/string conversion here. For Rat we introduce a new function (*Rat).marshal() essentially implementing the String method outputting []byte instead of string. Using this new function and the same formatting rules as in (*Rat).RatString we can implement (*Rat).MarshalText() without the []byte/string conversion it used to have. Change-Id: Ic5ef246c1582c428a40f214b95a16671ef0a06d9 Reviewed-on: https://go-review.googlesource.com/65950Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-