Skip to content

Commit 6a1a95e

Browse files
committed
Add arm64 to GOARCH switches
1 parent 453214e commit 6a1a95e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

find_match_length.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func findMatchLengthWithLimit(s1 []byte, s2 []byte, limit uint) uint {
1717
var matched uint = 0
1818
_, _ = s1[limit-1], s2[limit-1] // bounds check
1919
switch runtime.GOARCH {
20-
case "amd64":
20+
case "amd64", "arm64":
2121
// Compare 8 bytes at at time.
2222
for matched+8 <= limit {
2323
w1 := binary.LittleEndian.Uint64(s1[matched:])

matchfinder/m4.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ const hashMul64 = 0x1E35A7BD1E35A7BD
261261
// 0 <= i && i < j && j <= len(src)
262262
func extendMatch(src []byte, i, j int) int {
263263
switch runtime.GOARCH {
264-
case "amd64":
264+
case "amd64", "arm64":
265265
// As long as we are 8 or more bytes before the end of src, we can load and
266266
// compare 8 bytes at a time. If those 8 bytes are equal, repeat.
267267
for j+8 < len(src) {

0 commit comments

Comments
 (0)