Source file src/simd/archsimd/deprecated_amd64.go

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build goexperiment.simd && amd64
     6  
     7  package archsimd
     8  
     9  // Deprecated operations that are wrappers around their replacements.
    10  
    11  // ExtendLo8ToInt16 sign-extends the low 8 elements of x to int16.
    12  //
    13  //	z[i] = int16(x[i])
    14  //
    15  // Asm: VPMOVSXBW, CPU Feature: AVX
    16  //
    17  // Deprecated: use x.ExtendToInt16() instead.
    18  //
    19  //go:fix inline
    20  func (x Int8x16) ExtendLo8ToInt16() (z Int16x8) {
    21  	return x.ExtendToInt16()
    22  }
    23  
    24  // ExtendLo4ToInt32 sign-extends the low 4 elements of x to int32.
    25  //
    26  //	z[i] = int32(x[i])
    27  //
    28  // Asm: VPMOVSXBD, CPU Feature: AVX
    29  //
    30  // Deprecated: use x.ExtendToInt32() instead.
    31  //
    32  //go:fix inline
    33  func (x Int8x16) ExtendLo4ToInt32() (z Int32x4) {
    34  	return x.ExtendToInt32()
    35  }
    36  
    37  // ExtendLo2ToInt64 sign-extends the low 2 elements of x to int64.
    38  //
    39  //	z[i] = int64(x[i])
    40  //
    41  // Asm: VPMOVSXBQ, CPU Feature: AVX
    42  //
    43  // Deprecated: use x.ExtendToInt64() instead.
    44  //
    45  //go:fix inline
    46  func (x Int8x16) ExtendLo2ToInt64() (z Int64x2) {
    47  	return x.ExtendToInt64()
    48  }
    49  
    50  // ExtendLo4ToInt32 sign-extends the low 4 elements of x to int32.
    51  //
    52  //	z[i] = int32(x[i])
    53  //
    54  // Asm: VPMOVSXWD, CPU Feature: AVX
    55  //
    56  // Deprecated: use x.ExtendToInt32() instead.
    57  //
    58  //go:fix inline
    59  func (x Int16x8) ExtendLo4ToInt32() (z Int32x4) {
    60  	return x.ExtendToInt32()
    61  }
    62  
    63  // ExtendLo2ToInt64 sign-extends the low 2 elements of x to int64.
    64  //
    65  //	z[i] = int64(x[i])
    66  //
    67  // Asm: VPMOVSXWQ, CPU Feature: AVX
    68  //
    69  // Deprecated: use x.ExtendToInt64() instead.
    70  //
    71  //go:fix inline
    72  func (x Int16x8) ExtendLo2ToInt64() (z Int64x2) {
    73  	return x.ExtendToInt64()
    74  }
    75  
    76  // ExtendLo2ToInt64 sign-extends the low 2 elements of x to int64.
    77  //
    78  //	z[i] = int64(x[i])
    79  //
    80  // Asm: VPMOVSXDQ, CPU Feature: AVX
    81  //
    82  // Deprecated: use x.ExtendToInt64() instead.
    83  //
    84  //go:fix inline
    85  func (x Int32x4) ExtendLo2ToInt64() (z Int64x2) {
    86  	return x.ExtendToInt64()
    87  }
    88  
    89  // ExtendLo8ToUint16 zero-extends the low 8 elements of x to uint16.
    90  //
    91  //	z[i] = uint16(x[i])
    92  //
    93  // Asm: VPMOVZXBW, CPU Feature: AVX
    94  //
    95  // Deprecated: use x.ExtendToUint16() instead.
    96  //
    97  //go:fix inline
    98  func (x Uint8x16) ExtendLo8ToUint16() (z Uint16x8) {
    99  	return x.ExtendToUint16()
   100  }
   101  
   102  // ExtendLo4ToUint32 zero-extends the low 4 elements of x to uint32.
   103  //
   104  //	z[i] = uint32(x[i])
   105  //
   106  // Asm: VPMOVZXBD, CPU Feature: AVX
   107  //
   108  // Deprecated: use x.ExtendToUint32() instead.
   109  //
   110  //go:fix inline
   111  func (x Uint8x16) ExtendLo4ToUint32() (z Uint32x4) {
   112  	return x.ExtendToUint32()
   113  }
   114  
   115  // ExtendLo2ToUint64 zero-extends the low 2 elements of x to uint64.
   116  //
   117  //	z[i] = uint64(x[i])
   118  //
   119  // Asm: VPMOVZXBQ, CPU Feature: AVX
   120  //
   121  // Deprecated: use x.ExtendToUint64() instead.
   122  //
   123  //go:fix inline
   124  func (x Uint8x16) ExtendLo2ToUint64() (z Uint64x2) {
   125  	return x.ExtendToUint64()
   126  }
   127  
   128  // ExtendLo4ToUint32 zero-extends the low 4 elements of x to uint32.
   129  //
   130  //	z[i] = uint32(x[i])
   131  //
   132  // Asm: VPMOVZXWD, CPU Feature: AVX
   133  //
   134  // Deprecated: use x.ExtendToUint32() instead.
   135  //
   136  //go:fix inline
   137  func (x Uint16x8) ExtendLo4ToUint32() (z Uint32x4) {
   138  	return x.ExtendToUint32()
   139  }
   140  
   141  // ExtendLo2ToUint64 zero-extends the low 2 elements of x to uint64.
   142  //
   143  //	z[i] = uint64(x[i])
   144  //
   145  // Asm: VPMOVZXWQ, CPU Feature: AVX
   146  //
   147  // Deprecated: use x.ExtendToUint64() instead.
   148  //
   149  //go:fix inline
   150  func (x Uint16x8) ExtendLo2ToUint64() (z Uint64x2) {
   151  	return x.ExtendToUint64()
   152  }
   153  
   154  // ExtendLo2ToUint64 zero-extends the low 2 elements of x to uint64.
   155  //
   156  //	z[i] = uint64(x[i])
   157  //
   158  // Asm: VPMOVZXDQ, CPU Feature: AVX
   159  //
   160  // Deprecated: use x.ExtendToUint64() instead.
   161  //
   162  //go:fix inline
   163  func (x Uint32x4) ExtendLo2ToUint64() (z Uint64x2) {
   164  	return x.ExtendToUint64()
   165  }
   166  

View as plain text