aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/expressions.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-05-31 17:56:36 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-05-31 17:56:36 +0000
commit4d12cf3cc3143843225ecdb0e5048fc7c37b1574 (patch)
tree30d27f1ac980671a5b890c86e562a746f4f4b54e /gcc/go/gofrontend/expressions.cc
parent34a13a521e3fc6f46fcaf2f158d20e66874e99fd (diff)
downloadgcc-4d12cf3cc3143843225ecdb0e5048fc7c37b1574.zip
gcc-4d12cf3cc3143843225ecdb0e5048fc7c37b1574.tar.gz
gcc-4d12cf3cc3143843225ecdb0e5048fc7c37b1574.tar.bz2
runtime: implement cheaper context switch on Linux/AMD64
Currently, goroutine switches are implemented with libc getcontext/setcontext functions, which saves/restores the machine register states and also the signal context. This does more than what we need, and performs an expensive syscall. This CL implements a simplified version of getcontext/setcontext, in assembly, that only saves/restores the necessary part, i.e. the callee-save registers, and the PC, SP. A simplified version of makecontext, written in C, is also added. Currently this is only implemented on Linux/AMD64. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/178298 From-SVN: r271818
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
0 files changed, 0 insertions, 0 deletions