提交 addd641f 编写于 作者: A Andy Polyakov

Unify ppc assembler make rules.

上级 f63e4be3
...@@ -132,6 +132,8 @@ my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::::::::void"; ...@@ -132,6 +132,8 @@ my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::::::::void";
my $mips3_asm=":bn-mips3.o::::::::::::void"; my $mips3_asm=":bn-mips3.o::::::::::::void";
my $s390x_asm=":bn-s390x.o::aes_cbc.o aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o:::::::void"; my $s390x_asm=":bn-s390x.o::aes_cbc.o aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o:::::::void";
my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::void"; my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::void";
my $ppc32_asm="ppccpuid.o:bn-ppc.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::";
my $ppc64_asm="ppccpuid.o:bn-ppc.o ppc-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::";
my $no_asm=":::::::::::::void"; my $no_asm=":::::::::::::void";
# As for $BSDthreads. Idea is to maintain "collective" set of flags, # As for $BSDthreads. Idea is to maintain "collective" set of flags,
...@@ -327,7 +329,7 @@ my %table=( ...@@ -327,7 +329,7 @@ my %table=(
# *-generic* is endian-neutral target, but ./config is free to # *-generic* is endian-neutral target, but ./config is free to
# throw in -D[BL]_ENDIAN, whichever appropriate... # throw in -D[BL]_ENDIAN, whichever appropriate...
"linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-generic32","gcc:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:ppccpuid_linux32.o:linux_ppc32.o linux_ppc32-mont.o:::::sha1-ppc_linux32.o sha256-ppc_linux32.o:::::::void:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ppc", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# It's believed that majority of ARM toolchains predefine appropriate -march. # It's believed that majority of ARM toolchains predefine appropriate -march.
# If you compiler does not, do complement config command line with one! # If you compiler does not, do complement config command line with one!
"linux-armv4", "gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-armv4", "gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
...@@ -337,7 +339,7 @@ my %table=( ...@@ -337,7 +339,7 @@ my %table=(
"linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}", "linux-aout", "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
#### ####
"linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-generic64","gcc:-DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:ppccpuid_linux64.o:linux_ppc64.o linux_ppc64-mont.o:::::sha1-ppc_linux64.o sha256-ppc_linux64.o sha512-ppc_linux64.o:::::::void:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ppc64", "gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-ecc","ecc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-icc","icc:-DL_ENDIAN -DTERMIO -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
...@@ -423,12 +425,12 @@ my %table=( ...@@ -423,12 +425,12 @@ my %table=(
#### IBM's AIX. #### IBM's AIX.
"aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:ppccpuid_aix32.o:aix_ppc32.o aix_ppc32-mont.o:::::sha1-ppc_aix32.o sha256-ppc_aix32.o:::::::void:dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", "aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:ppccpuid_aix64.o:aix_ppc64.o aix_ppc64-mont.o:::::sha1-ppc_aix64.o sha256-ppc_aix64.o sha512-ppc_aix64.o:::::::void:dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", "aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
# Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
# at build time. $OBJECT_MODE is respected at ./config stage! # at build time. $OBJECT_MODE is respected at ./config stage!
"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:ppccpuid_aix32.o:aix_ppc32.o aix_ppc32-mont.o:::::sha1-ppc_aix32.o sha256-ppc_aix32.o:::::::void:dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:ppccpuid_aix64.o:aix_ppc64.o aix_ppc64-mont.o:::::sha1-ppc_aix64.o sha256-ppc_aix64.o sha512-ppc_aix64.o:::::::void:dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", "aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
# #
# Cray T90 and similar (SDSC) # Cray T90 and similar (SDSC)
...@@ -527,11 +529,11 @@ my %table=( ...@@ -527,11 +529,11 @@ my %table=(
##### MacOS X (a.k.a. Rhapsody or Darwin) setup ##### MacOS X (a.k.a. Rhapsody or Darwin) setup
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::", "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:ppccpuid_osx32.o:osx_ppc32.o osx_ppc32-mont.o:::::sha1-ppc_osx32.o sha256-ppc_osx32.o:::::::void:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:ppccpuid_osx64.o:osx_ppc64.o osx_ppc64-mont.o:::::sha1-ppc_osx64.o sha256-ppc_osx64.o sha512-ppc_osx64.o:::::::void:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_macosx_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_macosx_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o osx_ppc32-mont.o:::::sha1-ppc_osx32.o:::::::void:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
##### A/UX ##### A/UX
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::", "aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
......
...@@ -728,20 +728,20 @@ $thread_cflag = -qthreaded ...@@ -728,20 +728,20 @@ $thread_cflag = -qthreaded
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR $bn_ops = BN_LLONG RC4_CHAR
$cpuid_obj = ppccpuid_aix32.o $cpuid_obj = ppccpuid.o
$bn_obj = aix_ppc32.o aix_ppc32-mont.o $bn_obj = bn-ppc.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_aix32.o sha256-ppc_aix32.o $sha1_obj = sha1-ppc.o sha256-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = aix32
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= aix-shared $shared_target= aix-shared
$shared_cflag = $shared_cflag =
...@@ -758,20 +758,20 @@ $thread_cflag = -D_THREAD_SAFE ...@@ -758,20 +758,20 @@ $thread_cflag = -D_THREAD_SAFE
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR $bn_ops = BN_LLONG RC4_CHAR
$cpuid_obj = ppccpuid_aix32.o $cpuid_obj = ppccpuid.o
$bn_obj = aix_ppc32.o aix_ppc32-mont.o $bn_obj = bn-ppc.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_aix32.o sha256-ppc_aix32.o $sha1_obj = sha1-ppc.o sha256-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = aix32
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= aix-shared $shared_target= aix-shared
$shared_cflag = $shared_cflag =
...@@ -818,20 +818,20 @@ $thread_cflag = -qthreaded ...@@ -818,20 +818,20 @@ $thread_cflag = -qthreaded
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR $bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
$cpuid_obj = ppccpuid_aix64.o $cpuid_obj = ppccpuid.o
$bn_obj = aix_ppc64.o aix_ppc64-mont.o $bn_obj = bn-ppc.o ppc-mont.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_aix64.o sha256-ppc_aix64.o sha512-ppc_aix64.o $sha1_obj = sha1-ppc.o sha256-ppc.o sha512-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = aix64
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= aix-shared $shared_target= aix-shared
$shared_cflag = $shared_cflag =
...@@ -848,20 +848,20 @@ $thread_cflag = -D_THREAD_SAFE ...@@ -848,20 +848,20 @@ $thread_cflag = -D_THREAD_SAFE
$sys_id = AIX $sys_id = AIX
$lflags = $lflags =
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR $bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR
$cpuid_obj = ppccpuid_aix64.o $cpuid_obj = ppccpuid.o
$bn_obj = aix_ppc64.o aix_ppc64-mont.o $bn_obj = bn-ppc.o ppc-mont.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_aix64.o sha256-ppc_aix64.o sha512-ppc_aix64.o $sha1_obj = sha1-ppc.o sha256-ppc.o sha512-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = aix64
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= aix-shared $shared_target= aix-shared
$shared_cflag = $shared_cflag =
...@@ -1118,20 +1118,20 @@ $thread_cflag = -D_REENTRANT ...@@ -1118,20 +1118,20 @@ $thread_cflag = -D_REENTRANT
$sys_id = MACOSX $sys_id = MACOSX
$lflags = -Wl,-search_paths_first% $lflags = -Wl,-search_paths_first%
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR $bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj = ppccpuid_osx32.o $cpuid_obj = ppccpuid.o
$bn_obj = osx_ppc32.o osx_ppc32-mont.o $bn_obj = bn-ppc.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_osx32.o sha256-ppc_osx32.o $sha1_obj = sha1-ppc.o sha256-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = osx32
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= darwin-shared $shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common $shared_cflag = -fPIC -fno-common
...@@ -1148,20 +1148,20 @@ $thread_cflag = -D_REENTRANT ...@@ -1148,20 +1148,20 @@ $thread_cflag = -D_REENTRANT
$sys_id = MACOSX $sys_id = MACOSX
$lflags = -Wl,-search_paths_first% $lflags = -Wl,-search_paths_first%
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR $bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj = ppccpuid_osx64.o $cpuid_obj = ppccpuid.o
$bn_obj = osx_ppc64.o osx_ppc64-mont.o $bn_obj = bn-ppc.o ppc-mont.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_osx64.o sha256-ppc_osx64.o sha512-ppc_osx64.o $sha1_obj = sha1-ppc.o sha256-ppc.o sha512-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = osx64
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= darwin-shared $shared_target= darwin-shared
$shared_cflag = -fPIC -fno-common $shared_cflag = -fPIC -fno-common
...@@ -1478,20 +1478,20 @@ $thread_cflag = -D_REENTRANT ...@@ -1478,20 +1478,20 @@ $thread_cflag = -D_REENTRANT
$sys_id = MACOSX $sys_id = MACOSX
$lflags = $lflags =
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR $bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
$cpuid_obj = $cpuid_obj = ppccpuid.o
$bn_obj = osx_ppc32.o osx_ppc32-mont.o $bn_obj = bn-ppc.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_osx32.o $sha1_obj = sha1-ppc.o sha256-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = osx32
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= darwin-shared $shared_target= darwin-shared
$shared_cflag = -fPIC $shared_cflag = -fPIC
...@@ -3278,20 +3278,20 @@ $thread_cflag = -D_REENTRANT ...@@ -3278,20 +3278,20 @@ $thread_cflag = -D_REENTRANT
$sys_id = $sys_id =
$lflags = -ldl $lflags = -ldl
$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL $bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
$cpuid_obj = ppccpuid_linux32.o $cpuid_obj = ppccpuid.o
$bn_obj = linux_ppc32.o linux_ppc32-mont.o $bn_obj = bn-ppc.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_linux32.o sha256-ppc_linux32.o $sha1_obj = sha1-ppc.o sha256-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = linux32
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= linux-shared $shared_target= linux-shared
$shared_cflag = -fPIC $shared_cflag = -fPIC
...@@ -3308,20 +3308,20 @@ $thread_cflag = -D_REENTRANT ...@@ -3308,20 +3308,20 @@ $thread_cflag = -D_REENTRANT
$sys_id = $sys_id =
$lflags = -ldl $lflags = -ldl
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL $bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
$cpuid_obj = ppccpuid_linux64.o $cpuid_obj = ppccpuid.o
$bn_obj = linux_ppc64.o linux_ppc64-mont.o $bn_obj = bn-ppc.o ppc-mont.o
$des_obj = $des_obj =
$aes_obj = $aes_obj = aes_core.o aes_cbc.o aes-ppc.o
$bf_obj = $bf_obj =
$md5_obj = $md5_obj =
$sha1_obj = sha1-ppc_linux64.o sha256-ppc_linux64.o sha512-ppc_linux64.o $sha1_obj = sha1-ppc.o sha256-ppc.o sha512-ppc.o
$cast_obj = $cast_obj =
$rc4_obj = $rc4_obj =
$rmd160_obj = $rmd160_obj =
$rc5_obj = $rc5_obj =
$wp_obj = $wp_obj =
$cmll_obj = $cmll_obj =
$perlasm_scheme = void $perlasm_scheme = linux64
$dso_scheme = dlfcn $dso_scheme = dlfcn
$shared_target= linux-shared $shared_target= linux-shared
$shared_cflag = -fPIC $shared_cflag = -fPIC
......
...@@ -74,9 +74,7 @@ x86_64cpuid.s: x86_64cpuid.pl ...@@ -74,9 +74,7 @@ x86_64cpuid.s: x86_64cpuid.pl
$(PERL) x86_64cpuid.pl $@ $(PERL) x86_64cpuid.pl $@
ia64cpuid.s: ia64cpuid.S ia64cpuid.s: ia64cpuid.S
$(CC) $(CFLAGS) -E ia64cpuid.S > $@ $(CC) $(CFLAGS) -E ia64cpuid.S > $@
ppccpuid_%.s: ppccpuid.pl; $(PERL) $< $@ ppccpuid.s: ppccpuid.pl; $(PERL) $< $(PERLASM_SCHEME) $@
ppccpuid_aix32.s: ppccpuid.pl; $(PERL) ppccpuid.pl $@
ppccpuid_aix64.s: ppccpuid.pl; $(PERL) ppccpuid.pl $@
testapps: testapps:
[ -z "$(THIS)" ] || ( if echo ${SDIRS} | fgrep ' des '; \ [ -z "$(THIS)" ] || ( if echo ${SDIRS} | fgrep ' des '; \
......
...@@ -59,6 +59,9 @@ aes-x86_64.s: asm/aes-x86_64.pl ...@@ -59,6 +59,9 @@ aes-x86_64.s: asm/aes-x86_64.pl
aes-sparcv9.s: asm/aes-sparcv9.pl aes-sparcv9.s: asm/aes-sparcv9.pl
$(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@ $(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
aes-ppc.s: asm/aes-ppc.pl
$(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
# GNU make "catch all" # GNU make "catch all"
aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@ aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@
......
...@@ -16,27 +16,26 @@ ...@@ -16,27 +16,26 @@
# at 1/2 of ppc_AES_encrypt speed, while ppc_AES_decrypt_compact - # at 1/2 of ppc_AES_encrypt speed, while ppc_AES_decrypt_compact -
# at 1/3 of ppc_AES_decrypt. # at 1/3 of ppc_AES_decrypt.
$output = shift; $flavour = shift;
if ($output =~ /64\.s/) { if ($flavour =~ /64/) {
$SIZE_T =8; $SIZE_T =8;
$STU ="stdu"; $STU ="stdu";
$POP ="ld"; $POP ="ld";
$PUSH ="std"; $PUSH ="std";
} elsif ($output =~ /32\.s/) { } elsif ($flavour =~ /32/) {
$SIZE_T =4; $SIZE_T =4;
$STU ="stwu"; $STU ="stwu";
$POP ="lwz"; $POP ="lwz";
$PUSH ="stw"; $PUSH ="stw";
} else { die "nonsense $output"; } } else { die "nonsense $flavour"; }
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or ( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl"; die "can't locate ppc-xlate.pl";
( defined shift || open STDOUT,"| $^X $xlate $output" ) || open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
die "can't call $xlate: $!";
$FRAME=32*$SIZE_T; $FRAME=32*$SIZE_T;
......
...@@ -103,19 +103,8 @@ pa-risc2.o: asm/pa-risc2.s ...@@ -103,19 +103,8 @@ pa-risc2.o: asm/pa-risc2.s
/usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s /usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s
# ppc - AIX, Linux, MacOS X... # ppc - AIX, Linux, MacOS X...
linux_ppc32.s: asm/ppc.pl; $(PERL) $< $@ bn-ppc.s: asm/ppc.pl; $(PERL) asm/ppc.pl $(PERLASM_SCHEME) $@
linux_ppc64.s: asm/ppc.pl; $(PERL) $< $@ ppc-mont.s: asm/ppc-mont.pl;$(PERL) asm/ppc-mont.pl $(PERLASM_SCHEME) $@
aix_ppc32.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@
aix_ppc64.s: asm/ppc.pl; $(PERL) asm/ppc.pl $@
osx_ppc32.s: asm/ppc.pl; $(PERL) $< $@
osx_ppc64.s: asm/ppc.pl; $(PERL) $< $@
linux_ppc32-mont.s: asm/ppc-mont.pl; $(PERL) $< $@
linux_ppc64-mont.s: asm/ppc-mont.pl; $(PERL) $< $@
aix_ppc32-mont.s: asm/ppc-mont.pl; $(PERL) asm/ppc-mont.pl $@
aix_ppc64-mont.s: asm/ppc-mont.pl; $(PERL) asm/ppc-mont.pl $@
osx_ppc32-mont.s: asm/ppc-mont.pl; $(PERL) $< $@
osx_ppc64-mont.s: asm/ppc-mont.pl; $(PERL) $< $@
alpha-mont.s: asm/alpha-mont.pl alpha-mont.s: asm/alpha-mont.pl
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
# 2048-bit +18% # 2048-bit +18%
# 4096-bit +4% # 4096-bit +4%
$output = shift; $flavour = shift;
if ($output =~ /32\-mont\.s/) { if ($flavour =~ /32/) {
$BITS= 32; $BITS= 32;
$BNSZ= $BITS/8; $BNSZ= $BITS/8;
$SIZE_T=4; $SIZE_T=4;
...@@ -46,7 +46,7 @@ if ($output =~ /32\-mont\.s/) { ...@@ -46,7 +46,7 @@ if ($output =~ /32\-mont\.s/) {
$SHRI= "srwi"; # unsigned shift right by immediate $SHRI= "srwi"; # unsigned shift right by immediate
$PUSH= $ST; $PUSH= $ST;
$POP= $LD; $POP= $LD;
} elsif ($output =~ /64\-mont\.s/) { } elsif ($flavour =~ /64/) {
$BITS= 64; $BITS= 64;
$BNSZ= $BITS/8; $BNSZ= $BITS/8;
$SIZE_T=8; $SIZE_T=8;
...@@ -67,10 +67,14 @@ if ($output =~ /32\-mont\.s/) { ...@@ -67,10 +67,14 @@ if ($output =~ /32\-mont\.s/) {
$SHRI= "srdi"; # unsigned shift right by immediate $SHRI= "srdi"; # unsigned shift right by immediate
$PUSH= $ST; $PUSH= $ST;
$POP= $LD; $POP= $LD;
} else { die "nonsense $output"; } } else { die "nonsense $flavour"; }
( defined shift || open STDOUT,"| $^X ../perlasm/ppc-xlate.pl $output" ) || $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
die "can't call ../perlasm/ppc-xlate.pl: $!"; ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
$sp="r1"; $sp="r1";
$toc="r2"; $toc="r2";
...@@ -270,7 +274,6 @@ Linner: ...@@ -270,7 +274,6 @@ Linner:
addi $num,$num,2 ; restore $num addi $num,$num,2 ; restore $num
subfc $j,$j,$j ; j=0 and "clear" XER[CA] subfc $j,$j,$j ; j=0 and "clear" XER[CA]
addi $tp,$sp,$FRAME addi $tp,$sp,$FRAME
addi $ap,$sp,$FRAME
mtctr $num mtctr $num
.align 4 .align 4
......
...@@ -100,9 +100,9 @@ ...@@ -100,9 +100,9 @@
# me a note at schari@us.ibm.com # me a note at schari@us.ibm.com
# #
$opf = shift; $flavour = shift;
if ($opf =~ /32\.s/) { if ($flavour =~ /32/) {
$BITS= 32; $BITS= 32;
$BNSZ= $BITS/8; $BNSZ= $BITS/8;
$ISA= "\"ppc\""; $ISA= "\"ppc\"";
...@@ -125,7 +125,7 @@ if ($opf =~ /32\.s/) { ...@@ -125,7 +125,7 @@ if ($opf =~ /32\.s/) {
$INSR= "insrwi"; # insert right $INSR= "insrwi"; # insert right
$ROTL= "rotlwi"; # rotate left by immediate $ROTL= "rotlwi"; # rotate left by immediate
$TR= "tw"; # conditional trap $TR= "tw"; # conditional trap
} elsif ($opf =~ /64\.s/) { } elsif ($flavour =~ /64/) {
$BITS= 64; $BITS= 64;
$BNSZ= $BITS/8; $BNSZ= $BITS/8;
$ISA= "\"ppc64\""; $ISA= "\"ppc64\"";
...@@ -149,15 +149,14 @@ if ($opf =~ /32\.s/) { ...@@ -149,15 +149,14 @@ if ($opf =~ /32\.s/) {
$INSR= "insrdi"; # insert right $INSR= "insrdi"; # insert right
$ROTL= "rotldi"; # rotate left by immediate $ROTL= "rotldi"; # rotate left by immediate
$TR= "td"; # conditional trap $TR= "td"; # conditional trap
} else { die "nonsense $opf"; } } else { die "nonsense $flavour"; }
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or ( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl"; die "can't locate ppc-xlate.pl";
( defined shift || open STDOUT,"| $^X $xlate $opf" ) || open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
die "can't call $xlate: $!";
$data=<<EOF; $data=<<EOF;
#-------------------------------------------------------------------- #--------------------------------------------------------------------
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
# PowerPC assembler distiller by <appro>. # PowerPC assembler distiller by <appro>.
my $flavour = shift;
my $output = shift; my $output = shift;
open STDOUT,">$output" || die "can't open $output: $!"; open STDOUT,">$output" || die "can't open $output: $!";
my $flavour = $output;
my %GLOBALS; my %GLOBALS;
my $dotinlocallabels=($flavour=~/linux/)?1:0; my $dotinlocallabels=($flavour=~/linux/)?1:0;
......
#!/usr/bin/env perl #!/usr/bin/env perl
$output = shift; $flavour = shift;
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}perlasm/ppc-xlate.pl" and -f $xlate) or ( $xlate="${dir}perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl"; die "can't locate ppc-xlate.pl";
( defined shift || open STDOUT,"| $^X $xlate $output" ) || open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
die "can't call $xlate: $!";
if ($output=~/64/) { if ($flavour=~/64/) {
$CMPLI="cmpldi"; $CMPLI="cmpldi";
$SHRLI="srdi"; $SHRLI="srdi";
$SIGNX="extsw"; $SIGNX="extsw";
......
...@@ -67,18 +67,10 @@ sha1-sparcv9.s: asm/sha1-sparcv9.pl; $(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS) ...@@ -67,18 +67,10 @@ sha1-sparcv9.s: asm/sha1-sparcv9.pl; $(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS)
sha256-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS) sha256-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
sha512-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS) sha512-sparcv9.s:asm/sha512-sparcv9.pl; $(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
# AIX make has to be explicitly told sha1-ppc.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $(PERLASM_SCHEME) $@
sha1-ppc_aix32.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@ sha256-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
sha1-ppc_aix64.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $@ sha512-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
sha256-ppc_aix32.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
sha256-ppc_aix64.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
sha512-ppc_aix32.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
sha512-ppc_aix64.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $@
# non-AIX ppc targets are believed to be armed with GNU make
sha1-ppc_%.s: asm/sha1-ppc.pl; $(PERL) $< $@
sha256-ppc_%.s: asm/sha512-ppc.pl; $(PERL) $< $@
sha512-ppc_%.s: asm/sha512-ppc.pl; $(PERL) $< $@
# GNU make "catch all" # GNU make "catch all"
sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@ sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@
sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@ sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@
......
...@@ -20,29 +20,28 @@ ...@@ -20,29 +20,28 @@
# PPC970,gcc-4.0.0 +76% +59% # PPC970,gcc-4.0.0 +76% +59%
# Power6,xlc-7 +68% +33% # Power6,xlc-7 +68% +33%
$output = shift; $flavour = shift;
if ($output =~ /64\.s/) { if ($flavour =~ /64/) {
$SIZE_T =8; $SIZE_T =8;
$UCMP ="cmpld"; $UCMP ="cmpld";
$STU ="stdu"; $STU ="stdu";
$POP ="ld"; $POP ="ld";
$PUSH ="std"; $PUSH ="std";
} elsif ($output =~ /32\.s/) { } elsif ($flavour =~ /32/) {
$SIZE_T =4; $SIZE_T =4;
$UCMP ="cmplw"; $UCMP ="cmplw";
$STU ="stwu"; $STU ="stwu";
$POP ="lwz"; $POP ="lwz";
$PUSH ="stw"; $PUSH ="stw";
} else { die "nonsense $output"; } } else { die "nonsense $flavour"; }
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or ( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl"; die "can't locate ppc-xlate.pl";
( defined shift || open STDOUT,"| $^X $xlate $output" ) || open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
die "can't call $xlate: $!";
$FRAME=24*$SIZE_T; $FRAME=24*$SIZE_T;
......
...@@ -35,26 +35,31 @@ ...@@ -35,26 +35,31 @@
# block signals prior calling this routine. For the record, in 32-bit # block signals prior calling this routine. For the record, in 32-bit
# context R2 serves as TLS pointer, while in 64-bit context - R13. # context R2 serves as TLS pointer, while in 64-bit context - R13.
$output=shift; $flavour=shift;
$output =shift;
if ($output =~ /64/) { if ($flavour =~ /64/) {
$SIZE_T=8; $SIZE_T=8;
$STU="stdu"; $STU="stdu";
$UCMP="cmpld"; $UCMP="cmpld";
$SHL="sldi"; $SHL="sldi";
$POP="ld"; $POP="ld";
$PUSH="std"; $PUSH="std";
} elsif ($output =~ /32/) { } elsif ($flavour =~ /32/) {
$SIZE_T=4; $SIZE_T=4;
$STU="stwu"; $STU="stwu";
$UCMP="cmplw"; $UCMP="cmplw";
$SHL="slwi"; $SHL="slwi";
$POP="lwz"; $POP="lwz";
$PUSH="stw"; $PUSH="stw";
} else { die "nonsense $output"; } } else { die "nonsense $flavour"; }
( defined shift || open STDOUT,"| $^X ../perlasm/ppc-xlate.pl $output" ) || $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
die "can't call ../perlasm/ppc-xlate.pl: $!"; ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour $output" || die "can't call $xlate: $!";
if ($output =~ /512/) { if ($output =~ /512/) {
$func="sha512_block_data_order"; $func="sha512_block_data_order";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册