Yet another beecrypt-3.0.0 merge.
CVS patchset: 6878 CVS date: 2003/05/29 16:07:35
This commit is contained in:
parent
b8772cff2d
commit
1c5f871b49
|
@ -568,6 +568,8 @@ AC_DEFUN(BEECRYPT_ASM_ALIGN,[
|
|||
bc_cv_asm_align=".align 4" ;;
|
||||
ia64)
|
||||
bc_cv_asm_align=".align 16" ;;
|
||||
powerpc*)
|
||||
bc_cv_asm_align=".align 2" ;;
|
||||
s390x)
|
||||
bc_cv_asm_align=".align 4" ;;
|
||||
sparc*)
|
||||
|
|
|
@ -84,7 +84,6 @@ int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst,
|
|||
(void) bc->encrypt(bp, dst, dst);
|
||||
/*@=noeffectuncon@*/
|
||||
|
||||
dst += blockwords;
|
||||
src += blockwords;
|
||||
|
||||
nblocks--;
|
||||
|
@ -93,20 +92,22 @@ int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst,
|
|||
while (nblocks > 0)
|
||||
{
|
||||
for (i = 0; i < blockwords; i++)
|
||||
dst[i] = src[i] ^ dst[i-blockwords];
|
||||
dst[i+blockwords] = src[i] ^ dst[i];
|
||||
dst += blockwords;
|
||||
|
||||
/*@-noeffectuncon@*/
|
||||
(void) bc->encrypt(bp, dst, dst);
|
||||
/*@=noeffectuncon@*/
|
||||
|
||||
dst += blockwords;
|
||||
src += blockwords;
|
||||
|
||||
nblocks--;
|
||||
}
|
||||
|
||||
dst -= blockwords;
|
||||
|
||||
for (i = 0; i < blockwords; i++)
|
||||
fdback[i] = dst[i-blockwords];
|
||||
fdback[i] = dst[i];
|
||||
/*@=usedef@*/
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -166,13 +166,13 @@ AC_ARG_WITH(mtmalloc,[ --with-mtmalloc links against the mtmalloc libra
|
|||
fi
|
||||
],[ac_with_mtmalloc=no])
|
||||
|
||||
AC_ARG_WITH(javaglue,[ --with-javaglue creates the java glue code [default=no]],[
|
||||
AC_ARG_WITH(java,[ --with-java creates the java glue code [default=no]],[
|
||||
if test "$withval" = no; then
|
||||
ac_with_javaglue=no
|
||||
ac_with_java=no
|
||||
else
|
||||
ac_with_javaglue=yes
|
||||
ac_with_java=yes
|
||||
fi
|
||||
],[ac_with_javaglue=no])
|
||||
],[ac_with_java=no])
|
||||
|
||||
AC_ARG_WITH(python,[ --with-python creates the python bindings code [default=no]],[
|
||||
if test "$withval" = no; then
|
||||
|
@ -433,7 +433,7 @@ fi
|
|||
# Predefines and checks for Java API support
|
||||
AH_TEMPLATE([JAVAGLUE],[Define to 1 if you want to include the Java code])
|
||||
|
||||
if test "$ac_with_javaglue" = yes ; then
|
||||
if test "$ac_with_java" = yes ; then
|
||||
AC_CHECK_PROG(ac_cv_have_gcj, gcj, yes, no)
|
||||
if test "$ac_cv_have_gcj" = yes; then
|
||||
AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
|
||||
|
@ -458,10 +458,10 @@ EOF
|
|||
ac_cv_java_include="$ac_cv_java_include -I$gcjpath/include"
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([java headers not found, disabling javaglue])
|
||||
AC_MSG_WARN([java headers not found, disabling java])
|
||||
ac_cv_java_headers=no
|
||||
ac_cv_java_include=
|
||||
ac_with_javaglue=no
|
||||
ac_with_java=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
])
|
||||
|
@ -512,29 +512,29 @@ EOF
|
|||
ac_cv_java_include="-I$java_include" ;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_WARN([java headers not found, disabling javaglue])
|
||||
AC_MSG_WARN([java headers not found, disabling java])
|
||||
ac_cv_java_headers=no
|
||||
ac_cv_java_include=
|
||||
ac_with_javaglue=no
|
||||
ac_with_java=no
|
||||
fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
])
|
||||
else
|
||||
AC_MSG_WARN([javac not found, disabling javaglue])
|
||||
AC_MSG_WARN([javac not found, disabling java])
|
||||
ac_cv_java_headers=no
|
||||
ac_cv_java_include=
|
||||
ac_with_javaglue=no
|
||||
ac_with_java=no
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([java not found, disabling javaglue])
|
||||
AC_MSG_WARN([java not found, disabling java])
|
||||
ac_cv_java_headers=no
|
||||
ac_with_javaglue=no
|
||||
ac_with_java=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$ac_with_javaglue" = yes ; then
|
||||
if test "$ac_with_java" = yes ; then
|
||||
AC_DEFINE([JAVAGLUE],1)
|
||||
fi
|
||||
|
||||
|
@ -696,13 +696,13 @@ fi
|
|||
BEECRYPT_INT_TYPES
|
||||
BEECRYPT_CPU_BITS
|
||||
|
||||
if test "$ac_with_javaglue" = yes ; then
|
||||
if test "$ac_with_java" = yes ; then
|
||||
CFLAGS="$CFLAGS $ac_cv_java_include"
|
||||
fi
|
||||
|
||||
MAYBE_OPT=
|
||||
|
||||
if test "$ac_with_javaglue" = yes; then
|
||||
if test "$ac_with_java" = yes; then
|
||||
MAYBE_OPT="$MAYBE_OPT java"
|
||||
fi
|
||||
|
||||
|
|
|
@ -19,8 +19,9 @@ dnl License along with this library; if not, write to the Free Software
|
|||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
define(`saved_pfs',`r14')
|
||||
define(`saved_lc',`r15')
|
||||
define(`saved_pfs',`r31')
|
||||
define(`saved_lc',`r30')
|
||||
define(`saved_pr',`r29')
|
||||
|
||||
ifelse(substr(ASM_OS,0,5),linux,`
|
||||
undefine(`C_FUNCTION_BEGIN')
|
||||
|
|
|
@ -27,7 +27,7 @@ C_FUNCTION_BEGIN(mpadd)
|
|||
s8addq `$'16,0,`$'1
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'18,`$'1,`$'18
|
||||
mov `$31',`$'0
|
||||
clr `$'0
|
||||
|
||||
.align 4
|
||||
LOCAL(mpadd_loop):
|
||||
|
@ -52,7 +52,7 @@ C_FUNCTION_BEGIN(mpsub)
|
|||
s8addq `$'16,0,`$'1
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'18,`$'1,`$'18
|
||||
mov `$31',`$'0
|
||||
clr `$'0
|
||||
|
||||
.align 4
|
||||
LOCAL(mpsub_loop):
|
||||
|
@ -77,7 +77,7 @@ C_FUNCTION_BEGIN(mpsetmul)
|
|||
s8addq `$'16,0,`$'1
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'18,`$'1,`$'18
|
||||
mov `$31',`$'0
|
||||
clr `$'0
|
||||
|
||||
.align 4
|
||||
LOCAL(mpsetmul_loop):
|
||||
|
@ -101,7 +101,7 @@ C_FUNCTION_BEGIN(mpaddmul)
|
|||
s8addq `$'16,0,`$'1
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'18,`$'1,`$'18
|
||||
mov `$31',`$'0
|
||||
clr `$'0
|
||||
|
||||
.align 4
|
||||
LOCAL(mpaddmul_loop):
|
||||
|
@ -128,9 +128,9 @@ C_FUNCTION_BEGIN(mpaddsqrtrc)
|
|||
subq `$'16,1,`$'16
|
||||
s8addq `$'16,0,`$'1
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'17,`$'1,`$'17
|
||||
addq `$'18,`$'1,`$'18
|
||||
mov `$31',`$'0
|
||||
addq `$'17,`$'1,`$'17
|
||||
clr `$'0
|
||||
|
||||
.align 4
|
||||
LOCAL(mpaddsqrtrc_loop):
|
||||
|
@ -154,6 +154,6 @@ LOCAL(mpaddsqrtrc_loop):
|
|||
subq `$'16,1,`$'16
|
||||
subq `$'17,16,`$'17
|
||||
subq `$'18,8,`$'18
|
||||
bge `$'16,LOCAL(mpaddmul_loop)
|
||||
bge `$'16,LOCAL(mpaddsqrtrc_loop)
|
||||
ret `$'31,(`$'26),1
|
||||
C_FUNCTION_END(mpaddsqrtrc)
|
||||
|
|
|
@ -14,4 +14,4 @@ EXTRA_DIST = \
|
|||
all:
|
||||
|
||||
check:
|
||||
$(VALGRIND) python test_all.py verbose
|
||||
env PYTHONPATH=.. $(VALGRIND) python test_all.py verbose
|
||||
|
|
Loading…
Reference in New Issue