]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: use MOVWaddr for address on ARM
authorCherry Zhang <cherryyz@google.com>
Tue, 7 Jun 2016 02:36:45 +0000 (22:36 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 13 Jun 2016 12:55:51 +0000 (12:55 +0000)
commitc40dcff2f23c75e15785687eee7d56b524c54634
tree0ff4fe4799394e7ec09c4787220154bc777e144e
parente3a6d00876488c70b6ecc641954ed5cecb918cac
[dev.ssa] cmd/compile: use MOVWaddr for address on ARM

Introduce an op MOVWaddr for addresses on ARM, instead of overuse
ADDconst.

Mark MOVWaddr as rematerializable. This fixes a liveness problem: if
it were not rematerializable, the address of a variable may be spilled
and later use of the address may just load the spilled value without
mentioning the variable, and the liveness code may think it is dead
prematurely.

Update #15365.

Change-Id: Ib0b0fa826bdb75c9e6bb362b95c6cf132cc6b1c0
Reviewed-on: https://go-review.googlesource.com/23942
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/arm/ssa.go
src/cmd/compile/internal/ssa/gen/ARM.rules
src/cmd/compile/internal/ssa/gen/ARMOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteARM.go