]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/s390x: use 12 bit load and store instruction when possible on s390x
authorRuixin Bao <ruixin.bao@ibm.com>
Tue, 27 Aug 2019 19:22:28 +0000 (15:22 -0400)
committerMichael Munday <mike.munday@ibm.com>
Thu, 12 Sep 2019 15:49:54 +0000 (15:49 +0000)
commit90e0b40ab24e9dbd2404e597c76635f4b4e1ba2f
treea13ad741ea9adfe71da8a5aabff4a5e3f79ddd1b
parentc20eb96e6b990b455c73204a15489656106b1342
cmd/internal/obj/s390x: use 12 bit load and store instruction when possible on s390x

Originally, we default to use load and store instruction with 20 bit displacement.
However, that is not necessary. Some instructions have a displacement smaller
than 12 bit. This CL allows the usage of 12 bit load and store instruction when
that happens.

This change also reduces the size of .text section in go binary by 19 KB.

Some tests are also added to verify the functionality of the change.

Change-Id: I13edea06ca653d4b9ffeaefe8d010bc2f065c2ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/194857
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/asm/internal/asm/testdata/s390x.s
src/cmd/internal/obj/s390x/asmz.go