go/misc/cgo/testshared/src
Michael Munday 55ac5b50b0 cmd/compile: fix large global variables in -linkshared mode on s390x
When rewriting loads and stores accessing global variables to use the
GOT we were making use of REGTMP (R10). Unfortunately loads and stores
with large offsets (larger than 20-bits) were also using REGTMP,
causing it to be clobbered and subsequently a segmentation fault.

This can be fixed by using REGTMP2 (R11) for the rewrite. This is fine
because REGTMP2 only has a couple of uses in the assembler (division,
high multiplication and storage-to-storage instructions). We didn't
use REGTMP2 originally because it used to be used more frequently,
in particular for stores of constants to memory. However we have now
eliminated those uses.

This was found while writing a test case for CL 63030. That test case
is included in this CL.

Change-Id: I13956f1f3ca258a7c8a7ff0a7570d2848adf7f68
Reviewed-on: https://go-review.googlesource.com/65011
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-20 20:20:46 +00:00
..
dep2 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
dep3 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
depBase runtime: reorder modules so main.main comes first 2017-01-25 22:33:57 +00:00
division runtime: use hardware divider to improve performance 2017-04-11 12:25:55 +00:00
exe runtime: reorder modules so main.main comes first 2017-01-25 22:33:57 +00:00
exe2 cmd/compile: do not generate tail calls when dynamic linking on ppc64le 2016-06-02 02:34:01 +00:00
exe3 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
execgo
explicit
global cmd/compile: fix large global variables in -linkshared mode on s390x 2017-09-20 20:20:46 +00:00
globallib cmd/compile: fix large global variables in -linkshared mode on s390x 2017-09-20 20:20:46 +00:00
iface misc/cgo/testshared: test that types and itabs are unique 2017-01-12 00:20:55 +00:00
iface_a misc/cgo/testshared: test that types and itabs are unique 2017-01-12 00:20:55 +00:00
iface_b misc/cgo/testshared: test that types and itabs are unique 2017-01-12 00:20:55 +00:00
iface_i misc/cgo/testshared: test that types and itabs are unique 2017-01-12 00:20:55 +00:00
implicit
implicitcmd
trivial