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 GFp_gcm_init_clmul 10.hidden GFp_gcm_init_clmul 11.type GFp_gcm_init_clmul,@function 12.align 16 13GFp_gcm_init_clmul: 14.L_GFp_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 GFp_gcm_init_clmul,.-.L_GFp_gcm_init_clmul_begin 79.globl GFp_gcm_gmult_clmul 80.hidden GFp_gcm_gmult_clmul 81.type GFp_gcm_gmult_clmul,@function 82.align 16 83GFp_gcm_gmult_clmul: 84.L_GFp_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 GFp_gcm_gmult_clmul,.-.L_GFp_gcm_gmult_clmul_begin 133.globl GFp_gcm_ghash_clmul 134.hidden GFp_gcm_ghash_clmul 135.type GFp_gcm_ghash_clmul,@function 136.align 16 137GFp_gcm_ghash_clmul: 138.L_GFp_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 GFp_gcm_ghash_clmul,.-.L_GFp_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.align 64 326.L007rem_8bit: 327.value 0,450,900,582,1800,1738,1164,1358 328.value 3600,4050,3476,3158,2328,2266,2716,2910 329.value 7200,7650,8100,7782,6952,6890,6316,6510 330.value 4656,5106,4532,4214,5432,5370,5820,6014 331.value 14400,14722,15300,14854,16200,16010,15564,15630 332.value 13904,14226,13780,13334,12632,12442,13020,13086 333.value 9312,9634,10212,9766,9064,8874,8428,8494 334.value 10864,11186,10740,10294,11640,11450,12028,12094 335.value 28800,28994,29444,29382,30600,30282,29708,30158 336.value 32400,32594,32020,31958,31128,30810,31260,31710 337.value 27808,28002,28452,28390,27560,27242,26668,27118 338.value 25264,25458,24884,24822,26040,25722,26172,26622 339.value 18624,18690,19268,19078,20424,19978,19532,19854 340.value 18128,18194,17748,17558,16856,16410,16988,17310 341.value 21728,21794,22372,22182,21480,21034,20588,20910 342.value 23280,23346,22900,22710,24056,23610,24188,24510 343.value 57600,57538,57988,58182,58888,59338,58764,58446 344.value 61200,61138,60564,60758,59416,59866,60316,59998 345.value 64800,64738,65188,65382,64040,64490,63916,63598 346.value 62256,62194,61620,61814,62520,62970,63420,63102 347.value 55616,55426,56004,56070,56904,57226,56780,56334 348.value 55120,54930,54484,54550,53336,53658,54236,53790 349.value 50528,50338,50916,50982,49768,50090,49644,49198 350.value 52080,51890,51444,51510,52344,52666,53244,52798 351.value 37248,36930,37380,37830,38536,38730,38156,38094 352.value 40848,40530,39956,40406,39064,39258,39708,39646 353.value 36256,35938,36388,36838,35496,35690,35116,35054 354.value 33712,33394,32820,33270,33976,34170,34620,34558 355.value 43456,43010,43588,43910,44744,44810,44364,44174 356.value 42960,42514,42068,42390,41176,41242,41820,41630 357.value 46560,46114,46692,47014,45800,45866,45420,45230 358.value 48112,47666,47220,47542,48376,48442,49020,48830 359.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67 360.byte 82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112 361.byte 112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62 362.byte 0 363#endif 364.section .note.GNU-stack,"",@progbits 365