From: Josh Bleecher Snyder Date: Wed, 8 Mar 2017 20:48:04 +0000 (-0800) Subject: cmd/compile: fix SSA type for first runtime call arg/result X-Git-Tag: go1.9beta1~1213 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=678f35b676de075375066ade2935296dfb8050ec;p=gostls13.git cmd/compile: fix SSA type for first runtime call arg/result CLs 37254 and 37869 contained similar fixes. Change-Id: I0cbf01c691b54d82acef398489df6e9c89ebb83f Reviewed-on: https://go-review.googlesource.com/38000 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Michael Munday --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 6c442b4095..c9a5ec42bd 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -3364,10 +3364,7 @@ func (s *state) rtcall(fn *obj.LSym, returns bool, results []*Type, args ...*ssa for _, arg := range args { t := arg.Type off = Rnd(off, t.Alignment()) - ptr := s.sp - if off != 0 { - ptr = s.newValue1I(ssa.OpOffPtr, t.PtrTo(), off, s.sp) - } + ptr := s.newValue1I(ssa.OpOffPtr, t.PtrTo(), off, s.sp) size := t.Size() s.vars[&memVar] = s.newValue3I(ssa.OpStore, ssa.TypeMem, size, ptr, arg, s.mem()) off += size @@ -3398,10 +3395,7 @@ func (s *state) rtcall(fn *obj.LSym, returns bool, results []*Type, args ...*ssa res := make([]*ssa.Value, len(results)) for i, t := range results { off = Rnd(off, t.Alignment()) - ptr := s.sp - if off != 0 { - ptr = s.newValue1I(ssa.OpOffPtr, ptrto(t), off, s.sp) - } + ptr := s.newValue1I(ssa.OpOffPtr, ptrto(t), off, s.sp) res[i] = s.newValue2(ssa.OpLoad, t, ptr, s.mem()) off += t.Size() }