1
0
mirror of https://github.com/golang/go synced 2024-11-23 13:40:04 -07:00

cmd/compile/internal/liveness: remove excess bits for stackmap

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.
This commit is contained in:
zhangjian 2023-06-04 19:09:40 +08:00 committed by And-ZJ
parent 1fd3cc7cd0
commit eaf3fd5eb8

View File

@ -1485,7 +1485,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)