aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/addressingmodes.go
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2020-10-27 09:38:52 +0100
committerAlberto Donizetti <alb.donizetti@gmail.com>2020-10-27 20:03:25 +0000
commitd68c01fa1d770b0646f9819bc9ce86c14cb1e1b5 (patch)
tree54620170cf7a380132aeb4470a552762ea4df68b /src/cmd/compile/internal/ssa/addressingmodes.go
parent79a3482d9e735fc6d0373da170fd1b4ff9222bc2 (diff)
downloadgo-d68c01fa1d770b0646f9819bc9ce86c14cb1e1b5.tar.gz
go-d68c01fa1d770b0646f9819bc9ce86c14cb1e1b5.zip
cmd/compile: clean up ValAndOff funcs after untyped aux removal
Changes: - makeValAndOff is deleted in favour of MakeValAndOff{32,64} - canAdd is renamed to canAdd64 to uniform with existing canAdd32 - addOffset{32,64} is simplified by directly using MakeValAndOff{32,64} - ValAndOff.Int64 is removed Change-Id: Ic01db7fa31ddfe0aaaf1d1d77af823d48a7bee84 Reviewed-on: https://go-review.googlesource.com/c/go/+/265357 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/addressingmodes.go')
-rw-r--r--src/cmd/compile/internal/ssa/addressingmodes.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/ssa/addressingmodes.go b/src/cmd/compile/internal/ssa/addressingmodes.go
index aae0def27f..1baf143869 100644
--- a/src/cmd/compile/internal/ssa/addressingmodes.go
+++ b/src/cmd/compile/internal/ssa/addressingmodes.go
@@ -59,22 +59,22 @@ func addressingModes(f *Func) {
v.AuxInt += p.AuxInt
case [2]auxType{auxSymValAndOff, auxInt32}:
vo := ValAndOff(v.AuxInt)
- if !vo.canAdd(p.AuxInt) {
+ if !vo.canAdd64(p.AuxInt) {
continue
}
- v.AuxInt = vo.add(p.AuxInt)
+ v.AuxInt = int64(vo.addOffset64(p.AuxInt))
case [2]auxType{auxSymValAndOff, auxSymOff}:
vo := ValAndOff(v.AuxInt)
if v.Aux != nil && p.Aux != nil {
continue
}
- if !vo.canAdd(p.AuxInt) {
+ if !vo.canAdd64(p.AuxInt) {
continue
}
if p.Aux != nil {
v.Aux = p.Aux
}
- v.AuxInt = vo.add(p.AuxInt)
+ v.AuxInt = int64(vo.addOffset64(p.AuxInt))
case [2]auxType{auxSymOff, auxNone}:
// nothing to do
case [2]auxType{auxSymValAndOff, auxNone}: