aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-07-15 21:17:16 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-07-15 21:17:16 +0000
commit4e62f891cdeabc14cf6195a69dc6528aab11e753 (patch)
tree3a7e81af0a3e72432c75f043950798b0387de393 /gcc
parent2d94f7dea9c73ef3c116a0ddc722724578a860fe (diff)
downloadgcc-4e62f891cdeabc14cf6195a69dc6528aab11e753.zip
gcc-4e62f891cdeabc14cf6195a69dc6528aab11e753.tar.gz
gcc-4e62f891cdeabc14cf6195a69dc6528aab11e753.tar.bz2
runtime: expose the g variable
Currently, getg is implemented in C, which loads the thread-local g variable. The g variable is declared static in C. This CL exposes the g variable, so it can be accessed from the Go side. This allows the Go compiler to inline getg calls to direct access of g. Currently, the actual inlining is only implemented in the gollvm compiler. The g variable is thread-local and the compiler backend may choose to cache the TLS address in a register or on stack. If a thread switch happens the cache may become invalid. I don't know how to disable the TLS address cache in gccgo, therefore the inlining of getg is not implemented. In the future gccgo may gain this if we know how to do it safely. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186238 From-SVN: r273499
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 28fc223..4e19c52 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-70ceba5e95716653b9f829a457a44a829175d4da
+0e51b7e9c03c6f6bc3d06343f2050f17349ccdc3
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.