diff --git a/transport/internet/kcp/xor.go b/transport/internet/kcp/xor.go index 6de9d295..b9f39f2b 100644 --- a/transport/internet/kcp/xor.go +++ b/transport/internet/kcp/xor.go @@ -1,5 +1,3 @@ -// +build !amd64 - package kcp // xorfwd performs XOR forwards in words, x[i] ^= x[i-4], i from 0 to len diff --git a/transport/internet/kcp/xor_amd64.go b/transport/internet/kcp/xor_amd64.go deleted file mode 100644 index 40d6a1be..00000000 --- a/transport/internet/kcp/xor_amd64.go +++ /dev/null @@ -1,4 +0,0 @@ -package kcp - -func xorfwd(x []byte) -func xorbkd(x []byte) diff --git a/transport/internet/kcp/xor_amd64.s b/transport/internet/kcp/xor_amd64.s deleted file mode 100644 index 0c2759d7..00000000 --- a/transport/internet/kcp/xor_amd64.s +++ /dev/null @@ -1,47 +0,0 @@ -#include "textflag.h" - -// func xorfwd(x []byte) -TEXT ·xorfwd(SB),NOSPLIT,$0 - MOVQ x+0(FP), SI // x[i] - MOVQ x_len+8(FP), CX // x.len - MOVQ x+0(FP), DI - ADDQ $4, DI // x[i+4] - SUBQ $4, CX -xorfwdloop: - MOVL (SI), AX - XORL AX, (DI) - ADDQ $4, SI - ADDQ $4, DI - SUBQ $4, CX - - CMPL CX, $0 - JE xorfwddone - - JMP xorfwdloop -xorfwddone: - RET - -// func xorbkd(x []byte) -TEXT ·xorbkd(SB),NOSPLIT,$0 - MOVQ x+0(FP), SI - MOVQ x_len+8(FP), CX // x.len - MOVQ x+0(FP), DI - ADDQ CX, SI // x[-8] - SUBQ $8, SI - ADDQ CX, DI // x[-4] - SUBQ $4, DI - SUBQ $4, CX -xorbkdloop: - MOVL (SI), AX - XORL AX, (DI) - SUBQ $4, SI - SUBQ $4, DI - SUBQ $4, CX - - CMPL CX, $0 - JE xorbkddone - - JMP xorbkdloop - -xorbkddone: - RET