]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm: optimize MOVW $-off(R), R
authorCherry Zhang <cherryyz@google.com>
Thu, 29 Sep 2016 13:22:01 +0000 (09:22 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 29 Sep 2016 15:20:46 +0000 (15:20 +0000)
commitfedb0b30188952dc082672cbd45b39a49136d29c
tree3cd88d64114272bf4af8a092396f911362cb5b4c
parent26531b3846694b311aec87fc4f5de65b4cc48a44
cmd/internal/obj/arm: optimize MOVW $-off(R), R

When offset < 0 and -offset fits in instruction, generate SUB
instruction, instead of ADD with constant from the pool.

Fixes #13280.

Change-Id: I57d97fe9300fe1f6554365e2262393ef50acbdd3
Reviewed-on: https://go-review.googlesource.com/30014
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/internal/obj/arm/asm5.go