Debian Codegraph @

utils/xor/xor_ppc64x.go

raw symbols SCIP
1 // Copyright 2018 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 ppc64 || ppc64le
6
7 // Package xor provides utility functions used by other Pion
8 // packages. PPC64 arch.
9 package xor
10
11 // XorBytes xors the bytes in a and b. The destination should have enough
12 // space, otherwise xorBytes will panic. Returns the number of bytes xor'd.
13 //revive:disable-next-line
14 func XorBytes(dst, a, b []byte) int {
15 n := len(a)
16 if len(b) < n {
17 n = len(b)
18 }
19 if n == 0 {
20 return 0
21 }
22 _ = dst[n-1]
23 xorBytesVSX(&dst[0], &a[0], &b[0], n)
24 return n
25 }
26
27 //go:noescape
28 func xorBytesVSX(dst, a, b *byte, n int)