mirror of
https://github.com/golang/go
synced 2024-11-12 04:40:22 -07:00
cmd/compile/internal/abi: fix some typos in comments
Fix a few types in the header comment for 'ComputePadding'. Change-Id: If38911e6dcbec571845ae44eef30fd6c33f589cb Reviewed-on: https://go-review.googlesource.com/c/go/+/360814 Trust: Than McIntosh <thanm@google.com> Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
c702f91b38
commit
80a7968842
@ -780,11 +780,11 @@ func (state *assignState) assignParamOrReturn(pt *types.Type, n types.Object, is
|
||||
}
|
||||
|
||||
// ComputePadding returns a list of "post element" padding values in
|
||||
// the case where we have a structure being passed in registers. Give
|
||||
// a param assignment corresponding to a struct, it returns a list of
|
||||
// contaning padding values for each field, e.g. the Kth element in
|
||||
// the case where we have a structure being passed in registers. Given
|
||||
// a param assignment corresponding to a struct, it returns a list
|
||||
// containing padding values for each field, e.g. the Kth element in
|
||||
// the list is the amount of padding between field K and the following
|
||||
// field. For things that are not struct (or structs without padding)
|
||||
// field. For things that are not structs (or structs without padding)
|
||||
// it returns a list of zeros. Example:
|
||||
//
|
||||
// type small struct {
|
||||
@ -796,8 +796,8 @@ func (state *assignState) assignParamOrReturn(pt *types.Type, n types.Object, is
|
||||
//
|
||||
// For this struct we would return a list [0, 1, 0, 0], meaning that
|
||||
// we have one byte of padding after the second field, and no bytes of
|
||||
// padding after any of the other fields. Input parameter "storage"
|
||||
// is with enough capacity to accommodate padding elements for
|
||||
// padding after any of the other fields. Input parameter "storage" is
|
||||
// a slice with enough capacity to accommodate padding elements for
|
||||
// the architected register set in question.
|
||||
func (pa *ABIParamAssignment) ComputePadding(storage []uint64) []uint64 {
|
||||
nr := len(pa.Registers)
|
||||
|
Loading…
Reference in New Issue
Block a user