Source file src/math/big/arith_decl_pure.go

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

View as plain text