svn commit: r299389 - in head/secure/lib/libcrypto: . i386
Jung-uk Kim
jkim at FreeBSD.org
Tue May 10 20:31:10 UTC 2016
Author: jkim
Date: Tue May 10 20:31:09 2016
New Revision: 299389
URL: https://svnweb.freebsd.org/changeset/base/299389
Log:
Make libcrypto.so position independent on i386.
Added:
head/secure/lib/libcrypto/i386/aes-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/aes-586.s
head/secure/lib/libcrypto/i386/aesni-x86.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/aesni-x86.s
head/secure/lib/libcrypto/i386/bf-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/bf-586.s
head/secure/lib/libcrypto/i386/bf-686.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/bf-686.s
head/secure/lib/libcrypto/i386/bn-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/bn-586.s
head/secure/lib/libcrypto/i386/cmll-x86.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/cmll-x86.s
head/secure/lib/libcrypto/i386/co-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/co-586.s
head/secure/lib/libcrypto/i386/crypt586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/crypt586.s
head/secure/lib/libcrypto/i386/des-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/des-586.s
head/secure/lib/libcrypto/i386/ghash-x86.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/ghash-x86.s
head/secure/lib/libcrypto/i386/md5-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/md5-586.s
head/secure/lib/libcrypto/i386/rc4-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/rc4-586.s
head/secure/lib/libcrypto/i386/rc5-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/rc5-586.s
head/secure/lib/libcrypto/i386/rmd-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/rmd-586.s
head/secure/lib/libcrypto/i386/sha1-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/sha1-586.s
head/secure/lib/libcrypto/i386/sha256-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/sha256-586.s
head/secure/lib/libcrypto/i386/sha512-586.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/sha512-586.s
head/secure/lib/libcrypto/i386/vpaes-x86.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/vpaes-x86.s
head/secure/lib/libcrypto/i386/wp-mmx.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/wp-mmx.s
head/secure/lib/libcrypto/i386/x86-gf2m.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/x86-gf2m.s
head/secure/lib/libcrypto/i386/x86-mont.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/x86-mont.s
head/secure/lib/libcrypto/i386/x86cpuid.S
- copied, changed from r299388, head/secure/lib/libcrypto/i386/x86cpuid.s
Deleted:
head/secure/lib/libcrypto/i386/aes-586.s
head/secure/lib/libcrypto/i386/aesni-x86.s
head/secure/lib/libcrypto/i386/bf-586.s
head/secure/lib/libcrypto/i386/bf-686.s
head/secure/lib/libcrypto/i386/bn-586.s
head/secure/lib/libcrypto/i386/cmll-x86.s
head/secure/lib/libcrypto/i386/co-586.s
head/secure/lib/libcrypto/i386/crypt586.s
head/secure/lib/libcrypto/i386/des-586.s
head/secure/lib/libcrypto/i386/ghash-x86.s
head/secure/lib/libcrypto/i386/md5-586.s
head/secure/lib/libcrypto/i386/rc4-586.s
head/secure/lib/libcrypto/i386/rc5-586.s
head/secure/lib/libcrypto/i386/rmd-586.s
head/secure/lib/libcrypto/i386/sha1-586.s
head/secure/lib/libcrypto/i386/sha256-586.s
head/secure/lib/libcrypto/i386/sha512-586.s
head/secure/lib/libcrypto/i386/vpaes-x86.s
head/secure/lib/libcrypto/i386/wp-mmx.s
head/secure/lib/libcrypto/i386/x86-gf2m.s
head/secure/lib/libcrypto/i386/x86-mont.s
head/secure/lib/libcrypto/i386/x86cpuid.s
Modified:
head/secure/lib/libcrypto/Makefile
head/secure/lib/libcrypto/Makefile.asm
Modified: head/secure/lib/libcrypto/Makefile
==============================================================================
--- head/secure/lib/libcrypto/Makefile Tue May 10 20:25:49 2016 (r299388)
+++ head/secure/lib/libcrypto/Makefile Tue May 10 20:31:09 2016 (r299389)
@@ -26,7 +26,7 @@ SRCS= cpt_err.c cryptlib.c cversion.c ex
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= x86_64cpuid.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= x86cpuid.s
+SRCS+= x86cpuid.S
.else
SRCS+= mem_clr.c
.endif
@@ -38,7 +38,7 @@ SRCS+= aes_cfb.c aes_ctr.c aes_ecb.c aes
SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \
aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= aes-586.s aesni-x86.s vpaes-x86.s
+SRCS+= aes-586.S aesni-x86.S vpaes-x86.S
.else
SRCS+= aes_cbc.c aes_core.c
.endif
@@ -63,9 +63,9 @@ INCS+= asn1.h asn1_mac.h asn1t.h
SRCS+= bf_cfb64.c bf_ecb.c bf_ofb64.c bf_skey.c
.if ${MACHINE_CPUARCH} == "i386"
.if ${MACHINE_CPU:Mi686}
-SRCS+= bf-686.s
+SRCS+= bf-686.S
.else
-SRCS+= bf-586.s
+SRCS+= bf-586.S
.endif
.else
SRCS+= bf_enc.c
@@ -87,7 +87,7 @@ SRCS+= bn_add.c bn_blind.c bn_const.c bn
SRCS+= rsaz-avx2.S rsaz-x86_64.S rsaz_exp.c x86_64-gcc.c x86_64-gf2m.S \
x86_64-mont.S x86_64-mont5.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= bn-586.s co-586.s x86-gf2m.s x86-mont.s
+SRCS+= bn-586.S co-586.S x86-gf2m.S x86-mont.S
.else
SRCS+= bn_asm.c
.endif
@@ -102,7 +102,7 @@ SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= cmll_misc.c cmll-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= cmll-x86.s
+SRCS+= cmll-x86.S
.else
SRCS+= camellia.c cmll_cbc.c cmll_misc.c
.endif
@@ -137,7 +137,7 @@ SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c c
fcrypt.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c \
rand_key.c read2pwd.c rpc_enc.c set_key.c str2key.c xcbc_enc.c
.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= crypt586.s des-586.s
+SRCS+= crypt586.S des-586.S
.else
SRCS+= des_enc.c fcrypt_b.c
.endif
@@ -222,7 +222,7 @@ SRCS+= md5_dgst.c md5_one.c
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= md5-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= md5-586.s
+SRCS+= md5-586.S
.endif
INCS+= md5.h
@@ -236,7 +236,7 @@ SRCS+= cbc128.c ccm128.c cfb128.c ctr128
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= ghash-x86.s
+SRCS+= ghash-x86.S
.endif
INCS+= modes.h
@@ -282,7 +282,7 @@ SRCS+= rc4_utl.c
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= rc4-md5-x86_64.S rc4-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= rc4-586.s
+SRCS+= rc4-586.S
.else
SRCS+= rc4_enc.c rc4_skey.c
.endif
@@ -291,7 +291,7 @@ INCS+= rc4.h
# rc5
SRCS+= rc5_ecb.c rc5_skey.c rc5cfb64.c rc5ofb64.c
.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= rc5-586.s
+SRCS+= rc5-586.S
.else
SRCS+= rc5_enc.c
.endif
@@ -300,7 +300,7 @@ INCS+= rc5.h
# ripemd
SRCS+= rmd_dgst.c rmd_one.c
.if ${MACHINE_CPUARCH} == "i386"
-SRCS+= rmd-586.s
+SRCS+= rmd-586.S
.endif
INCS+= ripemd.h
@@ -321,7 +321,7 @@ SRCS+= sha1_one.c sha1dgst.c sha256.c sh
SRCS+= sha1-mb-x86_64.S sha1-x86_64.S sha256-mb-x86_64.S sha256-x86_64.S \
sha512-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= sha1-586.s sha256-586.s sha512-586.s
+SRCS+= sha1-586.S sha256-586.S sha512-586.S
.endif
INCS+= sha.h
@@ -352,7 +352,7 @@ SRCS+= wp_dgst.c
.if ${MACHINE_CPUARCH} == "amd64"
SRCS+= wp-x86_64.S
.elif ${MACHINE_CPUARCH} == "i386"
-SRCS+= wp-mmx.s wp_block.c
+SRCS+= wp-mmx.S wp_block.c
.else
SRCS+= wp_block.c
.endif
@@ -386,9 +386,6 @@ CFLAGS+= -I${LCRYPTO_SRC}/crypto/asn1
CFLAGS+= -I${LCRYPTO_SRC}/crypto/evp
CFLAGS+= -I${LCRYPTO_SRC}/crypto/modes
-.if !empty(SRCS:M*.s)
-AFLAGS+= --noexecstack
-.endif
.if !empty(SRCS:M*.S)
ACFLAGS+= -Wa,--noexecstack
.endif
Modified: head/secure/lib/libcrypto/Makefile.asm
==============================================================================
--- head/secure/lib/libcrypto/Makefile.asm Tue May 10 20:25:49 2016 (r299388)
+++ head/secure/lib/libcrypto/Makefile.asm Tue May 10 20:31:09 2016 (r299389)
@@ -1,8 +1,8 @@
# $FreeBSD$
-# Use this to help generate the asm *.[Ss] files after an import. It is not
+# Use this to help generate the asm *.S files after an import. It is not
# perfect by any means, but does what is needed.
-# Do a 'make -f Makefile.asm all' and it will generate *.s. Move them
-# to the i386 subdir, and correct any exposed paths and $ FreeBSD $ tags.
+# Do a 'make -f Makefile.asm all' and it will generate *.S. Move them
+# to the arch subdir, and correct any exposed paths and $ FreeBSD $ tags.
.include "Makefile.inc"
@@ -127,16 +127,21 @@ SRCS+= wp-mmx.pl
# cpuid
SRCS+= x86cpuid.pl
-ASM= ${SRCS:S/.pl/.s/}
+ASM= ${SRCS:S/.pl/.S/}
all: ${ASM}
-CLEANFILES+= ${SRCS:M*.pl:S/.pl$/.s/}
+CLEANFILES+= ${SRCS:M*.pl:S/.pl$/.S/}
.SUFFIXES: .pl
-.pl.s:
+.pl.S:
( echo ' # $$'FreeBSD'$$' ;\
- perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ) > ${.TARGET}
+ echo '#ifdef PIC' ;\
+ perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ;\
+ echo '#else' ;\
+ perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ;\
+ echo '#endif') |\
+ sed -E 's|(\.file[[:blank:]]+)".*"|\1"${.TARGET}"|' > ${.TARGET}
.endif
.include <bsd.prog.mk>
Copied and modified: head/secure/lib/libcrypto/i386/aes-586.S (from r299388, head/secure/lib/libcrypto/i386/aes-586.s)
==============================================================================
--- head/secure/lib/libcrypto/i386/aes-586.s Tue May 10 20:25:49 2016 (r299388, copy source)
+++ head/secure/lib/libcrypto/i386/aes-586.S Tue May 10 20:31:09 2016 (r299389)
@@ -1,5 +1,3251 @@
# $FreeBSD$
-.file "aes-586.s"
+#ifdef PIC
+.file "aes-586.S"
+.text
+.type _x86_AES_encrypt_compact, at function
+.align 16
+_x86_AES_encrypt_compact:
+ movl %edi,20(%esp)
+ xorl (%edi),%eax
+ xorl 4(%edi),%ebx
+ xorl 8(%edi),%ecx
+ xorl 12(%edi),%edx
+ movl 240(%edi),%esi
+ leal -2(%esi,%esi,1),%esi
+ leal (%edi,%esi,8),%esi
+ movl %esi,24(%esp)
+ movl -128(%ebp),%edi
+ movl -96(%ebp),%esi
+ movl -64(%ebp),%edi
+ movl -32(%ebp),%esi
+ movl (%ebp),%edi
+ movl 32(%ebp),%esi
+ movl 64(%ebp),%edi
+ movl 96(%ebp),%esi
+.align 16
+.L000loop:
+ movl %eax,%esi
+ andl $255,%esi
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %bh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %ecx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $24,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+ movl %esi,4(%esp)
+
+ movl %ebx,%esi
+ andl $255,%esi
+ shrl $16,%ebx
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %ch,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $24,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+ movl %esi,8(%esp)
+
+ movl %ecx,%esi
+ andl $255,%esi
+ shrl $24,%ecx
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %dh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $16,%edi
+ andl $255,%edx
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movzbl %bh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+
+ andl $255,%edx
+ movzbl -128(%ebp,%edx,1),%edx
+ movzbl %ah,%eax
+ movzbl -128(%ebp,%eax,1),%eax
+ shll $8,%eax
+ xorl %eax,%edx
+ movl 4(%esp),%eax
+ andl $255,%ebx
+ movzbl -128(%ebp,%ebx,1),%ebx
+ shll $16,%ebx
+ xorl %ebx,%edx
+ movl 8(%esp),%ebx
+ movzbl -128(%ebp,%ecx,1),%ecx
+ shll $24,%ecx
+ xorl %ecx,%edx
+ movl %esi,%ecx
+
+ movl $2155905152,%ebp
+ andl %ecx,%ebp
+ leal (%ecx,%ecx,1),%edi
+ movl %ebp,%esi
+ shrl $7,%ebp
+ andl $4278124286,%edi
+ subl %ebp,%esi
+ movl %ecx,%ebp
+ andl $454761243,%esi
+ rorl $16,%ebp
+ xorl %edi,%esi
+ movl %ecx,%edi
+ xorl %esi,%ecx
+ rorl $24,%edi
+ xorl %ebp,%esi
+ roll $24,%ecx
+ xorl %edi,%esi
+ movl $2155905152,%ebp
+ xorl %esi,%ecx
+ andl %edx,%ebp
+ leal (%edx,%edx,1),%edi
+ movl %ebp,%esi
+ shrl $7,%ebp
+ andl $4278124286,%edi
+ subl %ebp,%esi
+ movl %edx,%ebp
+ andl $454761243,%esi
+ rorl $16,%ebp
+ xorl %edi,%esi
+ movl %edx,%edi
+ xorl %esi,%edx
+ rorl $24,%edi
+ xorl %ebp,%esi
+ roll $24,%edx
+ xorl %edi,%esi
+ movl $2155905152,%ebp
+ xorl %esi,%edx
+ andl %eax,%ebp
+ leal (%eax,%eax,1),%edi
+ movl %ebp,%esi
+ shrl $7,%ebp
+ andl $4278124286,%edi
+ subl %ebp,%esi
+ movl %eax,%ebp
+ andl $454761243,%esi
+ rorl $16,%ebp
+ xorl %edi,%esi
+ movl %eax,%edi
+ xorl %esi,%eax
+ rorl $24,%edi
+ xorl %ebp,%esi
+ roll $24,%eax
+ xorl %edi,%esi
+ movl $2155905152,%ebp
+ xorl %esi,%eax
+ andl %ebx,%ebp
+ leal (%ebx,%ebx,1),%edi
+ movl %ebp,%esi
+ shrl $7,%ebp
+ andl $4278124286,%edi
+ subl %ebp,%esi
+ movl %ebx,%ebp
+ andl $454761243,%esi
+ rorl $16,%ebp
+ xorl %edi,%esi
+ movl %ebx,%edi
+ xorl %esi,%ebx
+ rorl $24,%edi
+ xorl %ebp,%esi
+ roll $24,%ebx
+ xorl %edi,%esi
+ xorl %esi,%ebx
+ movl 20(%esp),%edi
+ movl 28(%esp),%ebp
+ addl $16,%edi
+ xorl (%edi),%eax
+ xorl 4(%edi),%ebx
+ xorl 8(%edi),%ecx
+ xorl 12(%edi),%edx
+ cmpl 24(%esp),%edi
+ movl %edi,20(%esp)
+ jb .L000loop
+ movl %eax,%esi
+ andl $255,%esi
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %bh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %ecx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $24,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+ movl %esi,4(%esp)
+
+ movl %ebx,%esi
+ andl $255,%esi
+ shrl $16,%ebx
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %ch,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $24,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+ movl %esi,8(%esp)
+
+ movl %ecx,%esi
+ andl $255,%esi
+ shrl $24,%ecx
+ movzbl -128(%ebp,%esi,1),%esi
+ movzbl %dh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $8,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $16,%edi
+ andl $255,%edx
+ andl $255,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $16,%edi
+ xorl %edi,%esi
+ movzbl %bh,%edi
+ movzbl -128(%ebp,%edi,1),%edi
+ shll $24,%edi
+ xorl %edi,%esi
+
+ movl 20(%esp),%edi
+ andl $255,%edx
+ movzbl -128(%ebp,%edx,1),%edx
+ movzbl %ah,%eax
+ movzbl -128(%ebp,%eax,1),%eax
+ shll $8,%eax
+ xorl %eax,%edx
+ movl 4(%esp),%eax
+ andl $255,%ebx
+ movzbl -128(%ebp,%ebx,1),%ebx
+ shll $16,%ebx
+ xorl %ebx,%edx
+ movl 8(%esp),%ebx
+ movzbl -128(%ebp,%ecx,1),%ecx
+ shll $24,%ecx
+ xorl %ecx,%edx
+ movl %esi,%ecx
+
+ xorl 16(%edi),%eax
+ xorl 20(%edi),%ebx
+ xorl 24(%edi),%ecx
+ xorl 28(%edi),%edx
+ ret
+.size _x86_AES_encrypt_compact,.-_x86_AES_encrypt_compact
+.type _sse_AES_encrypt_compact, at function
+.align 16
+_sse_AES_encrypt_compact:
+ pxor (%edi),%mm0
+ pxor 8(%edi),%mm4
+ movl 240(%edi),%esi
+ leal -2(%esi,%esi,1),%esi
+ leal (%edi,%esi,8),%esi
+ movl %esi,24(%esp)
+ movl $454761243,%eax
+ movl %eax,8(%esp)
+ movl %eax,12(%esp)
+ movl -128(%ebp),%eax
+ movl -96(%ebp),%ebx
+ movl -64(%ebp),%ecx
+ movl -32(%ebp),%edx
+ movl (%ebp),%eax
+ movl 32(%ebp),%ebx
+ movl 64(%ebp),%ecx
+ movl 96(%ebp),%edx
+.align 16
+.L001loop:
+ pshufw $8,%mm0,%mm1
+ pshufw $13,%mm4,%mm5
+ movd %mm1,%eax
+ movd %mm5,%ebx
+ movl %edi,20(%esp)
+ movzbl %al,%esi
+ movzbl %ah,%edx
+ pshufw $13,%mm0,%mm2
+ movzbl -128(%ebp,%esi,1),%ecx
+ movzbl %bl,%edi
+ movzbl -128(%ebp,%edx,1),%edx
+ shrl $16,%eax
+ shll $8,%edx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bh,%edi
+ shll $16,%esi
+ pshufw $8,%mm4,%mm6
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %ah,%edi
+ shll $24,%esi
+ shrl $16,%ebx
+ orl %esi,%edx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bh,%edi
+ shll $8,%esi
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %al,%edi
+ shll $24,%esi
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bl,%edi
+ movd %mm2,%eax
+ movd %ecx,%mm0
+ movzbl -128(%ebp,%edi,1),%ecx
+ movzbl %ah,%edi
+ shll $16,%ecx
+ movd %mm6,%ebx
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bh,%edi
+ shll $24,%esi
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bl,%edi
+ shll $8,%esi
+ shrl $16,%ebx
+ orl %esi,%ecx
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %al,%edi
+ shrl $16,%eax
+ movd %ecx,%mm1
+ movzbl -128(%ebp,%edi,1),%ecx
+ movzbl %ah,%edi
+ shll $16,%ecx
+ andl $255,%eax
+ orl %esi,%ecx
+ punpckldq %mm1,%mm0
+ movzbl -128(%ebp,%edi,1),%esi
+ movzbl %bh,%edi
+ shll $24,%esi
+ andl $255,%ebx
+ movzbl -128(%ebp,%eax,1),%eax
+ orl %esi,%ecx
+ shll $16,%eax
+ movzbl -128(%ebp,%edi,1),%esi
+ orl %eax,%edx
+ shll $8,%esi
+ movzbl -128(%ebp,%ebx,1),%ebx
+ orl %esi,%ecx
+ orl %ebx,%edx
+ movl 20(%esp),%edi
+ movd %ecx,%mm4
+ movd %edx,%mm5
+ punpckldq %mm5,%mm4
+ addl $16,%edi
+ cmpl 24(%esp),%edi
+ ja .L002out
+ movq 8(%esp),%mm2
+ pxor %mm3,%mm3
+ pxor %mm7,%mm7
+ movq %mm0,%mm1
+ movq %mm4,%mm5
+ pcmpgtb %mm0,%mm3
+ pcmpgtb %mm4,%mm7
+ pand %mm2,%mm3
+ pand %mm2,%mm7
+ pshufw $177,%mm0,%mm2
+ pshufw $177,%mm4,%mm6
+ paddb %mm0,%mm0
+ paddb %mm4,%mm4
+ pxor %mm3,%mm0
+ pxor %mm7,%mm4
+ pshufw $177,%mm2,%mm3
+ pshufw $177,%mm6,%mm7
+ pxor %mm0,%mm1
+ pxor %mm4,%mm5
+ pxor %mm2,%mm0
+ pxor %mm6,%mm4
+ movq %mm3,%mm2
+ movq %mm7,%mm6
+ pslld $8,%mm3
+ pslld $8,%mm7
+ psrld $24,%mm2
+ psrld $24,%mm6
+ pxor %mm3,%mm0
+ pxor %mm7,%mm4
+ pxor %mm2,%mm0
+ pxor %mm6,%mm4
+ movq %mm1,%mm3
+ movq %mm5,%mm7
+ movq (%edi),%mm2
+ movq 8(%edi),%mm6
+ psrld $8,%mm1
+ psrld $8,%mm5
+ movl -128(%ebp),%eax
+ pslld $24,%mm3
+ pslld $24,%mm7
+ movl -64(%ebp),%ebx
+ pxor %mm1,%mm0
+ pxor %mm5,%mm4
+ movl (%ebp),%ecx
+ pxor %mm3,%mm0
+ pxor %mm7,%mm4
+ movl 64(%ebp),%edx
+ pxor %mm2,%mm0
+ pxor %mm6,%mm4
+ jmp .L001loop
+.align 16
+.L002out:
+ pxor (%edi),%mm0
+ pxor 8(%edi),%mm4
+ ret
+.size _sse_AES_encrypt_compact,.-_sse_AES_encrypt_compact
+.type _x86_AES_encrypt, at function
+.align 16
+_x86_AES_encrypt:
+ movl %edi,20(%esp)
+ xorl (%edi),%eax
+ xorl 4(%edi),%ebx
+ xorl 8(%edi),%ecx
+ xorl 12(%edi),%edx
+ movl 240(%edi),%esi
+ leal -2(%esi,%esi,1),%esi
+ leal (%edi,%esi,8),%esi
+ movl %esi,24(%esp)
+.align 16
+.L003loop:
+ movl %eax,%esi
+ andl $255,%esi
+ movl (%ebp,%esi,8),%esi
+ movzbl %bh,%edi
+ xorl 3(%ebp,%edi,8),%esi
+ movl %ecx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ xorl 2(%ebp,%edi,8),%esi
+ movl %edx,%edi
+ shrl $24,%edi
+ xorl 1(%ebp,%edi,8),%esi
+ movl %esi,4(%esp)
+
+ movl %ebx,%esi
+ andl $255,%esi
+ shrl $16,%ebx
+ movl (%ebp,%esi,8),%esi
+ movzbl %ch,%edi
+ xorl 3(%ebp,%edi,8),%esi
+ movl %edx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ xorl 2(%ebp,%edi,8),%esi
+ movl %eax,%edi
+ shrl $24,%edi
+ xorl 1(%ebp,%edi,8),%esi
+ movl %esi,8(%esp)
+
+ movl %ecx,%esi
+ andl $255,%esi
+ shrl $24,%ecx
+ movl (%ebp,%esi,8),%esi
+ movzbl %dh,%edi
+ xorl 3(%ebp,%edi,8),%esi
+ movl %eax,%edi
+ shrl $16,%edi
+ andl $255,%edx
+ andl $255,%edi
+ xorl 2(%ebp,%edi,8),%esi
+ movzbl %bh,%edi
+ xorl 1(%ebp,%edi,8),%esi
+
+ movl 20(%esp),%edi
+ movl (%ebp,%edx,8),%edx
+ movzbl %ah,%eax
+ xorl 3(%ebp,%eax,8),%edx
+ movl 4(%esp),%eax
+ andl $255,%ebx
+ xorl 2(%ebp,%ebx,8),%edx
+ movl 8(%esp),%ebx
+ xorl 1(%ebp,%ecx,8),%edx
+ movl %esi,%ecx
+
+ addl $16,%edi
+ xorl (%edi),%eax
+ xorl 4(%edi),%ebx
+ xorl 8(%edi),%ecx
+ xorl 12(%edi),%edx
+ cmpl 24(%esp),%edi
+ movl %edi,20(%esp)
+ jb .L003loop
+ movl %eax,%esi
+ andl $255,%esi
+ movl 2(%ebp,%esi,8),%esi
+ andl $255,%esi
+ movzbl %bh,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $65280,%edi
+ xorl %edi,%esi
+ movl %ecx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $16711680,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $24,%edi
+ movl 2(%ebp,%edi,8),%edi
+ andl $4278190080,%edi
+ xorl %edi,%esi
+ movl %esi,4(%esp)
+ movl %ebx,%esi
+ andl $255,%esi
+ shrl $16,%ebx
+ movl 2(%ebp,%esi,8),%esi
+ andl $255,%esi
+ movzbl %ch,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $65280,%edi
+ xorl %edi,%esi
+ movl %edx,%edi
+ shrl $16,%edi
+ andl $255,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $16711680,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $24,%edi
+ movl 2(%ebp,%edi,8),%edi
+ andl $4278190080,%edi
+ xorl %edi,%esi
+ movl %esi,8(%esp)
+ movl %ecx,%esi
+ andl $255,%esi
+ shrl $24,%ecx
+ movl 2(%ebp,%esi,8),%esi
+ andl $255,%esi
+ movzbl %dh,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $65280,%edi
+ xorl %edi,%esi
+ movl %eax,%edi
+ shrl $16,%edi
+ andl $255,%edx
+ andl $255,%edi
+ movl (%ebp,%edi,8),%edi
+ andl $16711680,%edi
+ xorl %edi,%esi
+ movzbl %bh,%edi
+ movl 2(%ebp,%edi,8),%edi
+ andl $4278190080,%edi
+ xorl %edi,%esi
+ movl 20(%esp),%edi
+ andl $255,%edx
+ movl 2(%ebp,%edx,8),%edx
+ andl $255,%edx
+ movzbl %ah,%eax
+ movl (%ebp,%eax,8),%eax
+ andl $65280,%eax
+ xorl %eax,%edx
+ movl 4(%esp),%eax
+ andl $255,%ebx
+ movl (%ebp,%ebx,8),%ebx
+ andl $16711680,%ebx
+ xorl %ebx,%edx
+ movl 8(%esp),%ebx
+ movl 2(%ebp,%ecx,8),%ecx
+ andl $4278190080,%ecx
+ xorl %ecx,%edx
+ movl %esi,%ecx
+ addl $16,%edi
+ xorl (%edi),%eax
+ xorl 4(%edi),%ebx
+ xorl 8(%edi),%ecx
+ xorl 12(%edi),%edx
+ ret
+.align 64
+.LAES_Te:
+.long 2774754246,2774754246
+.long 2222750968,2222750968
+.long 2574743534,2574743534
+.long 2373680118,2373680118
+.long 234025727,234025727
+.long 3177933782,3177933782
+.long 2976870366,2976870366
+.long 1422247313,1422247313
+.long 1345335392,1345335392
+.long 50397442,50397442
+.long 2842126286,2842126286
+.long 2099981142,2099981142
+.long 436141799,436141799
+.long 1658312629,1658312629
+.long 3870010189,3870010189
+.long 2591454956,2591454956
+.long 1170918031,1170918031
+.long 2642575903,2642575903
+.long 1086966153,1086966153
+.long 2273148410,2273148410
+.long 368769775,368769775
+.long 3948501426,3948501426
+.long 3376891790,3376891790
+.long 200339707,200339707
+.long 3970805057,3970805057
+.long 1742001331,1742001331
+.long 4255294047,4255294047
+.long 3937382213,3937382213
+.long 3214711843,3214711843
+.long 4154762323,4154762323
+.long 2524082916,2524082916
+.long 1539358875,1539358875
+.long 3266819957,3266819957
+.long 486407649,486407649
+.long 2928907069,2928907069
+.long 1780885068,1780885068
+.long 1513502316,1513502316
+.long 1094664062,1094664062
+.long 49805301,49805301
+.long 1338821763,1338821763
+.long 1546925160,1546925160
+.long 4104496465,4104496465
+.long 887481809,887481809
+.long 150073849,150073849
+.long 2473685474,2473685474
+.long 1943591083,1943591083
+.long 1395732834,1395732834
+.long 1058346282,1058346282
+.long 201589768,201589768
+.long 1388824469,1388824469
+.long 1696801606,1696801606
+.long 1589887901,1589887901
+.long 672667696,672667696
+.long 2711000631,2711000631
+.long 251987210,251987210
+.long 3046808111,3046808111
+.long 151455502,151455502
+.long 907153956,907153956
+.long 2608889883,2608889883
+.long 1038279391,1038279391
+.long 652995533,652995533
+.long 1764173646,1764173646
+.long 3451040383,3451040383
+.long 2675275242,2675275242
+.long 453576978,453576978
+.long 2659418909,2659418909
+.long 1949051992,1949051992
+.long 773462580,773462580
+.long 756751158,756751158
+.long 2993581788,2993581788
+.long 3998898868,3998898868
+.long 4221608027,4221608027
+.long 4132590244,4132590244
+.long 1295727478,1295727478
+.long 1641469623,1641469623
+.long 3467883389,3467883389
+.long 2066295122,2066295122
+.long 1055122397,1055122397
+.long 1898917726,1898917726
+.long 2542044179,2542044179
+.long 4115878822,4115878822
+.long 1758581177,1758581177
+.long 0,0
+.long 753790401,753790401
+.long 1612718144,1612718144
+.long 536673507,536673507
+.long 3367088505,3367088505
+.long 3982187446,3982187446
+.long 3194645204,3194645204
+.long 1187761037,1187761037
+.long 3653156455,3653156455
+.long 1262041458,1262041458
+.long 3729410708,3729410708
+.long 3561770136,3561770136
+.long 3898103984,3898103984
+.long 1255133061,1255133061
+.long 1808847035,1808847035
+.long 720367557,720367557
+.long 3853167183,3853167183
+.long 385612781,385612781
+.long 3309519750,3309519750
+.long 3612167578,3612167578
+.long 1429418854,1429418854
+.long 2491778321,2491778321
+.long 3477423498,3477423498
+.long 284817897,284817897
+.long 100794884,100794884
+.long 2172616702,2172616702
+.long 4031795360,4031795360
+.long 1144798328,1144798328
+.long 3131023141,3131023141
+.long 3819481163,3819481163
+.long 4082192802,4082192802
+.long 4272137053,4272137053
+.long 3225436288,3225436288
+.long 2324664069,2324664069
+.long 2912064063,2912064063
+.long 3164445985,3164445985
+.long 1211644016,1211644016
+.long 83228145,83228145
+.long 3753688163,3753688163
+.long 3249976951,3249976951
+.long 1977277103,1977277103
+.long 1663115586,1663115586
+.long 806359072,806359072
+.long 452984805,452984805
+.long 250868733,250868733
+.long 1842533055,1842533055
+.long 1288555905,1288555905
+.long 336333848,336333848
+.long 890442534,890442534
+.long 804056259,804056259
+.long 3781124030,3781124030
+.long 2727843637,2727843637
+.long 3427026056,3427026056
+.long 957814574,957814574
+.long 1472513171,1472513171
+.long 4071073621,4071073621
+.long 2189328124,2189328124
+.long 1195195770,1195195770
+.long 2892260552,2892260552
+.long 3881655738,3881655738
+.long 723065138,723065138
+.long 2507371494,2507371494
+.long 2690670784,2690670784
+.long 2558624025,2558624025
+.long 3511635870,3511635870
+.long 2145180835,2145180835
+.long 1713513028,1713513028
+.long 2116692564,2116692564
+.long 2878378043,2878378043
+.long 2206763019,2206763019
+.long 3393603212,3393603212
+.long 703524551,703524551
+.long 3552098411,3552098411
+.long 1007948840,1007948840
+.long 2044649127,2044649127
+.long 3797835452,3797835452
+.long 487262998,487262998
+.long 1994120109,1994120109
+.long 1004593371,1004593371
+.long 1446130276,1446130276
+.long 1312438900,1312438900
+.long 503974420,503974420
+.long 3679013266,3679013266
+.long 168166924,168166924
+.long 1814307912,1814307912
+.long 3831258296,3831258296
+.long 1573044895,1573044895
+.long 1859376061,1859376061
+.long 4021070915,4021070915
+.long 2791465668,2791465668
+.long 2828112185,2828112185
+.long 2761266481,2761266481
+.long 937747667,937747667
+.long 2339994098,2339994098
+.long 854058965,854058965
+.long 1137232011,1137232011
+.long 1496790894,1496790894
+.long 3077402074,3077402074
+.long 2358086913,2358086913
+.long 1691735473,1691735473
+.long 3528347292,3528347292
+.long 3769215305,3769215305
+.long 3027004632,3027004632
+.long 4199962284,4199962284
+.long 133494003,133494003
+.long 636152527,636152527
+.long 2942657994,2942657994
+.long 2390391540,2390391540
+.long 3920539207,3920539207
+.long 403179536,403179536
+.long 3585784431,3585784431
+.long 2289596656,2289596656
+.long 1864705354,1864705354
+.long 1915629148,1915629148
+.long 605822008,605822008
+.long 4054230615,4054230615
+.long 3350508659,3350508659
+.long 1371981463,1371981463
+.long 602466507,602466507
+.long 2094914977,2094914977
+.long 2624877800,2624877800
+.long 555687742,555687742
+.long 3712699286,3712699286
+.long 3703422305,3703422305
+.long 2257292045,2257292045
+.long 2240449039,2240449039
+.long 2423288032,2423288032
+.long 1111375484,1111375484
+.long 3300242801,3300242801
+.long 2858837708,2858837708
+.long 3628615824,3628615824
+.long 84083462,84083462
+.long 32962295,32962295
+.long 302911004,302911004
+.long 2741068226,2741068226
+.long 1597322602,1597322602
+.long 4183250862,4183250862
+.long 3501832553,3501832553
+.long 2441512471,2441512471
+.long 1489093017,1489093017
+.long 656219450,656219450
+.long 3114180135,3114180135
+.long 954327513,954327513
+.long 335083755,335083755
+.long 3013122091,3013122091
+.long 856756514,856756514
+.long 3144247762,3144247762
+.long 1893325225,1893325225
+.long 2307821063,2307821063
+.long 2811532339,2811532339
+.long 3063651117,3063651117
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list