]> Cypherpunks repositories - gostls13.git/commit
runtime: save registers in linux/{386,amd64} lib entry point
authorIan Lance Taylor <iant@golang.org>
Mon, 20 Apr 2015 17:32:39 +0000 (10:32 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 20 Apr 2015 18:09:41 +0000 (18:09 +0000)
commit357a013060686aa90432dba93faa01196452eabe
tree6d23e73e5d6abed37dcf4ed0bd8b15a028363ea1
parent725aa3451a73498ed43cf2279f1609a4dffbe04a
runtime: save registers in linux/{386,amd64} lib entry point

The callee-saved registers must be saved because for the c-shared case
this code is invoked from C code in the system library, and that code
expects the registers to be saved.  The tests were passing because in
the normal case the code calls a cgo function that naturally saves
callee-saved registers anyhow.  However, it fails when the code takes
the non-cgo path.

Change-Id: I9c1f5e884f5a72db9614478049b1863641c8b2b9
Reviewed-on: https://go-review.googlesource.com/9114
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/runtime/rt0_linux_386.s
src/runtime/rt0_linux_amd64.s