]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/liveness: remove excess bits for stackmap
authorzhangjian <zj.cosmos@gmail.com>
Sun, 11 Jun 2023 11:29:55 +0000 (11:29 +0000)
committerKeith Randall <khr@golang.org>
Sun, 3 Sep 2023 15:46:21 +0000 (15:46 +0000)
ArgWidth() already includes the stack space required for
input parameters and return values, so their offset will
not exceed the value of ArgWidth(), so there is no need
to double it.

Change-Id: I10fde7afbf2a5714b5142075c2116af14debc7e8
GitHub-Last-Rev: eaf3fd5eb86ed1d968a6d5962c71ee3144424598
GitHub-Pull-Request: golang/go#60591
Reviewed-on: https://go-review.googlesource.com/c/go/+/500675
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: guangyuan zhou <zhouguangyuan@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/liveness/plive.go

index 85e988aedaa685b261c24fd495b8099936581f09..e4dbfa9fa31e783896be77371295ad5269de1fb4 100644 (file)
@@ -1520,7 +1520,7 @@ func WriteFuncMap(fn *ir.Func, abiInfo *abi.ABIParamResultInfo) {
                return
        }
        nptr := int(abiInfo.ArgWidth() / int64(types.PtrSize))
-       bv := bitvec.New(int32(nptr) * 2)
+       bv := bitvec.New(int32(nptr))
 
        for _, p := range abiInfo.InParams() {
                typebits.SetNoCheck(p.Type, p.FrameOffset(abiInfo), bv)