-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build tags for more platforms
- Loading branch information
Showing
13 changed files
with
72 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
package reedsolomon | ||
|
||
const pshufb = true | ||
|
||
//go:noescape | ||
func galMulSSSE3(low, high, in, out []byte) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//go:build !noasm && !appengine && !gccgo | ||
|
||
package reedsolomon | ||
|
||
//go:noescape | ||
func xorSliceNEON(in, out []byte) | ||
|
||
// simple slice xor | ||
func sliceXor(in, out []byte, o *options) { | ||
xorSliceNEON(in, out) | ||
done := (len(in) >> 5) << 5 | ||
|
||
remain := len(in) - done | ||
if remain > 0 { | ||
for i := done; i < len(in); i++ { | ||
out[i] ^= in[i] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//+build !noasm | ||
//+build !appengine | ||
//+build !gccgo | ||
|
||
// func xorSliceNEON(in, out []byte) | ||
TEXT ·xorSliceNEON(SB), 7, $0 | ||
MOVD in_base+0(FP), R1 | ||
MOVD in_len+8(FP), R2 // length of message | ||
MOVD out_base+24(FP), R5 | ||
SUBS $32, R2 | ||
BMI completeXor | ||
|
||
loopXor: | ||
// Main loop | ||
VLD1.P 32(R1), [V0.B16, V1.B16] | ||
VLD1 (R5), [V20.B16, V21.B16] | ||
|
||
VEOR V20.B16, V0.B16, V4.B16 | ||
VEOR V21.B16, V1.B16, V5.B16 | ||
|
||
// Store result | ||
VST1.P [V4.D2, V5.D2], 32(R5) | ||
|
||
SUBS $32, R2 | ||
BPL loopXor | ||
|
||
completeXor: | ||
RET | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build noasm || gccgo || appengine || (ppc64le && nopshufb) | ||
|
||
package reedsolomon | ||
|
||
func sliceXor(in, out []byte, o *options) { | ||
sliceXorGo(in, out, o) | ||
} |