Source file test/codegen/issue61356.go

     1  // asmcheck
     2  
     3  // Copyright 2023 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Make sure this code doesn't generate spill/restore.
     8  
     9  package codegen
    10  
    11  func pack20(in *[20]uint64) uint64 {
    12  	var out uint64
    13  	out |= 4
    14  	// amd64:-`.*SP.*`
    15  	out |= in[0] << 4
    16  	// amd64:-`.*SP.*`
    17  	out |= in[1] << 7
    18  	// amd64:-`.*SP.*`
    19  	out |= in[2] << 10
    20  	// amd64:-`.*SP.*`
    21  	out |= in[3] << 13
    22  	// amd64:-`.*SP.*`
    23  	out |= in[4] << 16
    24  	// amd64:-`.*SP.*`
    25  	out |= in[5] << 19
    26  	// amd64:-`.*SP.*`
    27  	out |= in[6] << 22
    28  	// amd64:-`.*SP.*`
    29  	out |= in[7] << 25
    30  	// amd64:-`.*SP.*`
    31  	out |= in[8] << 28
    32  	// amd64:-`.*SP.*`
    33  	out |= in[9] << 31
    34  	// amd64:-`.*SP.*`
    35  	out |= in[10] << 34
    36  	// amd64:-`.*SP.*`
    37  	out |= in[11] << 37
    38  	// amd64:-`.*SP.*`
    39  	out |= in[12] << 40
    40  	// amd64:-`.*SP.*`
    41  	out |= in[13] << 43
    42  	// amd64:-`.*SP.*`
    43  	out |= in[14] << 46
    44  	// amd64:-`.*SP.*`
    45  	out |= in[15] << 49
    46  	// amd64:-`.*SP.*`
    47  	out |= in[16] << 52
    48  	// amd64:-`.*SP.*`
    49  	out |= in[17] << 55
    50  	// amd64:-`.*SP.*`
    51  	out |= in[18] << 58
    52  	// amd64:-`.*SP.*`
    53  	out |= in[19] << 61
    54  	return out
    55  }
    56  

View as plain text