1# This file is generated from a similarly-named Perl script in the BoringSSL 2# source tree. Do not edit by hand. 3 4#if defined(__i386__) 5#if defined(BORINGSSL_PREFIX) 6#include <boringssl_prefix_symbols_asm.h> 7#endif 8.text 9.globl gcm_init_clmul 10.hidden gcm_init_clmul 11.type gcm_init_clmul,@function 12.align 16 13gcm_init_clmul: 14.L_gcm_init_clmul_begin: 15 movl 4(%esp),%edx 16 movl 8(%esp),%eax 17 call .L000pic 18.L000pic: 19 popl %ecx 20 leal .Lbswap-.L000pic(%ecx),%ecx 21 movdqu (%eax),%xmm2 22 pshufd $78,%xmm2,%xmm2 23 pshufd $255,%xmm2,%xmm4 24 movdqa %xmm2,%xmm3 25 psllq $1,%xmm2 26 pxor %xmm5,%xmm5 27 psrlq $63,%xmm3 28 pcmpgtd %xmm4,%xmm5 29 pslldq $8,%xmm3 30 por %xmm3,%xmm2 31 pand 16(%ecx),%xmm5 32 pxor %xmm5,%xmm2 33 movdqa %xmm2,%xmm0 34 movdqa %xmm0,%xmm1 35 pshufd $78,%xmm0,%xmm3 36 pshufd $78,%xmm2,%xmm4 37 pxor %xmm0,%xmm3 38 pxor %xmm2,%xmm4 39.byte 102,15,58,68,194,0 40.byte 102,15,58,68,202,17 41.byte 102,15,58,68,220,0 42 xorps %xmm0,%xmm3 43 xorps %xmm1,%xmm3 44 movdqa %xmm3,%xmm4 45 psrldq $8,%xmm3 46 pslldq $8,%xmm4 47 pxor %xmm3,%xmm1 48 pxor %xmm4,%xmm0 49 movdqa %xmm0,%xmm4 50 movdqa %xmm0,%xmm3 51 psllq $5,%xmm0 52 pxor %xmm0,%xmm3 53 psllq $1,%xmm0 54 pxor %xmm3,%xmm0 55 psllq $57,%xmm0 56 movdqa %xmm0,%xmm3 57 pslldq $8,%xmm0 58 psrldq $8,%xmm3 59 pxor %xmm4,%xmm0 60 pxor %xmm3,%xmm1 61 movdqa %xmm0,%xmm4 62 psrlq $1,%xmm0 63 pxor %xmm4,%xmm1 64 pxor %xmm0,%xmm4 65 psrlq $5,%xmm0 66 pxor %xmm4,%xmm0 67 psrlq $1,%xmm0 68 pxor %xmm1,%xmm0 69 pshufd $78,%xmm2,%xmm3 70 pshufd $78,%xmm0,%xmm4 71 pxor %xmm2,%xmm3 72 movdqu %xmm2,(%edx) 73 pxor %xmm0,%xmm4 74 movdqu %xmm0,16(%edx) 75.byte 102,15,58,15,227,8 76 movdqu %xmm4,32(%edx) 77 ret 78.size gcm_init_clmul,.-.L_gcm_init_clmul_begin 79.globl gcm_gmult_clmul 80.hidden gcm_gmult_clmul 81.type gcm_gmult_clmul,@function 82.align 16 83gcm_gmult_clmul: 84.L_gcm_gmult_clmul_begin: 85 movl 4(%esp),%eax 86 movl 8(%esp),%edx 87 call .L001pic 88.L001pic: 89 popl %ecx 90 leal .Lbswap-.L001pic(%ecx),%ecx 91 movdqu (%eax),%xmm0 92 movdqa (%ecx),%xmm5 93 movups (%edx),%xmm2 94.byte 102,15,56,0,197 95 movups 32(%edx),%xmm4 96 movdqa %xmm0,%xmm1 97 pshufd $78,%xmm0,%xmm3 98 pxor %xmm0,%xmm3 99.byte 102,15,58,68,194,0 100.byte 102,15,58,68,202,17 101.byte 102,15,58,68,220,0 102 xorps %xmm0,%xmm3 103 xorps %xmm1,%xmm3 104 movdqa %xmm3,%xmm4 105 psrldq $8,%xmm3 106 pslldq $8,%xmm4 107 pxor %xmm3,%xmm1 108 pxor %xmm4,%xmm0 109 movdqa %xmm0,%xmm4 110 movdqa %xmm0,%xmm3 111 psllq $5,%xmm0 112 pxor %xmm0,%xmm3 113 psllq $1,%xmm0 114 pxor %xmm3,%xmm0 115 psllq $57,%xmm0 116 movdqa %xmm0,%xmm3 117 pslldq $8,%xmm0 118 psrldq $8,%xmm3 119 pxor %xmm4,%xmm0 120 pxor %xmm3,%xmm1 121 movdqa %xmm0,%xmm4 122 psrlq $1,%xmm0 123 pxor %xmm4,%xmm1 124 pxor %xmm0,%xmm4 125 psrlq $5,%xmm0 126 pxor %xmm4,%xmm0 127 psrlq $1,%xmm0 128 pxor %xmm1,%xmm0 129.byte 102,15,56,0,197 130 movdqu %xmm0,(%eax) 131 ret 132.size gcm_gmult_clmul,.-.L_gcm_gmult_clmul_begin 133.globl gcm_ghash_clmul 134.hidden gcm_ghash_clmul 135.type gcm_ghash_clmul,@function 136.align 16 137gcm_ghash_clmul: 138.L_gcm_ghash_clmul_begin: 139 pushl %ebp 140 pushl %ebx 141 pushl %esi 142 pushl %edi 143 movl 20(%esp),%eax 144 movl 24(%esp),%edx 145 movl 28(%esp),%esi 146 movl 32(%esp),%ebx 147 call .L002pic 148.L002pic: 149 popl %ecx 150 leal .Lbswap-.L002pic(%ecx),%ecx 151 movdqu (%eax),%xmm0 152 movdqa (%ecx),%xmm5 153 movdqu (%edx),%xmm2 154.byte 102,15,56,0,197 155 subl $16,%ebx 156 jz .L003odd_tail 157 movdqu (%esi),%xmm3 158 movdqu 16(%esi),%xmm6 159.byte 102,15,56,0,221 160.byte 102,15,56,0,245 161 movdqu 32(%edx),%xmm5 162 pxor %xmm3,%xmm0 163 pshufd $78,%xmm6,%xmm3 164 movdqa %xmm6,%xmm7 165 pxor %xmm6,%xmm3 166 leal 32(%esi),%esi 167.byte 102,15,58,68,242,0 168.byte 102,15,58,68,250,17 169.byte 102,15,58,68,221,0 170 movups 16(%edx),%xmm2 171 nop 172 subl $32,%ebx 173 jbe .L004even_tail 174 jmp .L005mod_loop 175.align 32 176.L005mod_loop: 177 pshufd $78,%xmm0,%xmm4 178 movdqa %xmm0,%xmm1 179 pxor %xmm0,%xmm4 180 nop 181.byte 102,15,58,68,194,0 182.byte 102,15,58,68,202,17 183.byte 102,15,58,68,229,16 184 movups (%edx),%xmm2 185 xorps %xmm6,%xmm0 186 movdqa (%ecx),%xmm5 187 xorps %xmm7,%xmm1 188 movdqu (%esi),%xmm7 189 pxor %xmm0,%xmm3 190 movdqu 16(%esi),%xmm6 191 pxor %xmm1,%xmm3 192.byte 102,15,56,0,253 193 pxor %xmm3,%xmm4 194 movdqa %xmm4,%xmm3 195 psrldq $8,%xmm4 196 pslldq $8,%xmm3 197 pxor %xmm4,%xmm1 198 pxor %xmm3,%xmm0 199.byte 102,15,56,0,245 200 pxor %xmm7,%xmm1 201 movdqa %xmm6,%xmm7 202 movdqa %xmm0,%xmm4 203 movdqa %xmm0,%xmm3 204 psllq $5,%xmm0 205 pxor %xmm0,%xmm3 206 psllq $1,%xmm0 207 pxor %xmm3,%xmm0 208.byte 102,15,58,68,242,0 209 movups 32(%edx),%xmm5 210 psllq $57,%xmm0 211 movdqa %xmm0,%xmm3 212 pslldq $8,%xmm0 213 psrldq $8,%xmm3 214 pxor %xmm4,%xmm0 215 pxor %xmm3,%xmm1 216 pshufd $78,%xmm7,%xmm3 217 movdqa %xmm0,%xmm4 218 psrlq $1,%xmm0 219 pxor %xmm7,%xmm3 220 pxor %xmm4,%xmm1 221.byte 102,15,58,68,250,17 222 movups 16(%edx),%xmm2 223 pxor %xmm0,%xmm4 224 psrlq $5,%xmm0 225 pxor %xmm4,%xmm0 226 psrlq $1,%xmm0 227 pxor %xmm1,%xmm0 228.byte 102,15,58,68,221,0 229 leal 32(%esi),%esi 230 subl $32,%ebx 231 ja .L005mod_loop 232.L004even_tail: 233 pshufd $78,%xmm0,%xmm4 234 movdqa %xmm0,%xmm1 235 pxor %xmm0,%xmm4 236.byte 102,15,58,68,194,0 237.byte 102,15,58,68,202,17 238.byte 102,15,58,68,229,16 239 movdqa (%ecx),%xmm5 240 xorps %xmm6,%xmm0 241 xorps %xmm7,%xmm1 242 pxor %xmm0,%xmm3 243 pxor %xmm1,%xmm3 244 pxor %xmm3,%xmm4 245 movdqa %xmm4,%xmm3 246 psrldq $8,%xmm4 247 pslldq $8,%xmm3 248 pxor %xmm4,%xmm1 249 pxor %xmm3,%xmm0 250 movdqa %xmm0,%xmm4 251 movdqa %xmm0,%xmm3 252 psllq $5,%xmm0 253 pxor %xmm0,%xmm3 254 psllq $1,%xmm0 255 pxor %xmm3,%xmm0 256 psllq $57,%xmm0 257 movdqa %xmm0,%xmm3 258 pslldq $8,%xmm0 259 psrldq $8,%xmm3 260 pxor %xmm4,%xmm0 261 pxor %xmm3,%xmm1 262 movdqa %xmm0,%xmm4 263 psrlq $1,%xmm0 264 pxor %xmm4,%xmm1 265 pxor %xmm0,%xmm4 266 psrlq $5,%xmm0 267 pxor %xmm4,%xmm0 268 psrlq $1,%xmm0 269 pxor %xmm1,%xmm0 270 testl %ebx,%ebx 271 jnz .L006done 272 movups (%edx),%xmm2 273.L003odd_tail: 274 movdqu (%esi),%xmm3 275.byte 102,15,56,0,221 276 pxor %xmm3,%xmm0 277 movdqa %xmm0,%xmm1 278 pshufd $78,%xmm0,%xmm3 279 pshufd $78,%xmm2,%xmm4 280 pxor %xmm0,%xmm3 281 pxor %xmm2,%xmm4 282.byte 102,15,58,68,194,0 283.byte 102,15,58,68,202,17 284.byte 102,15,58,68,220,0 285 xorps %xmm0,%xmm3 286 xorps %xmm1,%xmm3 287 movdqa %xmm3,%xmm4 288 psrldq $8,%xmm3 289 pslldq $8,%xmm4 290 pxor %xmm3,%xmm1 291 pxor %xmm4,%xmm0 292 movdqa %xmm0,%xmm4 293 movdqa %xmm0,%xmm3 294 psllq $5,%xmm0 295 pxor %xmm0,%xmm3 296 psllq $1,%xmm0 297 pxor %xmm3,%xmm0 298 psllq $57,%xmm0 299 movdqa %xmm0,%xmm3 300 pslldq $8,%xmm0 301 psrldq $8,%xmm3 302 pxor %xmm4,%xmm0 303 pxor %xmm3,%xmm1 304 movdqa %xmm0,%xmm4 305 psrlq $1,%xmm0 306 pxor %xmm4,%xmm1 307 pxor %xmm0,%xmm4 308 psrlq $5,%xmm0 309 pxor %xmm4,%xmm0 310 psrlq $1,%xmm0 311 pxor %xmm1,%xmm0 312.L006done: 313.byte 102,15,56,0,197 314 movdqu %xmm0,(%eax) 315 popl %edi 316 popl %esi 317 popl %ebx 318 popl %ebp 319 ret 320.size gcm_ghash_clmul,.-.L_gcm_ghash_clmul_begin 321.align 64 322.Lbswap: 323.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 324.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194 325.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67 326.byte 82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112 327.byte 112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62 328.byte 0 329#endif 330.section .note.GNU-stack,"",@progbits 331