]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/gc: fix return value offset for SSA backend on ARM
authorCherry Zhang <cherryyz@google.com>
Mon, 18 Apr 2016 14:30:20 +0000 (10:30 -0400)
committerKeith Randall <khr@golang.org>
Thu, 21 Apr 2016 16:53:53 +0000 (16:53 +0000)
Progress on SSA backend for ARM. Still not complete. It compiles a
Fibonacci function, but the caller picked the return value from an
incorrect offset. This CL adjusts it to match the stack frame layout
for architectures with link register.

Updates #15365.

Change-Id: I01e03c3e95f5503a185e8ac2b6d9caf4faf3d014
Reviewed-on: https://go-review.googlesource.com/22186
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/ssa.go

index 11e362c1161d5800075de6632ee784de24715eb8..4a33a3808ecd720608e494e81e3476258efa56d9 100644 (file)
@@ -2668,7 +2668,7 @@ func (s *state) call(n *Node, k callKind) *ssa.Value {
                return nil
        }
        fp := res.Field(0)
-       return s.entryNewValue1I(ssa.OpOffPtr, Ptrto(fp.Type), fp.Offset, s.sp)
+       return s.entryNewValue1I(ssa.OpOffPtr, Ptrto(fp.Type), fp.Offset+Ctxt.FixedFrameSize(), s.sp)
 }
 
 // etypesign returns the signed-ness of e, for integer/pointer etypes.