2019-08-14 09:00:39 +00:00
|
|
|
// Code generated by command: go run asm.go -out sip13_amd64.s. DO NOT EDIT.
|
2019-08-13 08:34:14 +00:00
|
|
|
|
2019-08-14 09:00:39 +00:00
|
|
|
#include "textflag.h"
|
2019-08-13 08:34:14 +00:00
|
|
|
|
2019-08-14 09:00:39 +00:00
|
|
|
// func Sum64(k0 uint64, k1 uint64, p []byte) uint64
|
|
|
|
TEXT ·Sum64(SB), NOSPLIT, $0-48
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ k0+0(FP), AX
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ AX, DX
|
|
|
|
MOVQ k1+8(FP), CX
|
|
|
|
MOVQ CX, BX
|
|
|
|
MOVQ $0x736f6d6570736575, BP
|
|
|
|
XORQ BP, AX
|
|
|
|
MOVQ $0x646f72616e646f6d, BP
|
|
|
|
XORQ BP, CX
|
|
|
|
MOVQ $0x6c7967656e657261, BP
|
|
|
|
XORQ BP, DX
|
|
|
|
MOVQ $0x7465646279746573, BP
|
|
|
|
XORQ BP, BX
|
|
|
|
MOVQ p_base+16(FP), BP
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ p_len+24(FP), SI
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ SI, DI
|
|
|
|
SHLQ $0x38, DI
|
|
|
|
CMPQ SI, $0x08
|
|
|
|
JL loop_end
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
loop_begin:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ (BP), R8
|
|
|
|
XORQ R8, BX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
|
|
|
ADDQ BX, AX
|
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
|
|
|
XORQ AX, BX
|
|
|
|
ROLQ $0x20, DX
|
|
|
|
XORQ R8, AX
|
|
|
|
ADDQ $0x08, BP
|
|
|
|
SUBQ $0x08, SI
|
|
|
|
CMPQ SI, $0x08
|
|
|
|
JGE loop_begin
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
loop_end:
|
2019-08-14 09:00:39 +00:00
|
|
|
CMPQ SI, $0x00
|
|
|
|
JE sw0
|
|
|
|
CMPQ SI, $0x01
|
|
|
|
JE sw1
|
|
|
|
CMPQ SI, $0x02
|
|
|
|
JE sw2
|
|
|
|
CMPQ SI, $0x03
|
|
|
|
JE sw3
|
|
|
|
CMPQ SI, $0x04
|
|
|
|
JE sw4
|
|
|
|
CMPQ SI, $0x05
|
|
|
|
JE sw5
|
|
|
|
CMPQ SI, $0x06
|
|
|
|
JE sw6
|
|
|
|
|
|
|
|
sw7:
|
|
|
|
MOVBQZX 6(BP), SI
|
|
|
|
SHLQ $0x30, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw6:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 5(BP), SI
|
|
|
|
SHLQ $0x28, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw5:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 4(BP), SI
|
|
|
|
SHLQ $0x20, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw4:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 3(BP), SI
|
|
|
|
SHLQ $0x18, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw3:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 2(BP), SI
|
|
|
|
SHLQ $0x10, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw2:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 1(BP), SI
|
|
|
|
SHLQ $0x08, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw1:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX (BP), SI
|
|
|
|
SHLQ $0x00, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw0:
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ DI, BX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
XORQ DI, AX
|
|
|
|
XORQ $0xff, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ DX, CX
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ AX, BX
|
|
|
|
ROLQ $0x20, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ CX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ BX, DX
|
|
|
|
XORQ DX, AX
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ AX, ret+40(FP)
|
|
|
|
RET
|
|
|
|
|
2019-08-14 09:00:39 +00:00
|
|
|
// func Sum64Str(k0 uint64, k1 uint64, p string) uint64
|
|
|
|
TEXT ·Sum64Str(SB), NOSPLIT, $0-40
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ k0+0(FP), AX
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ AX, DX
|
|
|
|
MOVQ k1+8(FP), CX
|
|
|
|
MOVQ CX, BX
|
|
|
|
MOVQ $0x736f6d6570736575, BP
|
|
|
|
XORQ BP, AX
|
|
|
|
MOVQ $0x646f72616e646f6d, BP
|
|
|
|
XORQ BP, CX
|
|
|
|
MOVQ $0x6c7967656e657261, BP
|
|
|
|
XORQ BP, DX
|
|
|
|
MOVQ $0x7465646279746573, BP
|
|
|
|
XORQ BP, BX
|
|
|
|
MOVQ p_base+16(FP), BP
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ p_len+24(FP), SI
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ SI, DI
|
|
|
|
SHLQ $0x38, DI
|
|
|
|
CMPQ SI, $0x08
|
|
|
|
JL loop_end
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
loop_begin:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVQ (BP), R8
|
|
|
|
XORQ R8, BX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
|
|
|
ADDQ BX, AX
|
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
|
|
|
XORQ AX, BX
|
|
|
|
ROLQ $0x20, DX
|
|
|
|
XORQ R8, AX
|
|
|
|
ADDQ $0x08, BP
|
|
|
|
SUBQ $0x08, SI
|
|
|
|
CMPQ SI, $0x08
|
|
|
|
JGE loop_begin
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
loop_end:
|
2019-08-14 09:00:39 +00:00
|
|
|
CMPQ SI, $0x00
|
|
|
|
JE sw0
|
|
|
|
CMPQ SI, $0x01
|
|
|
|
JE sw1
|
|
|
|
CMPQ SI, $0x02
|
|
|
|
JE sw2
|
|
|
|
CMPQ SI, $0x03
|
|
|
|
JE sw3
|
|
|
|
CMPQ SI, $0x04
|
|
|
|
JE sw4
|
|
|
|
CMPQ SI, $0x05
|
|
|
|
JE sw5
|
|
|
|
CMPQ SI, $0x06
|
|
|
|
JE sw6
|
|
|
|
|
|
|
|
sw7:
|
|
|
|
MOVBQZX 6(BP), SI
|
|
|
|
SHLQ $0x30, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw6:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 5(BP), SI
|
|
|
|
SHLQ $0x28, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw5:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 4(BP), SI
|
|
|
|
SHLQ $0x20, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw4:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 3(BP), SI
|
|
|
|
SHLQ $0x18, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw3:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 2(BP), SI
|
|
|
|
SHLQ $0x10, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw2:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX 1(BP), SI
|
|
|
|
SHLQ $0x08, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw1:
|
2019-08-14 09:00:39 +00:00
|
|
|
MOVBQZX (BP), SI
|
|
|
|
SHLQ $0x00, SI
|
|
|
|
ORQ SI, DI
|
|
|
|
|
2019-08-13 08:34:14 +00:00
|
|
|
sw0:
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ DI, BX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
XORQ DI, AX
|
|
|
|
XORQ $0xff, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
|
|
|
XORQ DX, CX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ AX, BX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x20, DX
|
|
|
|
ADDQ CX, AX
|
|
|
|
ADDQ BX, DX
|
|
|
|
ROLQ $0x0d, CX
|
|
|
|
ROLQ $0x10, BX
|
|
|
|
XORQ AX, CX
|
|
|
|
XORQ DX, BX
|
|
|
|
ROLQ $0x20, AX
|
|
|
|
ADDQ CX, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
ADDQ BX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
ROLQ $0x11, CX
|
|
|
|
ROLQ $0x15, BX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ DX, CX
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ AX, BX
|
|
|
|
ROLQ $0x20, DX
|
2019-08-13 08:34:14 +00:00
|
|
|
XORQ CX, AX
|
2019-08-14 09:00:39 +00:00
|
|
|
XORQ BX, DX
|
|
|
|
XORQ DX, AX
|
2019-08-13 08:34:14 +00:00
|
|
|
MOVQ AX, ret+32(FP)
|
|
|
|
RET
|