summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/i386/rc5-586.s
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/i386/rc5-586.s')
-rw-r--r--secure/lib/libcrypto/i386/rc5-586.s97
1 files changed, 46 insertions, 51 deletions
diff --git a/secure/lib/libcrypto/i386/rc5-586.s b/secure/lib/libcrypto/i386/rc5-586.s
index 1a4c9d3..a33eff9 100644
--- a/secure/lib/libcrypto/i386/rc5-586.s
+++ b/secure/lib/libcrypto/i386/rc5-586.s
@@ -1,9 +1,9 @@
# $FreeBSD$
- # Dont even think of reading this code
- # It was automatically generated by rc5-586.pl
- # Which is a perl program used to generate the x86 assember for
- # any of elf, a.out, BSDI, Win32, gaswin (for GNU as on Win32) or Solaris
- # eric <eay@cryptsoft.com>
+
+
+
+
+
.file "rc5-586.s"
.version "01.01"
@@ -19,7 +19,7 @@ RC5_32_encrypt:
pushl %edi
movl 16(%esp), %edx
movl 20(%esp), %ebp
- # Load the 2 words
+
movl (%edx), %edi
movl 4(%edx), %esi
pushl %ebx
@@ -212,7 +212,7 @@ RC5_32_decrypt:
pushl %edi
movl 16(%esp), %edx
movl 20(%esp), %ebp
- # Load the 2 words
+
movl (%edx), %edi
movl 4(%edx), %esi
pushl %ebx
@@ -407,7 +407,7 @@ RC5_32_cbc_encrypt:
pushl %esi
pushl %edi
movl 28(%esp), %ebp
- # getting iv ptr from parameter 4
+
movl 36(%esp), %ebx
movl (%ebx), %esi
movl 4(%ebx), %edi
@@ -418,9 +418,9 @@ RC5_32_cbc_encrypt:
movl %esp, %ebx
movl 36(%esp), %esi
movl 40(%esp), %edi
- # getting encrypt flag from parameter 5
+
movl 56(%esp), %ecx
- # get and push parameter 3
+
movl 48(%esp), %eax
pushl %eax
pushl %ebx
@@ -450,28 +450,33 @@ RC5_32_cbc_encrypt:
movl 52(%esp), %ebp
andl $7, %ebp
jz .L007finish
+ call .L008PIC_point
+.L008PIC_point:
+ popl %edx
+ leal .L009cbc_enc_jmp_table-.L008PIC_point(%edx),%ecx
+ movl (%ecx,%ebp,4), %ebp
+ addl %edx, %ebp
xorl %ecx, %ecx
xorl %edx, %edx
- movl .L008cbc_enc_jmp_table(,%ebp,4),%ebp
jmp *%ebp
-.L009ej7:
+.L010ej7:
movb 6(%esi), %dh
sall $8, %edx
-.L010ej6:
+.L011ej6:
movb 5(%esi), %dh
-.L011ej5:
+.L012ej5:
movb 4(%esi), %dl
-.L012ej4:
+.L013ej4:
movl (%esi), %ecx
- jmp .L013ejend
-.L014ej3:
+ jmp .L014ejend
+.L015ej3:
movb 2(%esi), %ch
sall $8, %ecx
-.L015ej2:
+.L016ej2:
movb 1(%esi), %ch
-.L016ej1:
+.L017ej1:
movb (%esi), %cl
-.L013ejend:
+.L014ejend:
xorl %ecx, %eax
xorl %edx, %ebx
movl %eax, 8(%esp)
@@ -487,8 +492,8 @@ RC5_32_cbc_encrypt:
andl $4294967288, %ebp
movl 16(%esp), %eax
movl 20(%esp), %ebx
- jz .L017decrypt_finish
-.L018decrypt_loop:
+ jz .L018decrypt_finish
+.L019decrypt_loop:
movl (%esi), %eax
movl 4(%esi), %ebx
movl %eax, 8(%esp)
@@ -509,8 +514,8 @@ RC5_32_cbc_encrypt:
addl $8, %esi
addl $8, %edi
subl $8, %ebp
- jnz .L018decrypt_loop
-.L017decrypt_finish:
+ jnz .L019decrypt_loop
+.L018decrypt_finish:
movl 52(%esp), %ebp
andl $7, %ebp
jz .L007finish
@@ -527,26 +532,26 @@ RC5_32_cbc_encrypt:
xorl %ebx, %edx
movl (%esi), %eax
movl 4(%esi), %ebx
-.L019dj7:
+.L020dj7:
rorl $16, %edx
movb %dl, 6(%edi)
shrl $16, %edx
-.L020dj6:
+.L021dj6:
movb %dh, 5(%edi)
-.L021dj5:
+.L022dj5:
movb %dl, 4(%edi)
-.L022dj4:
+.L023dj4:
movl %ecx, (%edi)
- jmp .L023djend
-.L024dj3:
+ jmp .L024djend
+.L025dj3:
rorl $16, %ecx
movb %cl, 2(%edi)
sall $16, %ecx
-.L025dj2:
+.L026dj2:
movb %ch, 1(%esi)
-.L026dj1:
+.L027dj1:
movb %cl, (%esi)
-.L023djend:
+.L024djend:
jmp .L007finish
.align 16
.L007finish:
@@ -560,25 +565,15 @@ RC5_32_cbc_encrypt:
popl %ebp
ret
.align 16
-.L008cbc_enc_jmp_table:
- .long 0
- .long .L016ej1
- .long .L015ej2
- .long .L014ej3
- .long .L012ej4
- .long .L011ej5
- .long .L010ej6
- .long .L009ej7
-.align 16
-.L027cbc_dec_jmp_table:
+.L009cbc_enc_jmp_table:
.long 0
- .long .L026dj1
- .long .L025dj2
- .long .L024dj3
- .long .L022dj4
- .long .L021dj5
- .long .L020dj6
- .long .L019dj7
+ .long .L017ej1-.L008PIC_point
+ .long .L016ej2-.L008PIC_point
+ .long .L015ej3-.L008PIC_point
+ .long .L013ej4-.L008PIC_point
+ .long .L012ej5-.L008PIC_point
+ .long .L011ej6-.L008PIC_point
+ .long .L010ej7-.L008PIC_point
.L_RC5_32_cbc_encrypt_end:
.size RC5_32_cbc_encrypt,.L_RC5_32_cbc_encrypt_end-RC5_32_cbc_encrypt
.ident "desasm.pl"
OpenPOWER on IntegriCloud