Source file test/codegen/memcombine.go

     1  // asmcheck
     2  
     3  // Copyright 2018 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  package codegen
     8  
     9  import (
    10  	"encoding/binary"
    11  	"runtime"
    12  )
    13  
    14  // ------------- //
    15  //    Loading    //
    16  // ------------- //
    17  
    18  func load_le64(b []byte) uint64 {
    19  	// amd64:`MOVQ\s\(.*\),`,-`MOV[BWL]\t[^$]`,-`OR`
    20  	// s390x:`MOVDBR\s\(.*\),`
    21  	// arm64:`MOVD\s\(R[0-9]+\),`,-`MOV[BHW]`
    22  	// ppc64le:`MOVD\s`,-`MOV[BHW]Z`
    23  	return binary.LittleEndian.Uint64(b)
    24  }
    25  
    26  func load_le64_idx(b []byte, idx int) uint64 {
    27  	// amd64:`MOVQ\s\(.*\)\(.*\*1\),`,-`MOV[BWL]\t[^$]`,-`OR`
    28  	// s390x:`MOVDBR\s\(.*\)\(.*\*1\),`
    29  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[BHW]`
    30  	// ppc64le:`MOVD\s`,-`MOV[BHW]Z\s`
    31  	return binary.LittleEndian.Uint64(b[idx:])
    32  }
    33  
    34  func load_le32(b []byte) uint32 {
    35  	// amd64:`MOVL\s\(.*\),`,-`MOV[BW]`,-`OR`
    36  	// 386:`MOVL\s\(.*\),`,-`MOV[BW]`,-`OR`
    37  	// s390x:`MOVWBR\s\(.*\),`
    38  	// arm64:`MOVWU\s\(R[0-9]+\),`,-`MOV[BH]`
    39  	// ppc64le:`MOVWZ\s`,-`MOV[BH]Z\s`
    40  	return binary.LittleEndian.Uint32(b)
    41  }
    42  
    43  func load_le32_idx(b []byte, idx int) uint32 {
    44  	// amd64:`MOVL\s\(.*\)\(.*\*1\),`,-`MOV[BW]`,-`OR`
    45  	// 386:`MOVL\s\(.*\)\(.*\*1\),`,-`MOV[BW]`,-`OR`
    46  	// s390x:`MOVWBR\s\(.*\)\(.*\*1\),`
    47  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[BH]`
    48  	// ppc64le:`MOVWZ\s`,-`MOV[BH]Z\s`
    49  	return binary.LittleEndian.Uint32(b[idx:])
    50  }
    51  
    52  func load_le16(b []byte) uint16 {
    53  	// amd64:`MOVWLZX\s\(.*\),`,-`MOVB`,-`OR`
    54  	// ppc64le:`MOVHZ\s`,-`MOVBZ`
    55  	// arm64:`MOVHU\s\(R[0-9]+\),`,-`MOVB`
    56  	// s390x:`MOVHBR\s\(.*\),`
    57  	return binary.LittleEndian.Uint16(b)
    58  }
    59  
    60  func load_le16_idx(b []byte, idx int) uint16 {
    61  	// amd64:`MOVWLZX\s\(.*\),`,-`MOVB`,-`OR`
    62  	// ppc64le:`MOVHZ\s`,-`MOVBZ`
    63  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOVB`
    64  	// s390x:`MOVHBR\s\(.*\)\(.*\*1\),`
    65  	return binary.LittleEndian.Uint16(b[idx:])
    66  }
    67  
    68  func load_be64(b []byte) uint64 {
    69  	// amd64/v1,amd64/v2:`BSWAPQ`,-`MOV[BWL]\t[^$]`,-`OR`
    70  	// amd64/v3:`MOVBEQ`
    71  	// s390x:`MOVD\s\(.*\),`
    72  	// arm64:`REV`,`MOVD\s\(R[0-9]+\),`,-`MOV[BHW]`,-`REVW`,-`REV16W`
    73  	// ppc64le:`MOVDBR`,-`MOV[BHW]Z`
    74  	return binary.BigEndian.Uint64(b)
    75  }
    76  
    77  func load_be64_idx(b []byte, idx int) uint64 {
    78  	// amd64/v1,amd64/v2:`BSWAPQ`,-`MOV[BWL]\t[^$]`,-`OR`
    79  	// amd64/v3: `MOVBEQ\t\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\), [A-Z]+[0-9]*`
    80  	// s390x:`MOVD\s\(.*\)\(.*\*1\),`
    81  	// arm64:`REV`,`MOVD\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[WHB]`,-`REVW`,-`REV16W`
    82  	// ppc64le:`MOVDBR`,-`MOV[BHW]Z`
    83  	return binary.BigEndian.Uint64(b[idx:])
    84  }
    85  
    86  func load_be32(b []byte) uint32 {
    87  	// amd64/v1,amd64/v2:`BSWAPL`,-`MOV[BW]`,-`OR`
    88  	// amd64/v3: `MOVBEL`
    89  	// s390x:`MOVWZ\s\(.*\),`
    90  	// arm64:`REVW`,`MOVWU\s\(R[0-9]+\),`,-`MOV[BH]`,-`REV16W`
    91  	// ppc64le:`MOVWBR`,-`MOV[BH]Z`
    92  	return binary.BigEndian.Uint32(b)
    93  }
    94  
    95  func load_be32_idx(b []byte, idx int) uint32 {
    96  	// amd64/v1,amd64/v2:`BSWAPL`,-`MOV[BW]`,-`OR`
    97  	// amd64/v3: `MOVBEL\t\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\), [A-Z]+[0-9]*`
    98  	// s390x:`MOVWZ\s\(.*\)\(.*\*1\),`
    99  	// arm64:`REVW`,`MOVWU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[HB]`,-`REV16W`
   100  	// ppc64le:`MOVWBR`,-`MOV[BH]Z`
   101  	return binary.BigEndian.Uint32(b[idx:])
   102  }
   103  
   104  func load_be16(b []byte) uint16 {
   105  	// amd64:`ROLW\s\$8`,-`MOVB`,-`OR`
   106  	// arm64:`REV16W`,`MOVHU\s\(R[0-9]+\),`,-`MOVB`
   107  	// ppc64le:`MOVHBR`
   108  	// s390x:`MOVHZ\s\(.*\),`,-`OR`,-`ORW`,-`SLD`,-`SLW`
   109  	return binary.BigEndian.Uint16(b)
   110  }
   111  
   112  func load_be16_idx(b []byte, idx int) uint16 {
   113  	// amd64:`ROLW\s\$8`,-`MOVB`,-`OR`
   114  	// arm64:`REV16W`,`MOVHU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOVB`
   115  	// ppc64le:`MOVHBR`
   116  	// s390x:`MOVHZ\s\(.*\)\(.*\*1\),`,-`OR`,-`ORW`,-`SLD`,-`SLW`
   117  	return binary.BigEndian.Uint16(b[idx:])
   118  }
   119  
   120  func load_le_byte2_uint16(s []byte) uint16 {
   121  	// arm64:`MOVHU\t\(R[0-9]+\)`,-`ORR`,-`MOVB`
   122  	// 386:`MOVWLZX\s\([A-Z]+\)`,-`MOVB`,-`OR`
   123  	// amd64:`MOVWLZX\s\([A-Z]+\)`,-`MOVB`,-`OR`
   124  	// ppc64le:`MOVHZ\t\(R[0-9]+\)`,-`MOVBZ`
   125  	return uint16(s[0]) | uint16(s[1])<<8
   126  }
   127  
   128  func load_le_byte2_uint16_inv(s []byte) uint16 {
   129  	// arm64:`MOVHU\t\(R[0-9]+\)`,-`ORR`,-`MOVB`
   130  	// 386:`MOVWLZX\s\([A-Z]+\)`,-`MOVB`,-`OR`
   131  	// amd64:`MOVWLZX\s\([A-Z]+\)`,-`MOVB`,-`OR`
   132  	// ppc64le:`MOVHZ\t\(R[0-9]+\)`,-`MOVDZ`
   133  	return uint16(s[1])<<8 | uint16(s[0])
   134  }
   135  
   136  func load_le_byte4_uint32(s []byte) uint32 {
   137  	// arm64:`MOVWU\t\(R[0-9]+\)`,-`ORR`,-`MOV[BH]`
   138  	// 386:`MOVL\s\([A-Z]+\)`,-`MOV[BW]`,-`OR`
   139  	// amd64:`MOVL\s\([A-Z]+\)`,-`MOV[BW]`,-`OR`
   140  	// ppc64le:`MOVWZ\t\(R[0-9]+\)`,-`MOV[BH]Z`
   141  	return uint32(s[0]) | uint32(s[1])<<8 | uint32(s[2])<<16 | uint32(s[3])<<24
   142  }
   143  
   144  func load_le_byte4_uint32_inv(s []byte) uint32 {
   145  	// arm64:`MOVWU\t\(R[0-9]+\)`,-`ORR`,-`MOV[BH]`
   146  	return uint32(s[3])<<24 | uint32(s[2])<<16 | uint32(s[1])<<8 | uint32(s[0])
   147  }
   148  
   149  func load_le_byte8_uint64(s []byte) uint64 {
   150  	// arm64:`MOVD\t\(R[0-9]+\)`,-`ORR`,-`MOV[BHW]`
   151  	// amd64:`MOVQ\s\([A-Z]+\),\s[A-Z]+`,-`MOV[BWL]\t[^$]`,-`OR`
   152  	// ppc64le:`MOVD\t\(R[0-9]+\)`,-`MOV[BHW]Z`
   153  	return uint64(s[0]) | uint64(s[1])<<8 | uint64(s[2])<<16 | uint64(s[3])<<24 | uint64(s[4])<<32 | uint64(s[5])<<40 | uint64(s[6])<<48 | uint64(s[7])<<56
   154  }
   155  
   156  func load_le_byte8_uint64_inv(s []byte) uint64 {
   157  	// arm64:`MOVD\t\(R[0-9]+\)`,-`ORR`,-`MOV[BHW]`
   158  	return uint64(s[7])<<56 | uint64(s[6])<<48 | uint64(s[5])<<40 | uint64(s[4])<<32 | uint64(s[3])<<24 | uint64(s[2])<<16 | uint64(s[1])<<8 | uint64(s[0])
   159  }
   160  
   161  func load_be_byte2_uint16(s []byte) uint16 {
   162  	// arm64:`MOVHU\t\(R[0-9]+\)`,`REV16W`,-`ORR`,-`MOVB`
   163  	// amd64:`MOVWLZX\s\([A-Z]+\)`,`ROLW`,-`MOVB`,-`OR`
   164  	// ppc64le:`MOVHBR\t\(R[0-9]+\)`,-`MOVBZ`
   165  	return uint16(s[0])<<8 | uint16(s[1])
   166  }
   167  
   168  func load_be_byte2_uint16_inv(s []byte) uint16 {
   169  	// arm64:`MOVHU\t\(R[0-9]+\)`,`REV16W`,-`ORR`,-`MOVB`
   170  	// amd64:`MOVWLZX\s\([A-Z]+\)`,`ROLW`,-`MOVB`,-`OR`
   171  	// ppc64le:`MOVHBR\t\(R[0-9]+\)`,-`MOVBZ`
   172  	return uint16(s[1]) | uint16(s[0])<<8
   173  }
   174  
   175  func load_be_byte4_uint32(s []byte) uint32 {
   176  	// arm64:`MOVWU\t\(R[0-9]+\)`,`REVW`,-`ORR`,-`REV16W`,-`MOV[BH]`
   177  	return uint32(s[0])<<24 | uint32(s[1])<<16 | uint32(s[2])<<8 | uint32(s[3])
   178  }
   179  
   180  func load_be_byte4_uint32_inv(s []byte) uint32 {
   181  	// arm64:`MOVWU\t\(R[0-9]+\)`,`REVW`,-`ORR`,-`REV16W`,-`MOV[BH]`
   182  	// amd64/v1,amd64/v2:`MOVL\s\([A-Z]+\)`,`BSWAPL`,-`MOV[BW]`,-`OR`
   183  	// amd64/v3: `MOVBEL`
   184  	return uint32(s[3]) | uint32(s[2])<<8 | uint32(s[1])<<16 | uint32(s[0])<<24
   185  }
   186  
   187  func load_be_byte8_uint64(s []byte) uint64 {
   188  	// arm64:`MOVD\t\(R[0-9]+\)`,`REV`,-`ORR`,-`REVW`,-`REV16W`,-`MOV[BHW]`
   189  	// ppc64le:`MOVDBR\t\(R[0-9]+\)`,-`MOV[BHW]Z`
   190  	return uint64(s[0])<<56 | uint64(s[1])<<48 | uint64(s[2])<<40 | uint64(s[3])<<32 | uint64(s[4])<<24 | uint64(s[5])<<16 | uint64(s[6])<<8 | uint64(s[7])
   191  }
   192  
   193  func load_be_byte8_uint64_inv(s []byte) uint64 {
   194  	// arm64:`MOVD\t\(R[0-9]+\)`,`REV`,-`ORR`,-`REVW`,-`REV16W`,-`MOV[BHW]`
   195  	// amd64/v1,amd64/v2:`MOVQ\s\([A-Z]+\),\s[A-Z]+`,`BSWAPQ`,-`MOV[BWL]\t[^$]`,-`OR`
   196  	// amd64/v3: `MOVBEQ`
   197  	// ppc64le:`MOVDBR\t\(R[0-9]+\)`,-`MOV[BHW]Z`
   198  	return uint64(s[7]) | uint64(s[6])<<8 | uint64(s[5])<<16 | uint64(s[4])<<24 | uint64(s[3])<<32 | uint64(s[2])<<40 | uint64(s[1])<<48 | uint64(s[0])<<56
   199  }
   200  
   201  func load_le_byte2_uint16_idx(s []byte, idx int) uint16 {
   202  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOVB`
   203  	// 386:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`ORL`,-`MOVB`
   204  	// amd64:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`MOVB`,-`OR`
   205  	return uint16(s[idx]) | uint16(s[idx+1])<<8
   206  }
   207  
   208  func load_le_byte2_uint16_idx_inv(s []byte, idx int) uint16 {
   209  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOVB`
   210  	// 386:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`ORL`,-`MOVB`
   211  	// amd64:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`MOVB`,-`OR`
   212  	return uint16(s[idx+1])<<8 | uint16(s[idx])
   213  }
   214  
   215  func load_le_byte4_uint32_idx(s []byte, idx int) uint32 {
   216  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOV[BH]`
   217  	// amd64:`MOVL\s\([A-Z]+\)\([A-Z]+`,-`MOV[BW]`,-`OR`
   218  	return uint32(s[idx]) | uint32(s[idx+1])<<8 | uint32(s[idx+2])<<16 | uint32(s[idx+3])<<24
   219  }
   220  
   221  func load_le_byte4_uint32_idx_inv(s []byte, idx int) uint32 {
   222  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOV[BH]`
   223  	return uint32(s[idx+3])<<24 | uint32(s[idx+2])<<16 | uint32(s[idx+1])<<8 | uint32(s[idx])
   224  }
   225  
   226  func load_le_byte8_uint64_idx(s []byte, idx int) uint64 {
   227  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOV[BHW]`
   228  	// amd64:`MOVQ\s\([A-Z]+\)\([A-Z]+`,-`MOV[BWL]`,-`OR`
   229  	return uint64(s[idx]) | uint64(s[idx+1])<<8 | uint64(s[idx+2])<<16 | uint64(s[idx+3])<<24 | uint64(s[idx+4])<<32 | uint64(s[idx+5])<<40 | uint64(s[idx+6])<<48 | uint64(s[idx+7])<<56
   230  }
   231  
   232  func load_le_byte8_uint64_idx_inv(s []byte, idx int) uint64 {
   233  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\)`,-`ORR`,-`MOV[BHW]`
   234  	return uint64(s[idx+7])<<56 | uint64(s[idx+6])<<48 | uint64(s[idx+5])<<40 | uint64(s[idx+4])<<32 | uint64(s[idx+3])<<24 | uint64(s[idx+2])<<16 | uint64(s[idx+1])<<8 | uint64(s[idx])
   235  }
   236  
   237  func load_be_byte2_uint16_idx(s []byte, idx int) uint16 {
   238  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\)`,`REV16W`,-`ORR`,-`MOVB`
   239  	// amd64:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`MOVB`,-`OR`
   240  	return uint16(s[idx])<<8 | uint16(s[idx+1])
   241  }
   242  
   243  func load_be_byte2_uint16_idx_inv(s []byte, idx int) uint16 {
   244  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\)`,`REV16W`,-`ORR`,-`MOVB`
   245  	// amd64:`MOVWLZX\s\([A-Z]+\)\([A-Z]+`,-`MOVB`,-`OR`
   246  	return uint16(s[idx+1]) | uint16(s[idx])<<8
   247  }
   248  
   249  func load_be_byte4_uint32_idx(s []byte, idx int) uint32 {
   250  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+\)`,`REVW`,-`ORR`,-`MOV[BH]`,-`REV16W`
   251  	return uint32(s[idx])<<24 | uint32(s[idx+1])<<16 | uint32(s[idx+2])<<8 | uint32(s[idx+3])
   252  }
   253  
   254  func load_be_byte8_uint64_idx(s []byte, idx int) uint64 {
   255  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\)`,`REV`,-`ORR`,-`MOV[BHW]`,-`REVW`,-`REV16W`
   256  	return uint64(s[idx])<<56 | uint64(s[idx+1])<<48 | uint64(s[idx+2])<<40 | uint64(s[idx+3])<<32 | uint64(s[idx+4])<<24 | uint64(s[idx+5])<<16 | uint64(s[idx+6])<<8 | uint64(s[idx+7])
   257  }
   258  
   259  func load_le_byte2_uint16_idx2(s []byte, idx int) uint16 {
   260  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+<<1\)`,-`ORR`,-`MOVB`
   261  	return uint16(s[idx<<1]) | uint16(s[(idx<<1)+1])<<8
   262  }
   263  
   264  func load_le_byte2_uint16_idx2_inv(s []byte, idx int) uint16 {
   265  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+<<1\)`,-`ORR`,-`MOVB`
   266  	return uint16(s[(idx<<1)+1])<<8 | uint16(s[idx<<1])
   267  }
   268  
   269  func load_le_byte4_uint32_idx4(s []byte, idx int) uint32 {
   270  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`ORR`,-`MOV[BH]`
   271  	return uint32(s[idx<<2]) | uint32(s[(idx<<2)+1])<<8 | uint32(s[(idx<<2)+2])<<16 | uint32(s[(idx<<2)+3])<<24
   272  }
   273  
   274  func load_le_byte4_uint32_idx4_inv(s []byte, idx int) uint32 {
   275  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`ORR`,-`MOV[BH]`
   276  	return uint32(s[(idx<<2)+3])<<24 | uint32(s[(idx<<2)+2])<<16 | uint32(s[(idx<<2)+1])<<8 | uint32(s[idx<<2])
   277  }
   278  
   279  func load_le_byte8_uint64_idx8(s []byte, idx int) uint64 {
   280  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+<<3\)`,-`ORR`,-`MOV[BHW]`
   281  	return uint64(s[idx<<3]) | uint64(s[(idx<<3)+1])<<8 | uint64(s[(idx<<3)+2])<<16 | uint64(s[(idx<<3)+3])<<24 | uint64(s[(idx<<3)+4])<<32 | uint64(s[(idx<<3)+5])<<40 | uint64(s[(idx<<3)+6])<<48 | uint64(s[(idx<<3)+7])<<56
   282  }
   283  
   284  func load_le_byte8_uint64_idx8_inv(s []byte, idx int) uint64 {
   285  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+<<3\)`,-`ORR`,-`MOV[BHW]`
   286  	return uint64(s[(idx<<3)+7])<<56 | uint64(s[(idx<<3)+6])<<48 | uint64(s[(idx<<3)+5])<<40 | uint64(s[(idx<<3)+4])<<32 | uint64(s[(idx<<3)+3])<<24 | uint64(s[(idx<<3)+2])<<16 | uint64(s[(idx<<3)+1])<<8 | uint64(s[idx<<3])
   287  }
   288  
   289  func load_be_byte2_uint16_idx2(s []byte, idx int) uint16 {
   290  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+<<1\)`,`REV16W`,-`ORR`,-`MOVB`
   291  	return uint16(s[idx<<1])<<8 | uint16(s[(idx<<1)+1])
   292  }
   293  
   294  func load_be_byte2_uint16_idx2_inv(s []byte, idx int) uint16 {
   295  	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+<<1\)`,`REV16W`,-`ORR`,-`MOVB`
   296  	return uint16(s[(idx<<1)+1]) | uint16(s[idx<<1])<<8
   297  }
   298  
   299  func load_be_byte4_uint32_idx4(s []byte, idx int) uint32 {
   300  	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+<<2\)`,`REVW`,-`ORR`,-`MOV[BH]`,-`REV16W`
   301  	return uint32(s[idx<<2])<<24 | uint32(s[(idx<<2)+1])<<16 | uint32(s[(idx<<2)+2])<<8 | uint32(s[(idx<<2)+3])
   302  }
   303  
   304  func load_be_byte8_uint64_idx8(s []byte, idx int) uint64 {
   305  	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+<<3\)`,`REV`,-`ORR`,-`MOV[BHW]`,-`REVW`,-`REV16W`
   306  	return uint64(s[idx<<3])<<56 | uint64(s[(idx<<3)+1])<<48 | uint64(s[(idx<<3)+2])<<40 | uint64(s[(idx<<3)+3])<<32 | uint64(s[(idx<<3)+4])<<24 | uint64(s[(idx<<3)+5])<<16 | uint64(s[(idx<<3)+6])<<8 | uint64(s[(idx<<3)+7])
   307  }
   308  
   309  // Check load combining across function calls.
   310  
   311  func fcall_byte(a [2]byte) [2]byte {
   312  	return fcall_byte(fcall_byte(a)) // amd64:`MOVW`
   313  }
   314  
   315  func fcall_uint16(a [2]uint16) [2]uint16 {
   316  	return fcall_uint16(fcall_uint16(a)) // amd64:`MOVL`
   317  }
   318  
   319  func fcall_uint32(a [2]uint32) [2]uint32 {
   320  	return fcall_uint32(fcall_uint32(a)) // amd64:`MOVQ`
   321  }
   322  
   323  // We want to merge load+op in the first function, but not in the
   324  // second. See Issue 19595.
   325  func load_op_merge(p, q *int) {
   326  	x := *p // amd64:`ADDQ\t\(`
   327  	*q += x // The combined nilcheck and load would normally have this line number, but we want that combined operation to have the line number of the nil check instead (see #33724).
   328  }
   329  func load_op_no_merge(p, q *int) {
   330  	x := *p
   331  	for i := 0; i < 10; i++ {
   332  		*q += x // amd64:`ADDQ\t[A-Z]`
   333  	}
   334  }
   335  
   336  // Make sure offsets are folded into loads and stores.
   337  func offsets_fold(_, a [20]byte) (b [20]byte) {
   338  	// arm64:`MOVD\tcommand-line-arguments\.a\+[0-9]+\(FP\), R[0-9]+`,`MOVD\tR[0-9]+, command-line-arguments\.b\+[0-9]+\(FP\)`
   339  	b = a
   340  	return
   341  }
   342  
   343  // Make sure we don't put pointers in SSE registers across safe
   344  // points.
   345  
   346  func safe_point(p, q *[2]*int) {
   347  	a, b := p[0], p[1] // amd64:-`MOVUPS`
   348  	runtime.GC()
   349  	q[0], q[1] = a, b // amd64:-`MOVUPS`
   350  }
   351  
   352  // ------------- //
   353  //    Storing    //
   354  // ------------- //
   355  
   356  func store_le64(b []byte, x uint64) {
   357  	// amd64:`MOVQ\s.*\(.*\)$`,-`SHR.`
   358  	// arm64:`MOVD`,-`MOV[WBH]`
   359  	// ppc64le:`MOVD\s`,-`MOV[BHW]\s`
   360  	// s390x:`MOVDBR\s.*\(.*\)$`
   361  	binary.LittleEndian.PutUint64(b, x)
   362  }
   363  
   364  func store_le64_idx(b []byte, x uint64, idx int) {
   365  	// amd64:`MOVQ\s.*\(.*\)\(.*\*1\)$`,-`SHR.`
   366  	// arm64:`MOVD\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BHW]`
   367  	// ppc64le:`MOVD\s`,-`MOV[BHW]\s`
   368  	// s390x:`MOVDBR\s.*\(.*\)\(.*\*1\)$`
   369  	binary.LittleEndian.PutUint64(b[idx:], x)
   370  }
   371  
   372  func store_le64_idx2(dst []byte, d, length, offset int) []byte {
   373  	a := dst[d : d+length]
   374  	b := dst[d-offset:]
   375  	// amd64:`MOVQ\s.*\(.*\)\(.*\*1\)$`,-`SHR.`
   376  	binary.LittleEndian.PutUint64(a, binary.LittleEndian.Uint64(b))
   377  	return dst
   378  }
   379  
   380  func store_le64_idx_const(b []byte, idx int) {
   381  	// amd64:`MOVQ\s\$123, \(.*\)\(.*\*1\)$`
   382  	binary.LittleEndian.PutUint64(b[idx:], 123)
   383  }
   384  
   385  func store_le64_load(b []byte, x *[8]byte) {
   386  	_ = b[8]
   387  	// amd64:-`MOV[BWL]`
   388  	// arm64:-`MOV[BWH]`
   389  	// ppc64le:-`MOV[BWH]`
   390  	// s390x:-`MOVB`,-`MOV[WH]BR`
   391  	binary.LittleEndian.PutUint64(b, binary.LittleEndian.Uint64(x[:]))
   392  }
   393  
   394  func store_le32(b []byte, x uint32) {
   395  	// amd64:`MOVL\s`
   396  	// arm64:`MOVW`,-`MOV[BH]`
   397  	// ppc64le:`MOVW\s`
   398  	// s390x:`MOVWBR\s.*\(.*\)$`
   399  	binary.LittleEndian.PutUint32(b, x)
   400  }
   401  
   402  func store_le32_idx(b []byte, x uint32, idx int) {
   403  	// amd64:`MOVL\s`
   404  	// arm64:`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BH]`
   405  	// ppc64le:`MOVW\s`
   406  	// s390x:`MOVWBR\s.*\(.*\)\(.*\*1\)$`
   407  	binary.LittleEndian.PutUint32(b[idx:], x)
   408  }
   409  
   410  func store_le32_idx_const(b []byte, idx int) {
   411  	// amd64:`MOVL\s\$123, \(.*\)\(.*\*1\)$`
   412  	binary.LittleEndian.PutUint32(b[idx:], 123)
   413  }
   414  
   415  func store_le16(b []byte, x uint16) {
   416  	// amd64:`MOVW\s`
   417  	// arm64:`MOVH`,-`MOVB`
   418  	// ppc64le:`MOVH\s`
   419  	// s390x:`MOVHBR\s.*\(.*\)$`
   420  	binary.LittleEndian.PutUint16(b, x)
   421  }
   422  
   423  func store_le16_idx(b []byte, x uint16, idx int) {
   424  	// amd64:`MOVW\s`
   425  	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`
   426  	// ppc64le:`MOVH\s`
   427  	// s390x:`MOVHBR\s.*\(.*\)\(.*\*1\)$`
   428  	binary.LittleEndian.PutUint16(b[idx:], x)
   429  }
   430  
   431  func store_le16_idx_const(b []byte, idx int) {
   432  	// amd64:`MOVW\s\$123, \(.*\)\(.*\*1\)$`
   433  	binary.LittleEndian.PutUint16(b[idx:], 123)
   434  }
   435  
   436  func store_be64(b []byte, x uint64) {
   437  	// amd64/v1,amd64/v2:`BSWAPQ`,-`SHR.`
   438  	// amd64/v3: `MOVBEQ`
   439  	// arm64:`MOVD`,`REV`,-`MOV[WBH]`,-`REVW`,-`REV16W`
   440  	// ppc64le:`MOVDBR`
   441  	// s390x:`MOVD\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
   442  	binary.BigEndian.PutUint64(b, x)
   443  }
   444  
   445  func store_be64_idx(b []byte, x uint64, idx int) {
   446  	// amd64/v1,amd64/v2:`BSWAPQ`,-`SHR.`
   447  	// amd64/v3:`MOVBEQ\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
   448  	// arm64:`REV`,`MOVD\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BHW]`,-`REV16W`,-`REVW`
   449  	// ppc64le:`MOVDBR`
   450  	// s390x:`MOVD\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
   451  	binary.BigEndian.PutUint64(b[idx:], x)
   452  }
   453  
   454  func store_be32(b []byte, x uint32) {
   455  	// amd64/v1,amd64/v2:`BSWAPL`,-`SHR.`
   456  	// amd64/v3:`MOVBEL`
   457  	// arm64:`MOVW`,`REVW`,-`MOV[BH]`,-`REV16W`
   458  	// ppc64le:`MOVWBR`
   459  	// s390x:`MOVW\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
   460  	binary.BigEndian.PutUint32(b, x)
   461  }
   462  
   463  func store_be64_load(b, x *[8]byte) {
   464  	// arm64:-`REV`
   465  	// amd64:-`BSWAPQ`
   466  	binary.BigEndian.PutUint64(b[:], binary.BigEndian.Uint64(x[:]))
   467  }
   468  
   469  func store_be32_load(b, x *[8]byte) {
   470  	// arm64:-`REVW`
   471  	// amd64:-`BSWAPL`
   472  	binary.BigEndian.PutUint32(b[:], binary.BigEndian.Uint32(x[:]))
   473  }
   474  
   475  func store_be32_idx(b []byte, x uint32, idx int) {
   476  	// amd64/v1,amd64/v2:`BSWAPL`,-`SHR.`
   477  	// amd64/v3:`MOVBEL\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
   478  	// arm64:`REVW`,`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BH]`,-`REV16W`
   479  	// ppc64le:`MOVWBR`
   480  	// s390x:`MOVW\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
   481  	binary.BigEndian.PutUint32(b[idx:], x)
   482  }
   483  
   484  func store_be16(b []byte, x uint16) {
   485  	// amd64/v1,amd64/v2:`ROLW\s\$8`,-`SHR.`
   486  	// amd64/v3:`MOVBEW`,-`ROLW`
   487  	// arm64:`MOVH`,`REV16W`,-`MOVB`
   488  	// ppc64le:`MOVHBR`
   489  	// s390x:`MOVH\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
   490  	binary.BigEndian.PutUint16(b, x)
   491  }
   492  
   493  func store_be16_idx(b []byte, x uint16, idx int) {
   494  	// amd64/v1,amd64/v2:`ROLW\s\$8`,-`SHR.`
   495  	// amd64/v3:`MOVBEW\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
   496  	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,`REV16W`,-`MOVB`
   497  	// ppc64le:`MOVHBR`
   498  	// s390x:`MOVH\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
   499  	binary.BigEndian.PutUint16(b[idx:], x)
   500  }
   501  
   502  func store_le_byte_2(b []byte, val uint16) {
   503  	_ = b[2]
   504  	// arm64:`MOVH\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`
   505  	// 386:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
   506  	// amd64:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
   507  	b[1], b[2] = byte(val), byte(val>>8)
   508  }
   509  
   510  func store_le_byte_2_inv(b []byte, val uint16) {
   511  	_ = b[2]
   512  	// 386:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
   513  	// amd64:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
   514  	b[2], b[1] = byte(val>>8), byte(val)
   515  }
   516  
   517  func store_le_byte_4(b []byte, val uint32) {
   518  	_ = b[4]
   519  	// arm64:`MOVW\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`,-`MOVH`
   520  	// 386:`MOVL\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`,-`MOVW`
   521  	// amd64:`MOVL\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`,-`MOVW`
   522  	b[1], b[2], b[3], b[4] = byte(val), byte(val>>8), byte(val>>16), byte(val>>24)
   523  }
   524  
   525  func store_le_byte_8(b []byte, val uint64) {
   526  	_ = b[8]
   527  	// arm64:`MOVD\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`,-`MOVH`,-`MOVW`
   528  	// amd64:`MOVQ\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`,-`MOVW`,-`MOVL`
   529  	b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8] = byte(val), byte(val>>8), byte(val>>16), byte(val>>24), byte(val>>32), byte(val>>40), byte(val>>48), byte(val>>56)
   530  }
   531  
   532  func store_be_byte_2(b []byte, val uint16) {
   533  	_ = b[2]
   534  	// arm64:`REV16W`,`MOVH\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`
   535  	// amd64/v1,amd64/v2:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
   536  	// amd64/v3: `MOVBEW`
   537  	b[1], b[2] = byte(val>>8), byte(val)
   538  }
   539  
   540  func store_be_byte_4(b []byte, val uint32) {
   541  	_ = b[4]
   542  	// arm64:`REVW`,`MOVW\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`,-`MOVH`,-`REV16W`
   543  	// amd64/v1,amd64/v2:`MOVL\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`,-`MOVW`
   544  	// amd64/v3:`MOVBEL\s[A-Z]+,\s1\([A-Z]+\)`
   545  	b[1], b[2], b[3], b[4] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   546  }
   547  
   548  func store_be_byte_8(b []byte, val uint64) {
   549  	_ = b[8]
   550  	// arm64:`REV`,`MOVD\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`,-`MOVH`,-`MOVW`,-`REV16W`,-`REVW`
   551  	// amd64/v1,amd64/v2:`MOVQ\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`,-`MOVW`,-`MOVL`
   552  	// amd64/v3:`MOVBEQ\s[A-Z]+,\s1\([A-Z]+\)`, -`MOVBEL`
   553  	b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8] = byte(val>>56), byte(val>>48), byte(val>>40), byte(val>>32), byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   554  }
   555  
   556  func store_le_byte_2_idx(b []byte, idx int, val uint16) {
   557  	_, _ = b[idx+0], b[idx+1]
   558  	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`
   559  	// 386:`MOVW\s[A-Z]+,\s\([A-Z]+\)\([A-Z]+`,-`MOVB`
   560  	b[idx+1], b[idx+0] = byte(val>>8), byte(val)
   561  }
   562  
   563  func store_le_byte_2_idx_inv(b []byte, idx int, val uint16) {
   564  	_, _ = b[idx+0], b[idx+1]
   565  	// 386:`MOVW\s[A-Z]+,\s\([A-Z]+\)\([A-Z]+`,-`MOVB`
   566  	b[idx+0], b[idx+1] = byte(val), byte(val>>8)
   567  }
   568  
   569  func store_le_byte_4_idx(b []byte, idx int, val uint32) {
   570  	_, _, _, _ = b[idx+0], b[idx+1], b[idx+2], b[idx+3]
   571  	// arm64:`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`,-`MOVH`
   572  	b[idx+3], b[idx+2], b[idx+1], b[idx+0] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   573  }
   574  
   575  func store_be_byte_2_idx(b []byte, idx int, val uint16) {
   576  	_, _ = b[idx+0], b[idx+1]
   577  	// arm64:`REV16W`,`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`
   578  	b[idx+0], b[idx+1] = byte(val>>8), byte(val)
   579  }
   580  
   581  func store_be_byte_4_idx(b []byte, idx int, val uint32) {
   582  	_, _, _, _ = b[idx+0], b[idx+1], b[idx+2], b[idx+3]
   583  	// arm64:`REVW`,`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`,-`MOVH`,-`REV16W`
   584  	b[idx+0], b[idx+1], b[idx+2], b[idx+3] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   585  }
   586  
   587  func store_be_byte_2_idx2(b []byte, idx int, val uint16) {
   588  	_, _ = b[(idx<<1)+0], b[(idx<<1)+1]
   589  	// arm64:`REV16W`,`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+<<1\)`,-`MOVB`
   590  	b[(idx<<1)+0], b[(idx<<1)+1] = byte(val>>8), byte(val)
   591  }
   592  
   593  func store_le_byte_2_idx2(b []byte, idx int, val uint16) {
   594  	_, _ = b[(idx<<1)+0], b[(idx<<1)+1]
   595  	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+<<1\)`,-`MOVB`
   596  	b[(idx<<1)+1], b[(idx<<1)+0] = byte(val>>8), byte(val)
   597  }
   598  
   599  func store_be_byte_4_idx4(b []byte, idx int, val uint32) {
   600  	_, _, _, _ = b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3]
   601  	// arm64:`REVW`,`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`MOVB`,-`MOVH`,-`REV16W`
   602  	b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   603  }
   604  
   605  func store_le_byte_4_idx4_inv(b []byte, idx int, val uint32) {
   606  	_, _, _, _ = b[(idx<<2)+0], b[(idx<<2)+1], b[(idx<<2)+2], b[(idx<<2)+3]
   607  	// arm64:`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`MOVB`,-`MOVH`
   608  	b[(idx<<2)+3], b[(idx<<2)+2], b[(idx<<2)+1], b[(idx<<2)+0] = byte(val>>24), byte(val>>16), byte(val>>8), byte(val)
   609  }
   610  
   611  // ------------- //
   612  //    Zeroing    //
   613  // ------------- //
   614  
   615  // Check that zero stores are combined into larger stores
   616  
   617  func zero_byte_2(b1, b2 []byte) {
   618  	// bounds checks to guarantee safety of writes below
   619  	_, _ = b1[1], b2[1]
   620  	// arm64:"MOVH\tZR",-"MOVB"
   621  	// amd64:`MOVW\s[$]0,\s\([A-Z]+\)`
   622  	// 386:`MOVW\s[$]0,\s\([A-Z]+\)`
   623  	b1[0], b1[1] = 0, 0
   624  	// arm64:"MOVH\tZR",-"MOVB"
   625  	// 386:`MOVW\s[$]0,\s\([A-Z]+\)`
   626  	// amd64:`MOVW\s[$]0,\s\([A-Z]+\)`
   627  	b2[1], b2[0] = 0, 0
   628  }
   629  
   630  func zero_byte_4(b1, b2 []byte) {
   631  	_, _ = b1[3], b2[3]
   632  	// arm64:"MOVW\tZR",-"MOVB",-"MOVH"
   633  	// amd64:`MOVL\s[$]0,\s\([A-Z]+\)`
   634  	// 386:`MOVL\s[$]0,\s\([A-Z]+\)`
   635  	b1[0], b1[1], b1[2], b1[3] = 0, 0, 0, 0
   636  	// arm64:"MOVW\tZR",-"MOVB",-"MOVH"
   637  	b2[2], b2[3], b2[1], b2[0] = 0, 0, 0, 0
   638  }
   639  
   640  func zero_byte_8(b []byte) {
   641  	_ = b[7]
   642  	b[0], b[1], b[2], b[3] = 0, 0, 0, 0
   643  	b[4], b[5], b[6], b[7] = 0, 0, 0, 0 // arm64:"MOVD\tZR",-"MOVB",-"MOVH",-"MOVW"
   644  }
   645  
   646  func zero_byte_16(b []byte) {
   647  	_ = b[15]
   648  	b[0], b[1], b[2], b[3] = 0, 0, 0, 0
   649  	b[4], b[5], b[6], b[7] = 0, 0, 0, 0
   650  	b[8], b[9], b[10], b[11] = 0, 0, 0, 0
   651  	b[12], b[13], b[14], b[15] = 0, 0, 0, 0 // arm64:"STP",-"MOVB",-"MOVH",-"MOVW"
   652  }
   653  
   654  func zero_byte_30(a *[30]byte) {
   655  	*a = [30]byte{} // arm64:"STP",-"MOVB",-"MOVH",-"MOVW"
   656  }
   657  
   658  func zero_byte_39(a *[39]byte) {
   659  	*a = [39]byte{} // arm64:"MOVD",-"MOVB",-"MOVH",-"MOVW"
   660  }
   661  
   662  func zero_byte_2_idx(b []byte, idx int) {
   663  	_, _ = b[idx+0], b[idx+1]
   664  	// arm64:`MOVH\sZR,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`
   665  	b[idx+0], b[idx+1] = 0, 0
   666  }
   667  
   668  func zero_byte_2_idx2(b []byte, idx int) {
   669  	_, _ = b[(idx<<1)+0], b[(idx<<1)+1]
   670  	// arm64:`MOVH\sZR,\s\(R[0-9]+\)\(R[0-9]+<<1\)`,-`MOVB`
   671  	b[(idx<<1)+0], b[(idx<<1)+1] = 0, 0
   672  }
   673  
   674  func zero_uint16_2(h1, h2 []uint16) {
   675  	_, _ = h1[1], h2[1]
   676  	// arm64:"MOVW\tZR",-"MOVB",-"MOVH"
   677  	// amd64:`MOVL\s[$]0,\s\([A-Z]+\)`
   678  	// 386:`MOVL\s[$]0,\s\([A-Z]+\)`
   679  	h1[0], h1[1] = 0, 0
   680  	// arm64:"MOVW\tZR",-"MOVB",-"MOVH"
   681  	// amd64:`MOVL\s[$]0,\s\([A-Z]+\)`
   682  	// 386:`MOVL\s[$]0,\s\([A-Z]+\)`
   683  	h2[1], h2[0] = 0, 0
   684  }
   685  
   686  func zero_uint16_4(h1, h2 []uint16) {
   687  	_, _ = h1[3], h2[3]
   688  	// arm64:"MOVD\tZR",-"MOVB",-"MOVH",-"MOVW"
   689  	// amd64:`MOVQ\s[$]0,\s\([A-Z]+\)`
   690  	h1[0], h1[1], h1[2], h1[3] = 0, 0, 0, 0
   691  	// arm64:"MOVD\tZR",-"MOVB",-"MOVH",-"MOVW"
   692  	h2[2], h2[3], h2[1], h2[0] = 0, 0, 0, 0
   693  }
   694  
   695  func zero_uint16_8(h []uint16) {
   696  	_ = h[7]
   697  	h[0], h[1], h[2], h[3] = 0, 0, 0, 0
   698  	h[4], h[5], h[6], h[7] = 0, 0, 0, 0 // arm64:"STP",-"MOVB",-"MOVH"
   699  }
   700  
   701  func zero_uint32_2(w1, w2 []uint32) {
   702  	_, _ = w1[1], w2[1]
   703  	// arm64:"MOVD\tZR",-"MOVB",-"MOVH",-"MOVW"
   704  	// amd64:`MOVQ\s[$]0,\s\([A-Z]+\)`
   705  	w1[0], w1[1] = 0, 0
   706  	// arm64:"MOVD\tZR",-"MOVB",-"MOVH",-"MOVW"
   707  	// amd64:`MOVQ\s[$]0,\s\([A-Z]+\)`
   708  	w2[1], w2[0] = 0, 0
   709  }
   710  
   711  func zero_uint32_4(w1, w2 []uint32) {
   712  	_, _ = w1[3], w2[3]
   713  	w1[0], w1[1], w1[2], w1[3] = 0, 0, 0, 0 // arm64:"STP",-"MOVB",-"MOVH"
   714  	w2[2], w2[3], w2[1], w2[0] = 0, 0, 0, 0 // arm64:"STP",-"MOVB",-"MOVH"
   715  }
   716  
   717  func zero_uint64_2(d1, d2 []uint64) {
   718  	_, _ = d1[1], d2[1]
   719  	d1[0], d1[1] = 0, 0 // arm64:"STP",-"MOVB",-"MOVH"
   720  	d2[1], d2[0] = 0, 0 // arm64:"STP",-"MOVB",-"MOVH"
   721  }
   722  

View as plain text