github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/math/big/arith_decl_pure.go (about)

     1  // Copyright 2015 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 math_big_pure_go
     6  // +build math_big_pure_go
     7  
     8  package big
     9  
    10  func addVV(z, x, y []Word) (c Word) {
    11  	return addVV_g(z, x, y)
    12  }
    13  
    14  func subVV(z, x, y []Word) (c Word) {
    15  	return subVV_g(z, x, y)
    16  }
    17  
    18  func addVW(z, x []Word, y Word) (c Word) {
    19  	// TODO: remove indirect function call when golang.org/issue/30548 is fixed
    20  	fn := addVW_g
    21  	if len(z) > 32 {
    22  		fn = addVWlarge
    23  	}
    24  	return fn(z, x, y)
    25  }
    26  
    27  func subVW(z, x []Word, y Word) (c Word) {
    28  	// TODO: remove indirect function call when golang.org/issue/30548 is fixed
    29  	fn := subVW_g
    30  	if len(z) > 32 {
    31  		fn = subVWlarge
    32  	}
    33  	return fn(z, x, y)
    34  }
    35  
    36  func shlVU(z, x []Word, s uint) (c Word) {
    37  	return shlVU_g(z, x, s)
    38  }
    39  
    40  func shrVU(z, x []Word, s uint) (c Word) {
    41  	return shrVU_g(z, x, s)
    42  }
    43  
    44  func mulAddVWW(z, x []Word, y, r Word) (c Word) {
    45  	return mulAddVWW_g(z, x, y, r)
    46  }
    47  
    48  func addMulVVW(z, x []Word, y Word) (c Word) {
    49  	return addMulVVW_g(z, x, y)
    50  }