aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/x86
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-08-28 17:10:32 +0000
committerKeith Randall <khr@golang.org>2020-08-31 17:36:08 +0000
commit9e70564f639252aade60369b51a121f3325e9d6c (patch)
tree61ada3ce0f0d3bed08f9f1014bd271ea980df516 /src/cmd/compile/internal/x86
parentba0fab3cb731fe9a383bd61c3480cccfe32bb1f4 (diff)
downloadgo-9e70564f639252aade60369b51a121f3325e9d6c.tar.gz
go-9e70564f639252aade60369b51a121f3325e9d6c.zip
cmd/compile,cmd/asm: simplify recording of branch targets, take 2
We currently use two fields to store the targets of branches. Some phases use p.To.Val, some use p.Pcond. Rewrite so that every branch instruction uses p.To.Val. p.From.Val is also used in rare instances. Introduce a Pool link for use by arm/arm64, instead of repurposing Pcond. This is a cleanup CL in preparation for some stack frame CLs. Change-Id: If8239177e4b1ea2bccd0608eb39553d23210d405 Reviewed-on: https://go-review.googlesource.com/c/go/+/251437 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/x86')
-rw-r--r--src/cmd/compile/internal/x86/ssa.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/x86/ssa.go b/src/cmd/compile/internal/x86/ssa.go
index 2de978c28a..c21ac32297 100644
--- a/src/cmd/compile/internal/x86/ssa.go
+++ b/src/cmd/compile/internal/x86/ssa.go
@@ -261,8 +261,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
n.To.Reg = x86.REG_DX
}
- j.To.Val = n
- j2.To.Val = s.Pc()
+ j.To.SetTarget(n)
+ j2.To.SetTarget(s.Pc())
}
case ssa.Op386HMULL, ssa.Op386HMULLU: