Unified - adapt the generation of bignum assembler to use GENERATE
authorRichard Levitte <levitte@openssl.org>
Mon, 7 Mar 2016 14:41:33 +0000 (15:41 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 7 Mar 2016 17:25:56 +0000 (18:25 +0100)
This gets rid of the BEGINRAW..ENDRAW sections in crypto/bn/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Rich Salz <rsalz@openssl.org>
15 files changed:
crypto/bn/Makefile.in
crypto/bn/asm/alpha-mont.pl
crypto/bn/asm/bn-586.pl
crypto/bn/asm/co-586.pl
crypto/bn/asm/ia64-mont.pl
crypto/bn/asm/sparct4-mont.pl
crypto/bn/asm/sparcv9-gf2m.pl
crypto/bn/asm/sparcv9-mont.pl
crypto/bn/asm/sparcv9a-mont.pl
crypto/bn/asm/via-mont.pl
crypto/bn/asm/vis3-mont.pl
crypto/bn/asm/x86-gf2m.pl
crypto/bn/asm/x86-mont.pl
crypto/bn/asm/x86.pl
crypto/bn/build.info

index b14301aa0e40ee010981d51b65202b5b5bc3dca7..594667fc8498b162ce28f87602ddb902af9d6eda 100644 (file)
@@ -58,28 +58,28 @@ lib:        $(LIBOBJ)
        @touch lib
 
 bn-586.s:      asm/bn-586.pl ../perlasm/x86asm.pl
-       $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 co-586.s:      asm/co-586.pl ../perlasm/x86asm.pl
-       $(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 x86-mont.s:    asm/x86-mont.pl ../perlasm/x86asm.pl
-       $(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 x86-gf2m.s:    asm/x86-gf2m.pl ../perlasm/x86asm.pl
-       $(PERL) asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 
 sparcv8.o:     asm/sparcv8.S
        $(CC) $(CFLAGS) -c asm/sparcv8.S
 bn-sparcv9.o:  asm/sparcv8plus.S
        $(CC) $(CFLAGS) -c -o $@ asm/sparcv8plus.S
 sparcv9a-mont.s:       asm/sparcv9a-mont.pl
-       $(PERL) asm/sparcv9a-mont.pl $(CFLAGS) $@
+       $(PERL) asm/sparcv9a-mont.pl $(CFLAGS) $@
 sparcv9-mont.s:                asm/sparcv9-mont.pl
-       $(PERL) asm/sparcv9-mont.pl $(CFLAGS) $@
+       $(PERL) asm/sparcv9-mont.pl $(CFLAGS) $@
 vis3-mont.s:           asm/vis3-mont.pl
-       $(PERL) asm/vis3-mont.pl $(CFLAGS) $@
+       $(PERL) asm/vis3-mont.pl $(CFLAGS) $@
 sparct4-mont.S:        asm/sparct4-mont.pl
-       $(PERL) asm/sparct4-mont.pl $(CFLAGS) $@
+       $(PERL) asm/sparct4-mont.pl $(CFLAGS) $@
 sparcv9-gf2m.S:        asm/sparcv9-gf2m.pl
-       $(PERL) asm/sparcv9-gf2m.pl $(CFLAGS) $@
+       $(PERL) asm/sparcv9-gf2m.pl $(CFLAGS) $@
 
 bn-mips.s:     asm/mips.pl
        $(PERL) asm/mips.pl $(PERLASM_SCHEME) $@
@@ -94,20 +94,20 @@ s390x-gf2m.s:       asm/s390x-gf2m.pl
 x86_64-gcc.o:  asm/x86_64-gcc.c
        $(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c
 x86_64-mont.s: asm/x86_64-mont.pl
-       $(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) $@
 x86_64-mont5.s:        asm/x86_64-mont5.pl
-       $(PERL) asm/x86_64-mont5.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/x86_64-mont5.pl $(PERLASM_SCHEME) $@
 x86_64-gf2m.s: asm/x86_64-gf2m.pl
-       $(PERL) asm/x86_64-gf2m.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/x86_64-gf2m.pl $(PERLASM_SCHEME) $@
 rsaz-x86_64.s: asm/rsaz-x86_64.pl
-       $(PERL) asm/rsaz-x86_64.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/rsaz-x86_64.pl $(PERLASM_SCHEME) $@
 rsaz-avx2.s:   asm/rsaz-avx2.pl 
-       $(PERL) asm/rsaz-avx2.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/rsaz-avx2.pl $(PERLASM_SCHEME) $@
 
 bn-ia64.s:     asm/ia64.S
-       $(CC) $(CFLAGS) -E asm/ia64.S $@
+       $(CC) $(CFLAGS) -E asm/ia64.S $@
 ia64-mont.s:   asm/ia64-mont.pl
-       $(PERL) asm/ia64-mont.pl $@ $(CFLAGS)
+       $(PERL) asm/ia64-mont.pl $(CFLAGS) $@
 
 parisc-mont.s: asm/parisc-mont.pl
        $(PERL) asm/parisc-mont.pl $(PERLASM_SCHEME) $@
@@ -119,7 +119,7 @@ ppc64-mont.s:       asm/ppc64-mont.pl;$(PERL) asm/ppc64-mont.pl $(PERLASM_SCHEME) $@
 
 alpha-mont.s:  asm/alpha-mont.pl
        (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
-       $(PERL) asm/alpha-mont.pl $$preproc && \
+       $(PERL) asm/alpha-mont.pl $$preproc && \
        $(CC) -E -P $$preproc > $@ && rm $$preproc)
 
 # GNU make "catch all"
index 03596e2014d4035d02440316cc1cf025f726d772..2ac3532435cf773834ba81640ae93664d473eb50 100644 (file)
@@ -15,6 +15,9 @@
 # I.e. if you compare 1GHz 21264 and 2GHz Opteron, you'll observe ~2x
 # difference.
 
+$output=pop;
+open STDOUT,">$output";
+
 # int bn_mul_mont(
 $rp="a0";      # BN_ULONG *rp,
 $ap="a1";      # const BN_ULONG *ap,
index 332ef3e91d621d7f9f4bb20952795c4c04c0acd2..3f34abef9e38c0d52632b86037f24bfe7e15ead5 100644 (file)
@@ -4,6 +4,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0);
 
 $sse2=0;
@@ -21,6 +24,8 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
 
 &asm_finish();
 
+close STDOUT;
+
 sub bn_mul_add_words
        {
        local($name)=@_;
@@ -771,4 +776,3 @@ sub bn_sub_part_words
 
        &function_end($name);
        }
-
index 57101a6bd7757f3d8b57671edcb7a67a06f842cc..ec3ea343c84018b588f7eb22989f811565732737 100644 (file)
@@ -4,6 +4,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0);
 
 &bn_mul_comba("bn_mul_comba8",8);
@@ -13,6 +16,8 @@ require "x86asm.pl";
 
 &asm_finish();
 
+close STDOUT;
+
 sub mul_add_c
        {
        local($a,$ai,$b,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_;
index e258658428a3fbc07492de3f637da659a34cf869..710ca3c1f4c0161c45ae56ed78617f3f29454b9d 100644 (file)
@@ -60,6 +60,8 @@
 # hereafter less for longer keys, while verify - by 74-13%.
 # DSA performance improves by 115-30%.
 
+$output=pop;
+
 if ($^O eq "hpux") {
     $ADDP="addp4";
     for (@ARGV) { $ADDP="add" if (/[\+DD|\-mlp]64/); }
@@ -846,6 +848,6 @@ copyright:
 stringz        "Montgomery multiplication for IA-64, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 
-$output=shift and open STDOUT,">$output";
+open STDOUT,">$output" if $output;
 print $code;
 close STDOUT;
index 71b45002a42f739e9a3a30282771f1399a1cdf00..7ec83c2c9c224bf06c1a8bcf99ffe645e5ca6899 100755 (executable)
@@ -76,6 +76,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "sparcv9_modes.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 $code.=<<___;
 #include "sparc_arch.h"
 
index ab94cd917c41a01642198e75b05cdf3b39f88d8f..c7bf9f228bda64d4993ab2921739d9b1b703a9bc 100644 (file)
@@ -18,6 +18,9 @@
 # ~100-230% faster than gcc-generated code and ~35-90% faster than
 # the pure SPARCv9 code path.
 
+$output = pop;
+open STDOUT,">$output";
+
 $locals=16*8;
 
 $tab="%l0";
index b8fb1e8a25dc0bcf858d4619e394e8f7688f4b83..c08d8223f7d9318e5bca9472afa0dce532f2f5ab 100644 (file)
@@ -42,6 +42,9 @@
 # module still have hidden potential [see TODO list there], which is
 # estimated to be larger than 20%...
 
+$output = pop;
+open STDOUT,">$output";
+
 # int bn_mul_mont(
 $rp="%i0";     # BN_ULONG *rp,
 $ap="%i1";     # const BN_ULONG *ap,
index 4cde041ce5a3a62c12dd290b894e47c1c5ccea3f..433ec9ecf99d7fdf262f32cc6cd478032c07271e 100755 (executable)
@@ -55,6 +55,9 @@
 # key length, more for longer keys] on USI&II cores and 30-80% - on
 # USIII&IV.
 
+$output = pop;
+open STDOUT,">$output";
+
 $fname="bn_mul_mont_fpu";
 $bits=32;
 for (@ARGV) { $bits=64 if (/\-m64/ || /\-xarch\=v9/); }
index c046a514c873fb9e773384b635ac066883f5e565..8cf4dde4d5a1488cc120ea1c985ebdb0c0529f23 100644 (file)
@@ -81,6 +81,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],"via-mont.pl");
 
 # int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,const BN_ULONG *n0, int num);
@@ -240,3 +243,5 @@ $sp=&DWP(28,"esp");
 &asciz("Padlock Montgomery Multiplication, CRYPTOGAMS by <appro\@openssl.org>");
 
 &asm_finish();
+
+close STDOUT;
index 1d8dc9e08ea20609b2d9ad5c5ee03ca6cad7f27b..8bab5a16b638d4cbe0f82c3a4ea1b3726a3f4cec 100644 (file)
@@ -18,6 +18,9 @@
 # for reference purposes, because T4 has dedicated Montgomery
 # multiplication and squaring *instructions* that deliver even more.
 
+$output = pop;
+open STDOUT,">$output";
+
 $bits=32;
 for (@ARGV)     { $bits=64 if (/\-m64/ || /\-xarch\=v9/); }
 if ($bits==64)  { $bias=2047; $frame=192; }
index b57953027298f3d44da0f605812acda599f63c92..0292178d2488c08001f5ac72001dea0eef9cca50 100644 (file)
@@ -36,6 +36,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0,$x86only = $ARGV[$#ARGV] eq "386");
 
 $sse2=0;
@@ -311,3 +314,5 @@ if ($sse2) {
 &asciz ("GF(2^m) Multiplication for x86, CRYPTOGAMS by <appro\@openssl.org>");
 
 &asm_finish();
+
+close STDOUT;
index 89f4de61e8964fce2793804a78c313fde9e27a3c..972de2650b6cb2a7442b1651627f41748654652c 100755 (executable)
@@ -30,6 +30,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output = pop;
+open STDOUT,">$output";
 &asm_init($ARGV[0],$0);
 
 $sse2=0;
@@ -606,3 +609,5 @@ $sbit=$num;
 &asciz("Montgomery Multiplication for x86, CRYPTOGAMS by <appro\@openssl.org>");
 
 &asm_finish();
+
+close STDOUT;
index 1bc4f1bb2747f47b79f0f0aa3e5ee98c5b5b6d40..c1cab72716c031f4f20d31166116764227f22dc7 100644 (file)
@@ -11,6 +11,9 @@ require("x86/add.pl");
 require("x86/sub.pl");
 require("x86/comba.pl");
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0);
 
 &bn_mul_add_words("bn_mul_add_words");
@@ -26,3 +29,4 @@ require("x86/comba.pl");
 
 &asm_finish();
 
+close STDOUT;
index a6b94c41426a34dfb0596d42118fdec7b977cc2a..e9cde755565be07a2be987eb5cbe4ebf10a8cb2d 100644 (file)
@@ -9,32 +9,56 @@ SOURCE[../../libcrypto]=\
         bn_depr.c bn_const.c bn_x931p.c bn_intern.c bn_dh.c bn_srp.c
 INCLUDE[../../libcrypto]={- rel2abs(catdir($builddir,"..","..","crypto","include")) -}
 
-BEGINRAW[Makefile]
-##### BN assembler implementations
+GENERATE[bn-586.s]=asm/bn-586.pl \
+       $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[bn-586.s]=../perlasm/x86asm.pl
+GENERATE[co-586.s]=asm/co-586.pl \
+       $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[co-586.s]=../perlasm/x86asm.pl
+GENERATE[x86-mont.s]=asm/x86-mont.pl \
+       $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[x86-mont.s]=../perlasm/x86asm.pl
+GENERATE[x86-gf2m.s]=asm/x86-gf2m.pl \
+       $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[x86-gf2m.s]=../perlasm/x86asm.pl
+
+GENERATE[sparcv9a-mont.s]=asm/sparcv9a-mont.pl $(CFLAGS)
+GENERATE[sparcv9-mont.s]=asm/sparcv9-mont.pl $(CFLAGS)
+GENERATE[vis3-mont.s]=asm/vis3-mont.pl $(CFLAGS)
+GENERATE[sparct4-mont.S]=asm/sparct4-mont.pl $(CFLAGS)
+GENERATE[sparcv9-gf2m.S]=asm/sparcv9-gf2m.pl $(CFLAGS)
+
+GENERATE[bn-mips.s]=asm/mips.pl $(PERLASM_SCHEME)
+GENERATE[mips-mont.s]=asm/mips-mont.pl $(PERLASM_SCHEME)
+
+GENERATE[s390x-mont.S]=asm/s390x-mont.pl $(PERLASM_SCHEME)
+GENERATE[s390x-gf2m.s]=asm/s390x-gf2m.pl $(PERLASM_SCHEME)
+
+GENERATE[x86_64-mont.s]=asm/x86_64-mont.pl $(PERLASM_SCHEME)
+GENERATE[x86_64-mont5.s]=asm/x86_64-mont5.pl $(PERLASM_SCHEME)
+GENERATE[x86_64-gf2m.s]=asm/x86_64-gf2m.pl $(PERLASM_SCHEME)
+GENERATE[rsaz-x86_64.s]=asm/rsaz-x86_64.pl $(PERLASM_SCHEME)
+GENERATE[rsaz-avx2.s]=asm/rsaz-avx2.pl $(PERLASM_SCHEME)
+
+GENERATE[bn-ia64.s]=asm/ia64.S
+GENERATE[ia64-mont.s]=asm/ia64-mont.pl $(CFLAGS)
+
+GENERATE[parisc-mont.s]=asm/parisc-mont.pl $(PERLASM_SCHEME)
+
+# ppc - AIX, Linux, MacOS X...
+GENERATE[bn-ppc.s]=asm/ppc.pl $(PERLASM_SCHEME)
+GENERATE[ppc-mont.s]=asm/ppc-mont.pl $(PERLASM_SCHEME)
+GENERATE[ppc64-mont.s]=asm/ppc64-mont.pl $(PERLASM_SCHEME)
+
+GENERATE[alpha-mont.s]=asm/alpha-mont.pl
 
-{- $builddir -}/bn-586.s:      {- $sourcedir -}/asm/bn-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/bn-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-{- $builddir -}/co-586.s:      {- $sourcedir -}/asm/co-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-{- $builddir -}/x86-mont.s:    {- $sourcedir -}/asm/x86-mont.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-{- $builddir -}/x86-gf2m.s:    {- $sourcedir -}/asm/x86-gf2m.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
+GENERATE[armv4-mont.S]=asm/armv4-mont.pl $(PERLASM_SCHEME)
+GENERATE[armv4-gf2m.S]=asm/armv4-gf2m.pl $(PERLASM_SCHEME)
+GENERATE[armv8-mont.S]=asm/armv8-mont.pl $(PERLASM_SCHEME)
 
-{- $builddir -}/sparcv8.o:     {- $sourcedir -}/asm/sparcv8.S
-       $(CC) $(CFLAGS) -c {- $sourcedir -}/asm/sparcv8.S
-{- $builddir -}/bn-sparcv9.o:  {- $sourcedir -}/asm/sparcv8plus.S
-       $(CC) $(CFLAGS) -c -o $@ {- $sourcedir -}/asm/sparcv8plus.S
-{- $builddir -}/sparcv9a-mont.s:       {- $sourcedir -}/asm/sparcv9a-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/sparcv9a-mont.pl $(CFLAGS) > $@
-{- $builddir -}/sparcv9-mont.s:                {- $sourcedir -}/asm/sparcv9-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/sparcv9-mont.pl $(CFLAGS) > $@
-{- $builddir -}/vis3-mont.s:           {- $sourcedir -}/asm/vis3-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/vis3-mont.pl $(CFLAGS) > $@
-{- $builddir -}/sparct4-mont.S:        {- $sourcedir -}/asm/sparct4-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/sparct4-mont.pl $(CFLAGS) > $@
-{- $builddir -}/sparcv9-gf2m.S:        {- $sourcedir -}/asm/sparcv9-gf2m.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/sparcv9-gf2m.pl $(CFLAGS) > $@
+OVERRIDES=bn-mips3.o pa-risc2W.o pa-risc2.c
+BEGINRAW[Makefile]
+##### BN assembler implementations
 
 {- $builddir -}/bn-mips3.o:    {- $sourcedir -}/asm/mips3.s
        @if [ "$(CC)" = "gcc" ]; then \
@@ -42,32 +66,6 @@ BEGINRAW[Makefile]
                as -$$ABI -O -o $@ {- $sourcedir -}/asm/mips3.s; \
        else    $(CC) -c $(CFLAGS) -o $@ {- $sourcedir -}/asm/mips3.s; fi
 
-{- $builddir -}/bn-mips.s:     {- $sourcedir -}/asm/mips.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/mips.pl $(PERLASM_SCHEME) $@
-{- $builddir -}/mips-mont.s:   {- $sourcedir -}/asm/mips-mont.pl
-       CC="$(CC)" $(PERL)      {- $sourcedir -}/asm/mips-mont.pl $(PERLASM_SCHEME) $@
-
-{- $builddir -}/bn-s390x.o:    {- $sourcedir -}/asm/s390x.S
-       $(CC) $(CFLAGS) -c -o $@ {- $sourcedir -}/asm/s390x.S
-{- $builddir -}/s390x-gf2m.s:  {- $sourcedir -}/asm/s390x-gf2m.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/s390x-gf2m.pl $(PERLASM_SCHEME) $@
-
-{- $builddir -}/x86_64-mont.s: {- $sourcedir -}/asm/x86_64-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/x86_64-mont.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/x86_64-mont5.s:        {- $sourcedir -}/asm/x86_64-mont5.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/x86_64-mont5.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/x86_64-gf2m.s: {- $sourcedir -}/asm/x86_64-gf2m.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/x86_64-gf2m.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/rsaz-x86_64.s: {- $sourcedir -}/asm/rsaz-x86_64.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/rsaz-x86_64.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/rsaz-avx2.s:   {- $sourcedir -}/asm/rsaz-avx2.pl 
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/rsaz-avx2.pl $(PERLASM_SCHEME) > $@
-
-{- $builddir -}/bn-ia64.s:     {- $sourcedir -}/asm/ia64.S
-       $(CC) $(CFLAGS) -E {- $sourcedir -}/asm/ia64.S > $@
-{- $builddir -}/ia64-mont.s:   {- $sourcedir -}/asm/ia64-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ia64-mont.pl $@ $(CFLAGS)
-
 # GNU assembler fails to compile PA-RISC2 modules, insist on calling
 # vendor assembler...
 {- $builddir -}/pa-risc2W.o: {- $sourcedir -}/asm/pa-risc2W.s
@@ -75,26 +73,4 @@ BEGINRAW[Makefile]
 {- $builddir -}/pa-risc2.o: {- $sourcedir -}/asm/pa-risc2.s
        CC="$(CC)" $(PERL) $(SRCDIR)/util/fipsas.pl $(SRCDIR) $< /usr/ccs/bin/as -o pa-risc2.o {- $sourcedir -}/asm/pa-risc2.s
 
-{- $builddir -}/parisc-mont.s: {- $sourcedir -}/asm/parisc-mont.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/parisc-mont.pl $(PERLASM_SCHEME) $@
-
-# ppc - AIX, Linux, MacOS X...
-{- $builddir -}/bn-ppc.s:      {- $sourcedir -}/asm/ppc.pl;    CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ppc.pl $(PERLASM_SCHEME) $@
-{- $builddir -}/ppc-mont.s:    {- $sourcedir -}/asm/ppc-mont.pl;CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ppc-mont.pl $(PERLASM_SCHEME) $@
-{- $builddir -}/ppc64-mont.s:  {- $sourcedir -}/asm/ppc64-mont.pl;CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ppc64-mont.pl $(PERLASM_SCHEME) $@
-
-{- $builddir -}/alpha-mont.s:  {- $sourcedir -}/asm/alpha-mont.pl
-       (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/alpha-mont.pl > $$preproc && \
-       $(CC) -E -P $$preproc > $@ && rm $$preproc)
-
-# GNU make "catch all"
-{- $builddir -}/%-mont.S:      {- $sourcedir -}/asm/%-mont.pl
-       CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@
-{- $builddir -}/%-gf2m.S:      {- $sourcedir -}/asm/%-gf2m.pl
-       CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@
-
-{- $builddir -}/armv4-mont.o:  {- $builddir -}/armv4-mont.S
-{- $builddir -}/armv4-gf2m.o:  {- $builddir -}/armv4-gf2m.S
-{- $builddir -}/armv8-mont.o:  {- $builddir -}/armv8-mont.S
 ENDRAW[Makefile]