Source file src/simd/archsimd/deprecated_arm64.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 && arm64
     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: VSXTL
    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: VSXTL
    29  //
    30  // Deprecated: use x.ExtendToInt32() instead.
    31  //
    32  //go:fix inline
    33  func (x Int16x8) 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: VSXTL
    42  //
    43  // Deprecated: use x.ExtendToInt64() instead.
    44  //
    45  //go:fix inline
    46  func (x Int32x4) ExtendLo2ToInt64() (z Int64x2) {
    47  	return x.ExtendToInt64()
    48  }
    49  
    50  // ExtendLo8ToUint16 zero-extends the low 8 elements of x to uint16.
    51  //
    52  //	z[i] = uint16(x[i])
    53  //
    54  // Asm: VUXTL
    55  //
    56  // Deprecated: use x.ExtendToUint16() instead.
    57  //
    58  //go:fix inline
    59  func (x Uint8x16) ExtendLo8ToUint16() (z Uint16x8) {
    60  	return x.ExtendToUint16()
    61  }
    62  
    63  // ExtendLo4ToUint32 zero-extends the low 4 elements of x to uint32.
    64  //
    65  //	z[i] = uint32(x[i])
    66  //
    67  // Asm: VUXTL
    68  //
    69  // Deprecated: use x.ExtendToUint32() instead.
    70  //
    71  //go:fix inline
    72  func (x Uint16x8) ExtendLo4ToUint32() (z Uint32x4) {
    73  	return x.ExtendToUint32()
    74  }
    75  
    76  // ExtendLo2ToUint64 zero-extends the low 2 elements of x to uint64.
    77  //
    78  //	z[i] = uint64(x[i])
    79  //
    80  // Asm: VUXTL
    81  //
    82  // Deprecated: use x.ExtendToUint64() instead.
    83  //
    84  //go:fix inline
    85  func (x Uint32x4) ExtendLo2ToUint64() (z Uint64x2) {
    86  	return x.ExtendToUint64()
    87  }
    88  
    89  // ConvertLo2ToFloat64 converts the low-indexed 2 elements of x to float64.
    90  //
    91  //	z[i] = float64(x[i])
    92  //
    93  // Asm: VFCVTL
    94  //
    95  // Deprecated: use x.ConvertToFloat64() instead.
    96  //
    97  //go:fix inline
    98  func (x Float32x4) ConvertLo2ToFloat64() (z Float64x2) {
    99  	return x.ConvertToFloat64()
   100  }
   101  
   102  // ConcatShiftBytesRight concatenates x and y and shifts it right by shift bytes.
   103  // The result vector will be the lower half of the concatenated vector.
   104  //
   105  // Asm: VEXT
   106  //
   107  // Deprecated: use y.ConcatWindow(x, uint8(shift)) instead. ConcatWindow takes
   108  // x and y in the opposite order.
   109  //
   110  //go:fix inline
   111  func (x Uint8x16) ConcatShiftBytesRight(y Uint8x16, shift uint64) Uint8x16 {
   112  	return y.ConcatWindow(x, uint8(shift))
   113  }
   114  
   115  // GetElem returns the i'th element of x.
   116  //
   117  // Deprecated: use x.Elem(i) instead.
   118  //
   119  //go:fix inline
   120  func (x Float32x4) GetElem(i uint8) (z float32) {
   121  	return x.Elem(i)
   122  }
   123  
   124  // GetElem returns the i'th element of x.
   125  //
   126  // Deprecated: use x.Elem(i) instead.
   127  //
   128  //go:fix inline
   129  func (x Float64x2) GetElem(i uint8) (z float64) {
   130  	return x.Elem(i)
   131  }
   132  
   133  // GetElem returns the i'th element of x.
   134  //
   135  // Deprecated: use x.Elem(i) instead.
   136  //
   137  //go:fix inline
   138  func (x Int8x16) GetElem(i uint8) (z int8) {
   139  	return x.Elem(i)
   140  }
   141  
   142  // GetElem returns the i'th element of x.
   143  //
   144  // Deprecated: use x.Elem(i) instead.
   145  //
   146  //go:fix inline
   147  func (x Int16x8) GetElem(i uint8) (z int16) {
   148  	return x.Elem(i)
   149  }
   150  
   151  // GetElem returns the i'th element of x.
   152  //
   153  // Deprecated: use x.Elem(i) instead.
   154  //
   155  //go:fix inline
   156  func (x Int32x4) GetElem(i uint8) (z int32) {
   157  	return x.Elem(i)
   158  }
   159  
   160  // GetElem returns the i'th element of x.
   161  //
   162  // Deprecated: use x.Elem(i) instead.
   163  //
   164  //go:fix inline
   165  func (x Int64x2) GetElem(i uint8) (z int64) {
   166  	return x.Elem(i)
   167  }
   168  
   169  // GetElem returns the i'th element of x.
   170  //
   171  // Deprecated: use x.Elem(i) instead.
   172  //
   173  //go:fix inline
   174  func (x Uint8x16) GetElem(i uint8) (z uint8) {
   175  	return x.Elem(i)
   176  }
   177  
   178  // GetElem returns the i'th element of x.
   179  //
   180  // Deprecated: use x.Elem(i) instead.
   181  //
   182  //go:fix inline
   183  func (x Uint16x8) GetElem(i uint8) (z uint16) {
   184  	return x.Elem(i)
   185  }
   186  
   187  // GetElem returns the i'th element of x.
   188  //
   189  // Deprecated: use x.Elem(i) instead.
   190  //
   191  //go:fix inline
   192  func (x Uint32x4) GetElem(i uint8) (z uint32) {
   193  	return x.Elem(i)
   194  }
   195  
   196  // GetElem returns the i'th element of x.
   197  //
   198  // Deprecated: use x.Elem(i) instead.
   199  //
   200  //go:fix inline
   201  func (x Uint64x2) GetElem(i uint8) (z uint64) {
   202  	return x.Elem(i)
   203  }
   204  
   205  // CarrylessMultiplyEven computes the carryless multiplication of
   206  // the even-indexed elements of x and y.
   207  //
   208  // Asm: PMULL if CPU feature PMULL, Emulated otherwise
   209  //
   210  // Deprecated: use x.CarrylessMulEven(y) instead.
   211  //
   212  //go:fix inline
   213  func (x Uint64x2) CarrylessMultiplyEven(y Uint64x2) (z Uint64x2) {
   214  	return x.CarrylessMulEven(y)
   215  }
   216  
   217  // CarrylessMultiplyOdd computes the carryless multiplication of
   218  // the odd-indexed elements of x and y.
   219  //
   220  // Asm: PMULL if CPU feature PMULL, Emulated otherwise
   221  //
   222  // Deprecated: use x.CarrylessMulOdd(y) instead.
   223  //
   224  //go:fix inline
   225  func (x Uint64x2) CarrylessMultiplyOdd(y Uint64x2) (z Uint64x2) {
   226  	return x.CarrylessMulOdd(y)
   227  }
   228  
   229  // CarrylessMultiplyOddEven computes the carryless multiplication of
   230  // the odd-indexed elements of x and the even-indexed elements of y.
   231  //
   232  // Asm: PMULL if CPU feature PMULL, Emulated otherwise
   233  //
   234  // Deprecated: use x.CarrylessMulOddEven(y) instead.
   235  //
   236  //go:fix inline
   237  func (x Uint64x2) CarrylessMultiplyOddEven(y Uint64x2) (z Uint64x2) {
   238  	return x.CarrylessMulOddEven(y)
   239  }
   240  
   241  // CarrylessMultiplyEvenOdd computes the carryless multiplication of
   242  // the even-indexed elements of x and the odd-indexed elements of y.
   243  //
   244  // Asm: PMULL if CPU feature PMULL, Emulated otherwise
   245  //
   246  // Deprecated: use x.CarrylessMulEvenOdd(y) instead.
   247  //
   248  //go:fix inline
   249  func (x Uint64x2) CarrylessMultiplyEvenOdd(y Uint64x2) (z Uint64x2) {
   250  	return x.CarrylessMulEvenOdd(y)
   251  }
   252  
   253  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   254  // returning a vector of half as many elements, each with twice the input
   255  // element size.
   256  //
   257  //	z[i] = int16(x[i]) * int16(y[i])
   258  //
   259  // Asm: VSMULL
   260  //
   261  // Deprecated: use x.MulWiden(y) instead.
   262  //
   263  //go:fix inline
   264  func (x Int8x16) MulWidenLo(y Int8x16) (z Int16x8) {
   265  	return x.MulWiden(y)
   266  }
   267  
   268  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   269  // returning a vector of half as many elements, each with twice the input
   270  // element size.
   271  //
   272  //	z[i] = int32(x[i]) * int32(y[i])
   273  //
   274  // Asm: VSMULL
   275  //
   276  // Deprecated: use x.MulWiden(y) instead.
   277  //
   278  //go:fix inline
   279  func (x Int16x8) MulWidenLo(y Int16x8) (z Int32x4) {
   280  	return x.MulWiden(y)
   281  }
   282  
   283  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   284  // returning a vector of half as many elements, each with twice the input
   285  // element size.
   286  //
   287  //	z[i] = int64(x[i]) * int64(y[i])
   288  //
   289  // Asm: VSMULL
   290  //
   291  // Deprecated: use x.MulWiden(y) instead.
   292  //
   293  //go:fix inline
   294  func (x Int32x4) MulWidenLo(y Int32x4) (z Int64x2) {
   295  	return x.MulWiden(y)
   296  }
   297  
   298  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   299  // returning a vector of half as many elements, each with twice the input
   300  // element size.
   301  //
   302  //	z[i] = uint16(x[i]) * uint16(y[i])
   303  //
   304  // Asm: VUMULL
   305  //
   306  // Deprecated: use x.MulWiden(y) instead.
   307  //
   308  //go:fix inline
   309  func (x Uint8x16) MulWidenLo(y Uint8x16) (z Uint16x8) {
   310  	return x.MulWiden(y)
   311  }
   312  
   313  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   314  // returning a vector of half as many elements, each with twice the input
   315  // element size.
   316  //
   317  //	z[i] = uint32(x[i]) * uint32(y[i])
   318  //
   319  // Asm: VUMULL
   320  //
   321  // Deprecated: use x.MulWiden(y) instead.
   322  //
   323  //go:fix inline
   324  func (x Uint16x8) MulWidenLo(y Uint16x8) (z Uint32x4) {
   325  	return x.MulWiden(y)
   326  }
   327  
   328  // MulWidenLo multiplies corresponding elements in the lower half of x and y,
   329  // returning a vector of half as many elements, each with twice the input
   330  // element size.
   331  //
   332  //	z[i] = uint64(x[i]) * uint64(y[i])
   333  //
   334  // Asm: VUMULL
   335  //
   336  // Deprecated: use x.MulWiden(y) instead.
   337  //
   338  //go:fix inline
   339  func (x Uint32x4) MulWidenLo(y Uint32x4) (z Uint64x2) {
   340  	return x.MulWiden(y)
   341  }
   342  

View as plain text