bits_go1.13.go 501 B

12345678910111213141516171819202122
  1. // Copyright 2019 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. //go:build go1.13
  5. // +build go1.13
  6. package poly1305
  7. import "math/bits"
  8. func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
  9. return bits.Add64(x, y, carry)
  10. }
  11. func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
  12. return bits.Sub64(x, y, borrow)
  13. }
  14. func bitsMul64(x, y uint64) (hi, lo uint64) {
  15. return bits.Mul64(x, y)
  16. }