mirror of
https://github.com/golang/go
synced 2024-11-18 10:04:43 -07:00
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 <josharian@gmail.com> Reviewed-by: Michael Munday <munday@ca.ibm.com>
This commit is contained in:
parent
c63ad970f6
commit
678f35b676
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user