OLD | NEW |
(Empty) | |
| 1 #if defined(__i386__) |
| 2 .file "rc4-586.S" |
| 3 .text |
| 4 .globl _RC4 |
| 5 .align 4 |
| 6 _RC4: |
| 7 L_RC4_begin: |
| 8 pushl %ebp |
| 9 pushl %ebx |
| 10 pushl %esi |
| 11 pushl %edi |
| 12 movl 20(%esp),%edi |
| 13 movl 24(%esp),%edx |
| 14 movl 28(%esp),%esi |
| 15 movl 32(%esp),%ebp |
| 16 xorl %eax,%eax |
| 17 xorl %ebx,%ebx |
| 18 cmpl $0,%edx |
| 19 je L000abort |
| 20 movb (%edi),%al |
| 21 movb 4(%edi),%bl |
| 22 addl $8,%edi |
| 23 leal (%esi,%edx,1),%ecx |
| 24 subl %esi,%ebp |
| 25 movl %ecx,24(%esp) |
| 26 incb %al |
| 27 cmpl $-1,256(%edi) |
| 28 je L001RC4_CHAR |
| 29 movl (%edi,%eax,4),%ecx |
| 30 andl $-4,%edx |
| 31 jz L002loop1 |
| 32 movl %ebp,32(%esp) |
| 33 testl $-8,%edx |
| 34 jz L003go4loop4 |
| 35 call L004PIC_me_up |
| 36 L004PIC_me_up: |
| 37 popl %ebp |
| 38 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L004PIC_me_up(%ebp),%ebp |
| 39 btl $26,(%ebp) |
| 40 jnc L003go4loop4 |
| 41 movl 32(%esp),%ebp |
| 42 andl $-8,%edx |
| 43 leal -8(%esi,%edx,1),%edx |
| 44 movl %edx,-4(%edi) |
| 45 addb %cl,%bl |
| 46 movl (%edi,%ebx,4),%edx |
| 47 movl %ecx,(%edi,%ebx,4) |
| 48 movl %edx,(%edi,%eax,4) |
| 49 incl %eax |
| 50 addl %ecx,%edx |
| 51 movzbl %al,%eax |
| 52 movzbl %dl,%edx |
| 53 movq (%esi),%mm0 |
| 54 movl (%edi,%eax,4),%ecx |
| 55 movd (%edi,%edx,4),%mm2 |
| 56 jmp L005loop_mmx_enter |
| 57 .align 4,0x90 |
| 58 L006loop_mmx: |
| 59 addb %cl,%bl |
| 60 psllq $56,%mm1 |
| 61 movl (%edi,%ebx,4),%edx |
| 62 movl %ecx,(%edi,%ebx,4) |
| 63 movl %edx,(%edi,%eax,4) |
| 64 incl %eax |
| 65 addl %ecx,%edx |
| 66 movzbl %al,%eax |
| 67 movzbl %dl,%edx |
| 68 pxor %mm1,%mm2 |
| 69 movq (%esi),%mm0 |
| 70 movq %mm2,-8(%ebp,%esi,1) |
| 71 movl (%edi,%eax,4),%ecx |
| 72 movd (%edi,%edx,4),%mm2 |
| 73 L005loop_mmx_enter: |
| 74 addb %cl,%bl |
| 75 movl (%edi,%ebx,4),%edx |
| 76 movl %ecx,(%edi,%ebx,4) |
| 77 movl %edx,(%edi,%eax,4) |
| 78 incl %eax |
| 79 addl %ecx,%edx |
| 80 movzbl %al,%eax |
| 81 movzbl %dl,%edx |
| 82 pxor %mm0,%mm2 |
| 83 movl (%edi,%eax,4),%ecx |
| 84 movd (%edi,%edx,4),%mm1 |
| 85 addb %cl,%bl |
| 86 psllq $8,%mm1 |
| 87 movl (%edi,%ebx,4),%edx |
| 88 movl %ecx,(%edi,%ebx,4) |
| 89 movl %edx,(%edi,%eax,4) |
| 90 incl %eax |
| 91 addl %ecx,%edx |
| 92 movzbl %al,%eax |
| 93 movzbl %dl,%edx |
| 94 pxor %mm1,%mm2 |
| 95 movl (%edi,%eax,4),%ecx |
| 96 movd (%edi,%edx,4),%mm1 |
| 97 addb %cl,%bl |
| 98 psllq $16,%mm1 |
| 99 movl (%edi,%ebx,4),%edx |
| 100 movl %ecx,(%edi,%ebx,4) |
| 101 movl %edx,(%edi,%eax,4) |
| 102 incl %eax |
| 103 addl %ecx,%edx |
| 104 movzbl %al,%eax |
| 105 movzbl %dl,%edx |
| 106 pxor %mm1,%mm2 |
| 107 movl (%edi,%eax,4),%ecx |
| 108 movd (%edi,%edx,4),%mm1 |
| 109 addb %cl,%bl |
| 110 psllq $24,%mm1 |
| 111 movl (%edi,%ebx,4),%edx |
| 112 movl %ecx,(%edi,%ebx,4) |
| 113 movl %edx,(%edi,%eax,4) |
| 114 incl %eax |
| 115 addl %ecx,%edx |
| 116 movzbl %al,%eax |
| 117 movzbl %dl,%edx |
| 118 pxor %mm1,%mm2 |
| 119 movl (%edi,%eax,4),%ecx |
| 120 movd (%edi,%edx,4),%mm1 |
| 121 addb %cl,%bl |
| 122 psllq $32,%mm1 |
| 123 movl (%edi,%ebx,4),%edx |
| 124 movl %ecx,(%edi,%ebx,4) |
| 125 movl %edx,(%edi,%eax,4) |
| 126 incl %eax |
| 127 addl %ecx,%edx |
| 128 movzbl %al,%eax |
| 129 movzbl %dl,%edx |
| 130 pxor %mm1,%mm2 |
| 131 movl (%edi,%eax,4),%ecx |
| 132 movd (%edi,%edx,4),%mm1 |
| 133 addb %cl,%bl |
| 134 psllq $40,%mm1 |
| 135 movl (%edi,%ebx,4),%edx |
| 136 movl %ecx,(%edi,%ebx,4) |
| 137 movl %edx,(%edi,%eax,4) |
| 138 incl %eax |
| 139 addl %ecx,%edx |
| 140 movzbl %al,%eax |
| 141 movzbl %dl,%edx |
| 142 pxor %mm1,%mm2 |
| 143 movl (%edi,%eax,4),%ecx |
| 144 movd (%edi,%edx,4),%mm1 |
| 145 addb %cl,%bl |
| 146 psllq $48,%mm1 |
| 147 movl (%edi,%ebx,4),%edx |
| 148 movl %ecx,(%edi,%ebx,4) |
| 149 movl %edx,(%edi,%eax,4) |
| 150 incl %eax |
| 151 addl %ecx,%edx |
| 152 movzbl %al,%eax |
| 153 movzbl %dl,%edx |
| 154 pxor %mm1,%mm2 |
| 155 movl (%edi,%eax,4),%ecx |
| 156 movd (%edi,%edx,4),%mm1 |
| 157 movl %ebx,%edx |
| 158 xorl %ebx,%ebx |
| 159 movb %dl,%bl |
| 160 cmpl -4(%edi),%esi |
| 161 leal 8(%esi),%esi |
| 162 jb L006loop_mmx |
| 163 psllq $56,%mm1 |
| 164 pxor %mm1,%mm2 |
| 165 movq %mm2,-8(%ebp,%esi,1) |
| 166 emms |
| 167 cmpl 24(%esp),%esi |
| 168 je L007done |
| 169 jmp L002loop1 |
| 170 .align 4,0x90 |
| 171 L003go4loop4: |
| 172 leal -4(%esi,%edx,1),%edx |
| 173 movl %edx,28(%esp) |
| 174 L008loop4: |
| 175 addb %cl,%bl |
| 176 movl (%edi,%ebx,4),%edx |
| 177 movl %ecx,(%edi,%ebx,4) |
| 178 movl %edx,(%edi,%eax,4) |
| 179 addl %ecx,%edx |
| 180 incb %al |
| 181 andl $255,%edx |
| 182 movl (%edi,%eax,4),%ecx |
| 183 movl (%edi,%edx,4),%ebp |
| 184 addb %cl,%bl |
| 185 movl (%edi,%ebx,4),%edx |
| 186 movl %ecx,(%edi,%ebx,4) |
| 187 movl %edx,(%edi,%eax,4) |
| 188 addl %ecx,%edx |
| 189 incb %al |
| 190 andl $255,%edx |
| 191 rorl $8,%ebp |
| 192 movl (%edi,%eax,4),%ecx |
| 193 orl (%edi,%edx,4),%ebp |
| 194 addb %cl,%bl |
| 195 movl (%edi,%ebx,4),%edx |
| 196 movl %ecx,(%edi,%ebx,4) |
| 197 movl %edx,(%edi,%eax,4) |
| 198 addl %ecx,%edx |
| 199 incb %al |
| 200 andl $255,%edx |
| 201 rorl $8,%ebp |
| 202 movl (%edi,%eax,4),%ecx |
| 203 orl (%edi,%edx,4),%ebp |
| 204 addb %cl,%bl |
| 205 movl (%edi,%ebx,4),%edx |
| 206 movl %ecx,(%edi,%ebx,4) |
| 207 movl %edx,(%edi,%eax,4) |
| 208 addl %ecx,%edx |
| 209 incb %al |
| 210 andl $255,%edx |
| 211 rorl $8,%ebp |
| 212 movl 32(%esp),%ecx |
| 213 orl (%edi,%edx,4),%ebp |
| 214 rorl $8,%ebp |
| 215 xorl (%esi),%ebp |
| 216 cmpl 28(%esp),%esi |
| 217 movl %ebp,(%ecx,%esi,1) |
| 218 leal 4(%esi),%esi |
| 219 movl (%edi,%eax,4),%ecx |
| 220 jb L008loop4 |
| 221 cmpl 24(%esp),%esi |
| 222 je L007done |
| 223 movl 32(%esp),%ebp |
| 224 .align 4,0x90 |
| 225 L002loop1: |
| 226 addb %cl,%bl |
| 227 movl (%edi,%ebx,4),%edx |
| 228 movl %ecx,(%edi,%ebx,4) |
| 229 movl %edx,(%edi,%eax,4) |
| 230 addl %ecx,%edx |
| 231 incb %al |
| 232 andl $255,%edx |
| 233 movl (%edi,%edx,4),%edx |
| 234 xorb (%esi),%dl |
| 235 leal 1(%esi),%esi |
| 236 movl (%edi,%eax,4),%ecx |
| 237 cmpl 24(%esp),%esi |
| 238 movb %dl,-1(%ebp,%esi,1) |
| 239 jb L002loop1 |
| 240 jmp L007done |
| 241 .align 4,0x90 |
| 242 L001RC4_CHAR: |
| 243 movzbl (%edi,%eax,1),%ecx |
| 244 L009cloop1: |
| 245 addb %cl,%bl |
| 246 movzbl (%edi,%ebx,1),%edx |
| 247 movb %cl,(%edi,%ebx,1) |
| 248 movb %dl,(%edi,%eax,1) |
| 249 addb %cl,%dl |
| 250 movzbl (%edi,%edx,1),%edx |
| 251 addb $1,%al |
| 252 xorb (%esi),%dl |
| 253 leal 1(%esi),%esi |
| 254 movzbl (%edi,%eax,1),%ecx |
| 255 cmpl 24(%esp),%esi |
| 256 movb %dl,-1(%ebp,%esi,1) |
| 257 jb L009cloop1 |
| 258 L007done: |
| 259 decb %al |
| 260 movl %ebx,-4(%edi) |
| 261 movb %al,-8(%edi) |
| 262 L000abort: |
| 263 popl %edi |
| 264 popl %esi |
| 265 popl %ebx |
| 266 popl %ebp |
| 267 ret |
| 268 .globl _RC4_set_key |
| 269 .align 4 |
| 270 _RC4_set_key: |
| 271 L_RC4_set_key_begin: |
| 272 pushl %ebp |
| 273 pushl %ebx |
| 274 pushl %esi |
| 275 pushl %edi |
| 276 movl 20(%esp),%edi |
| 277 movl 24(%esp),%ebp |
| 278 movl 28(%esp),%esi |
| 279 call L010PIC_me_up |
| 280 L010PIC_me_up: |
| 281 popl %edx |
| 282 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%edx),%edx |
| 283 leal 8(%edi),%edi |
| 284 leal (%esi,%ebp,1),%esi |
| 285 negl %ebp |
| 286 xorl %eax,%eax |
| 287 movl %ebp,-4(%edi) |
| 288 btl $20,(%edx) |
| 289 jc L011c1stloop |
| 290 .align 4,0x90 |
| 291 L012w1stloop: |
| 292 movl %eax,(%edi,%eax,4) |
| 293 addb $1,%al |
| 294 jnc L012w1stloop |
| 295 xorl %ecx,%ecx |
| 296 xorl %edx,%edx |
| 297 .align 4,0x90 |
| 298 L013w2ndloop: |
| 299 movl (%edi,%ecx,4),%eax |
| 300 addb (%esi,%ebp,1),%dl |
| 301 addb %al,%dl |
| 302 addl $1,%ebp |
| 303 movl (%edi,%edx,4),%ebx |
| 304 jnz L014wnowrap |
| 305 movl -4(%edi),%ebp |
| 306 L014wnowrap: |
| 307 movl %eax,(%edi,%edx,4) |
| 308 movl %ebx,(%edi,%ecx,4) |
| 309 addb $1,%cl |
| 310 jnc L013w2ndloop |
| 311 jmp L015exit |
| 312 .align 4,0x90 |
| 313 L011c1stloop: |
| 314 movb %al,(%edi,%eax,1) |
| 315 addb $1,%al |
| 316 jnc L011c1stloop |
| 317 xorl %ecx,%ecx |
| 318 xorl %edx,%edx |
| 319 xorl %ebx,%ebx |
| 320 .align 4,0x90 |
| 321 L016c2ndloop: |
| 322 movb (%edi,%ecx,1),%al |
| 323 addb (%esi,%ebp,1),%dl |
| 324 addb %al,%dl |
| 325 addl $1,%ebp |
| 326 movb (%edi,%edx,1),%bl |
| 327 jnz L017cnowrap |
| 328 movl -4(%edi),%ebp |
| 329 L017cnowrap: |
| 330 movb %al,(%edi,%edx,1) |
| 331 movb %bl,(%edi,%ecx,1) |
| 332 addb $1,%cl |
| 333 jnc L016c2ndloop |
| 334 movl $-1,256(%edi) |
| 335 L015exit: |
| 336 xorl %eax,%eax |
| 337 movl %eax,-8(%edi) |
| 338 movl %eax,-4(%edi) |
| 339 popl %edi |
| 340 popl %esi |
| 341 popl %ebx |
| 342 popl %ebp |
| 343 ret |
| 344 .globl _RC4_options |
| 345 .align 4 |
| 346 _RC4_options: |
| 347 L_RC4_options_begin: |
| 348 call L018pic_point |
| 349 L018pic_point: |
| 350 popl %eax |
| 351 leal L019opts-L018pic_point(%eax),%eax |
| 352 call L020PIC_me_up |
| 353 L020PIC_me_up: |
| 354 popl %edx |
| 355 movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L020PIC_me_up(%edx),%edx |
| 356 movl (%edx),%edx |
| 357 btl $20,%edx |
| 358 jc L0211xchar |
| 359 btl $26,%edx |
| 360 jnc L022ret |
| 361 addl $25,%eax |
| 362 ret |
| 363 L0211xchar: |
| 364 addl $12,%eax |
| 365 L022ret: |
| 366 ret |
| 367 .align 6,0x90 |
| 368 L019opts: |
| 369 .byte 114,99,52,40,52,120,44,105,110,116,41,0 |
| 370 .byte 114,99,52,40,49,120,44,99,104,97,114,41,0 |
| 371 .byte 114,99,52,40,56,120,44,109,109,120,41,0 |
| 372 .byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89 |
| 373 .byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 |
| 374 .byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 |
| 375 .align 6,0x90 |
| 376 .section __IMPORT,__pointers,non_lazy_symbol_pointers |
| 377 L_OPENSSL_ia32cap_P$non_lazy_ptr: |
| 378 .indirect_symbol _OPENSSL_ia32cap_P |
| 379 .long 0 |
| 380 #endif |
OLD | NEW |