]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: optimize constant pool
authorBen Shi <powerman1st@163.com>
Mon, 9 Apr 2018 11:12:15 +0000 (11:12 +0000)
committerCherry Zhang <cherryyz@google.com>
Thu, 12 Apr 2018 19:48:44 +0000 (19:48 +0000)
commit9be1921042b6b81b7f16fa8640ddc5868af6d31e
tree20cb401e112d42ace2c089f83126249a09fb4068
parentc1ed1f3c80fb33b4f0a17eb14da19be05eda492f
cmd/internal/obj/arm64: optimize constant pool

"MOVD $0xaaaaaaaa, R2"
"MOVD $-0x55555555, R3"

For the above instructions, 64-bit constants 0x00000000 aaaaaaaa
and 0xffffffff aaaaaaab are stored in the constant pool.

This CL optimizes them to
"MOVWU $0xaaaaaaaa, R2"
"MOVW $-0x05555555, R3"
and 32-bit constants 0xaaaaaaaa and 0xaaaaaaab are stored in the
constant pool.

There is a little size reduction (about total 5KB) in both the go
executable and the library files.

Change-Id: I7c4bfa6cd9c07da99c69a8f9c15010a0cce3b735
Reviewed-on: https://go-review.googlesource.com/105775
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/internal/obj/arm64/asm7.go