mirror of https://github.com/prometheus/prometheus
305 lines
4.2 KiB
ArmAsm
305 lines
4.2 KiB
ArmAsm
//+build !noasm
|
|
|
|
// Generated by PeachPy 0.2.0 from sip13.py
|
|
|
|
|
|
// func Sum64(k0 uint64, k1 uint64, p_base uintptr, p_len int64, p_cap int64) uint64
|
|
TEXT ·Sum64(SB),4,$0-48
|
|
MOVQ k0+0(FP), AX
|
|
MOVQ AX, CX
|
|
MOVQ k1+8(FP), BX
|
|
MOVQ BX, DX
|
|
MOVQ $8317987319222330741, DI
|
|
XORQ DI, AX
|
|
MOVQ $7237128888997146477, DI
|
|
XORQ DI, BX
|
|
MOVQ $7816392313619706465, DI
|
|
XORQ DI, CX
|
|
MOVQ $8387220255154660723, DI
|
|
XORQ DI, DX
|
|
MOVQ p_base+16(FP), DI
|
|
MOVQ p_len+24(FP), SI
|
|
MOVQ SI, BP
|
|
SHLQ $56, BP
|
|
CMPQ SI, $8
|
|
JLT loop_end
|
|
loop_begin:
|
|
MOVQ 0(DI), R8
|
|
XORQ R8, DX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
XORQ R8, AX
|
|
ADDQ $8, DI
|
|
SUBQ $8, SI
|
|
CMPQ SI, $8
|
|
JGE loop_begin
|
|
loop_end:
|
|
CMPQ SI, $0
|
|
JEQ sw0
|
|
CMPQ SI, $1
|
|
JEQ sw1
|
|
CMPQ SI, $2
|
|
JEQ sw2
|
|
CMPQ SI, $3
|
|
JEQ sw3
|
|
CMPQ SI, $4
|
|
JEQ sw4
|
|
CMPQ SI, $5
|
|
JEQ sw5
|
|
CMPQ SI, $6
|
|
JEQ sw6
|
|
MOVBQZX 6(DI), SI
|
|
SHLQ $48, SI
|
|
ORQ SI, BP
|
|
sw6:
|
|
MOVBQZX 5(DI), SI
|
|
SHLQ $40, SI
|
|
ORQ SI, BP
|
|
sw5:
|
|
MOVBQZX 4(DI), SI
|
|
SHLQ $32, SI
|
|
ORQ SI, BP
|
|
sw4:
|
|
MOVBQZX 3(DI), SI
|
|
SHLQ $24, SI
|
|
ORQ SI, BP
|
|
sw3:
|
|
MOVBQZX 2(DI), SI
|
|
SHLQ $16, SI
|
|
ORQ SI, BP
|
|
sw2:
|
|
MOVBQZX 1(DI), SI
|
|
SHLQ $8, SI
|
|
ORQ SI, BP
|
|
sw1:
|
|
MOVBQZX 0(DI), SI
|
|
SHLQ $0, SI
|
|
ORQ SI, BP
|
|
sw0:
|
|
XORQ BP, DX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
XORQ BP, AX
|
|
XORQ $255, CX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
XORQ BX, AX
|
|
XORQ DX, CX
|
|
XORQ CX, AX
|
|
MOVQ AX, ret+40(FP)
|
|
RET
|
|
|
|
// func Sum64Str(k0 uint64, k1 uint64, p_base uintptr, p_len int64) uint64
|
|
TEXT ·Sum64Str(SB),4,$0-40
|
|
MOVQ k0+0(FP), AX
|
|
MOVQ AX, CX
|
|
MOVQ k1+8(FP), BX
|
|
MOVQ BX, DX
|
|
MOVQ $8317987319222330741, DI
|
|
XORQ DI, AX
|
|
MOVQ $7237128888997146477, DI
|
|
XORQ DI, BX
|
|
MOVQ $7816392313619706465, DI
|
|
XORQ DI, CX
|
|
MOVQ $8387220255154660723, DI
|
|
XORQ DI, DX
|
|
MOVQ p_base+16(FP), DI
|
|
MOVQ p_len+24(FP), SI
|
|
MOVQ SI, BP
|
|
SHLQ $56, BP
|
|
CMPQ SI, $8
|
|
JLT loop_end
|
|
loop_begin:
|
|
MOVQ 0(DI), R8
|
|
XORQ R8, DX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
XORQ R8, AX
|
|
ADDQ $8, DI
|
|
SUBQ $8, SI
|
|
CMPQ SI, $8
|
|
JGE loop_begin
|
|
loop_end:
|
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Q AX, DX
|
|
ROLQ $32, CX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
ADDQ BX, AX
|
|
ADDQ DX, CX
|
|
ROLQ $13, BX
|
|
ROLQ $16, DX
|
|
XORQ AX, BX
|
|
XORQ CX, DX
|
|
ROLQ $32, AX
|
|
ADDQ BX, CX
|
|
ADDQ DX, AX
|
|
ROLQ $17, BX
|
|
ROLQ $21, DX
|
|
XORQ CX, BX
|
|
XORQ AX, DX
|
|
ROLQ $32, CX
|
|
XORQ BX, AX
|
|
XORQ DX, CX
|
|
XORQ CX, AX
|
|
MOVQ AX, ret+32(FP)
|
|
RET
|