aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/arm64
diff options
context:
space:
mode:
authorfanzha02 <fannie.zhang@arm.com>2020-08-27 17:34:59 +0800
committerKeith Randall <khr@golang.org>2020-09-03 14:45:27 +0000
commitae658cb19a265f3f4694cd4aec508b4565bda6aa (patch)
tree8c6fdaa2dd0938cb4d0e89e83013031c85f572f9 /src/cmd/compile/internal/arm64
parenta538b59fd2428ba4d13f296d7483febf2fc05f97 (diff)
downloadgo-ae658cb19a265f3f4694cd4aec508b4565bda6aa.tar.gz
go-ae658cb19a265f3f4694cd4aec508b4565bda6aa.zip
cmd/compile: store the comparison pseudo-ops of arm64 conditional instructions in AuxInt
The current implementation stores the comparison pseudo-ops of arm64 conditional instructions (CSEL/CSEL0) in Aux, this patch modifies it and stores it in AuxInt, which can avoid the allocation. Change-Id: I0b69e51f63acd84c6878c6a59ccf6417501a8cfc Reviewed-on: https://go-review.googlesource.com/c/go/+/252517 Run-TryBot: fannie zhang <Fannie.Zhang@arm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/arm64')
-rw-r--r--src/cmd/compile/internal/arm64/ssa.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/arm64/ssa.go b/src/cmd/compile/internal/arm64/ssa.go
index b6bb81a847..1d6ea6b9d8 100644
--- a/src/cmd/compile/internal/arm64/ssa.go
+++ b/src/cmd/compile/internal/arm64/ssa.go
@@ -816,7 +816,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
}
p := s.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_REG // assembler encodes conditional bits in Reg
- p.From.Reg = condBits[v.Aux.(ssa.Op)]
+ p.From.Reg = condBits[ssa.Op(v.AuxInt)]
p.Reg = v.Args[0].Reg()
p.SetFrom3(obj.Addr{Type: obj.TYPE_REG, Reg: r1})
p.To.Type = obj.TYPE_REG