mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
4e62f891cd
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 |
||
---|---|---|
.. | ||
aeshash.c | ||
arch.h | ||
array.h | ||
defs.h | ||
env_posix.c | ||
getncpu-aix.c | ||
getncpu-bsd.c | ||
getncpu-hurd.c | ||
getncpu-irix.c | ||
getncpu-linux.c | ||
getncpu-none.c | ||
getncpu-solaris.c | ||
go-assert.c | ||
go-assert.h | ||
go-caller.c | ||
go-callers.c | ||
go-cdiv.c | ||
go-cgo.c | ||
go-construct-map.c | ||
go-context.S | ||
go-ffi.c | ||
go-fieldtrack.c | ||
go-libmain.c | ||
go-main.c | ||
go-matherr.c | ||
go-memclr.c | ||
go-memequal.c | ||
go-nanotime.c | ||
go-nosys.c | ||
go-now.c | ||
go-reflect-call.c | ||
go-runtime-error.c | ||
go-setenv.c | ||
go-signal.c | ||
go-string.h | ||
go-type.h | ||
go-unsafe-pointer.c | ||
go-unsetenv.c | ||
go-unwind.c | ||
go-varargs.c | ||
panic.c | ||
print.c | ||
proc.c | ||
rtems-task-variable-add.c | ||
runtime_c.c | ||
runtime.h | ||
stack.c | ||
yield.c |