]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use ANDconst to mask out leading/trailing bits on ARM64
authorCherry Zhang <cherryyz@google.com>
Thu, 6 Apr 2017 13:36:23 +0000 (09:36 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 6 Apr 2017 17:59:32 +0000 (17:59 +0000)
commit257b01f8f47ace2ddd75efe37d8a0353888bce14
treea80252d7a164e33f7ed6e6436805fa3e1bdf7dbd
parent168eb9cf3395583541224af0227c19ddb13e35be
cmd/compile: use ANDconst to mask out leading/trailing bits on ARM64

For an AND that masks out leading or trailing bits, generic rules
rewrite it to a pair of shifts. On ARM64, the mask actually can
fit into an AND instruction. So we rewrite it back to AND.

Fixes #19857.

Change-Id: I479d7320ae4f29bb3f0056d5979bde4478063a8f
Reviewed-on: https://go-review.googlesource.com/39651
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/asm_test.go
src/cmd/compile/internal/ssa/gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go