1// Copyright 2012 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// This code was translated into a form compatible with 6a from the public 6// domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html 7 8// +build amd64,!gccgo,!appengine 9 10// func square(out, in *[5]uint64) 11TEXT ·square(SB),7,$96-16 12 MOVQ out+0(FP), DI 13 MOVQ in+8(FP), SI 14 15 MOVQ SP,R11 16 MOVQ $31,CX 17 NOTQ CX 18 ANDQ CX,SP 19 ADDQ $32, SP 20 21 MOVQ R11,0(SP) 22 MOVQ R12,8(SP) 23 MOVQ R13,16(SP) 24 MOVQ R14,24(SP) 25 MOVQ R15,32(SP) 26 MOVQ BX,40(SP) 27 MOVQ BP,48(SP) 28 MOVQ 0(SI),AX 29 MULQ 0(SI) 30 MOVQ AX,CX 31 MOVQ DX,R8 32 MOVQ 0(SI),AX 33 SHLQ $1,AX 34 MULQ 8(SI) 35 MOVQ AX,R9 36 MOVQ DX,R10 37 MOVQ 0(SI),AX 38 SHLQ $1,AX 39 MULQ 16(SI) 40 MOVQ AX,R11 41 MOVQ DX,R12 42 MOVQ 0(SI),AX 43 SHLQ $1,AX 44 MULQ 24(SI) 45 MOVQ AX,R13 46 MOVQ DX,R14 47 MOVQ 0(SI),AX 48 SHLQ $1,AX 49 MULQ 32(SI) 50 MOVQ AX,R15 51 MOVQ DX,BX 52 MOVQ 8(SI),AX 53 MULQ 8(SI) 54 ADDQ AX,R11 55 ADCQ DX,R12 56 MOVQ 8(SI),AX 57 SHLQ $1,AX 58 MULQ 16(SI) 59 ADDQ AX,R13 60 ADCQ DX,R14 61 MOVQ 8(SI),AX 62 SHLQ $1,AX 63 MULQ 24(SI) 64 ADDQ AX,R15 65 ADCQ DX,BX 66 MOVQ 8(SI),DX 67 IMUL3Q $38,DX,AX 68 MULQ 32(SI) 69 ADDQ AX,CX 70 ADCQ DX,R8 71 MOVQ 16(SI),AX 72 MULQ 16(SI) 73 ADDQ AX,R15 74 ADCQ DX,BX 75 MOVQ 16(SI),DX 76 IMUL3Q $38,DX,AX 77 MULQ 24(SI) 78 ADDQ AX,CX 79 ADCQ DX,R8 80 MOVQ 16(SI),DX 81 IMUL3Q $38,DX,AX 82 MULQ 32(SI) 83 ADDQ AX,R9 84 ADCQ DX,R10 85 MOVQ 24(SI),DX 86 IMUL3Q $19,DX,AX 87 MULQ 24(SI) 88 ADDQ AX,R9 89 ADCQ DX,R10 90 MOVQ 24(SI),DX 91 IMUL3Q $38,DX,AX 92 MULQ 32(SI) 93 ADDQ AX,R11 94 ADCQ DX,R12 95 MOVQ 32(SI),DX 96 IMUL3Q $19,DX,AX 97 MULQ 32(SI) 98 ADDQ AX,R13 99 ADCQ DX,R14 100 MOVQ ·REDMASK51(SB),SI 101 SHLQ $13,R8:CX 102 ANDQ SI,CX 103 SHLQ $13,R10:R9 104 ANDQ SI,R9 105 ADDQ R8,R9 106 SHLQ $13,R12:R11 107 ANDQ SI,R11 108 ADDQ R10,R11 109 SHLQ $13,R14:R13 110 ANDQ SI,R13 111 ADDQ R12,R13 112 SHLQ $13,BX:R15 113 ANDQ SI,R15 114 ADDQ R14,R15 115 IMUL3Q $19,BX,DX 116 ADDQ DX,CX 117 MOVQ CX,DX 118 SHRQ $51,DX 119 ADDQ R9,DX 120 ANDQ SI,CX 121 MOVQ DX,R8 122 SHRQ $51,DX 123 ADDQ R11,DX 124 ANDQ SI,R8 125 MOVQ DX,R9 126 SHRQ $51,DX 127 ADDQ R13,DX 128 ANDQ SI,R9 129 MOVQ DX,AX 130 SHRQ $51,DX 131 ADDQ R15,DX 132 ANDQ SI,AX 133 MOVQ DX,R10 134 SHRQ $51,DX 135 IMUL3Q $19,DX,DX 136 ADDQ DX,CX 137 ANDQ SI,R10 138 MOVQ CX,0(DI) 139 MOVQ R8,8(DI) 140 MOVQ R9,16(DI) 141 MOVQ AX,24(DI) 142 MOVQ R10,32(DI) 143 MOVQ 0(SP),R11 144 MOVQ 8(SP),R12 145 MOVQ 16(SP),R13 146 MOVQ 24(SP),R14 147 MOVQ 32(SP),R15 148 MOVQ 40(SP),BX 149 MOVQ 48(SP),BP 150 MOVQ R11,SP 151 MOVQ DI,AX 152 MOVQ SI,DX 153 RET 154