commit | 68c664141cc3c0cecfe9171627d49e942c929a93 | [log] [tgz] |
---|---|---|
author | Cherry Zhang <cherryyz@google.com> | Tue Apr 09 12:10:27 2019 -0400 |
committer | Cherry Zhang <cherryyz@google.com> | Tue Apr 09 18:57:21 2019 +0000 |
tree | a3ba33d7b85153d53b5576657598c177a1fa4bd7 | |
parent | 016625c26591d375a4bfcf83532ff8407860612a [diff] |
cmd/internal/obj/x86: allow non-zero offset in TLS reference An instruction that references TLS, e.g. MOVQ 0(TLS), AX on some platforms (e.g. Android), or in shared mode, may be translated to (assuming TLS offset already loaded to CX) MOVQ 0(CX)(TLS*1), AX which in turns translates to movq %fs:(%rcx), %rax We have rejected non-zero offset for TLS reference, like 16(TLS). Actually, the instruction can take offset, i.e. it is a valid instruction for, e.g., movq %fs:16(%rcx),%rcx So, allow offset in TLS reference. Change-Id: Iaf1996bad7fe874e0c298ea441af5acb136a4028 Reviewed-on: https://go-review.googlesource.com/c/go/+/171151 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.