summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-03-07 15:49:09 +0100
committerRichard Levitte <levitte@openssl.org>2016-03-09 11:09:26 +0100
commitac9888e5a9cc7b581323614c615b669f655512a1 (patch)
tree7dfec0c8aff9bb50d00db1d6bd401055316e3c13
parentUnified - adapt the generation of ripemd assembler to use GENERATE (diff)
downloadopenssl-ac9888e5a9cc7b581323614c615b669f655512a1.tar.xz
openssl-ac9888e5a9cc7b581323614c615b669f655512a1.zip
Unified - adapt the generation of rc5 assembler to use GENERATE
This gets rid of the BEGINRAW..ENDRAW sections in crypto/rc5/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: Andy Polyakov <appro@openssl.org>
-rw-r--r--crypto/rc5/Makefile.in2
-rw-r--r--crypto/rc5/asm/rc5-586.pl5
-rw-r--r--crypto/rc5/build.info8
3 files changed, 8 insertions, 7 deletions
diff --git a/crypto/rc5/Makefile.in b/crypto/rc5/Makefile.in
index bd7a1c6613..501b118f72 100644
--- a/crypto/rc5/Makefile.in
+++ b/crypto/rc5/Makefile.in
@@ -40,7 +40,7 @@ lib: $(LIBOBJ)
@touch lib
rc5-586.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
- $(PERL) asm/rc5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
+ $(PERL) asm/rc5-586.pl $(PERLASM_SCHEME) $(CFLAGS) $@
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
diff --git a/crypto/rc5/asm/rc5-586.pl b/crypto/rc5/asm/rc5-586.pl
index 61ac6effc6..a0d85f2ba9 100644
--- a/crypto/rc5/asm/rc5-586.pl
+++ b/crypto/rc5/asm/rc5-586.pl
@@ -5,6 +5,9 @@ push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
require "cbc.pl";
+$output = pop;
+open STDOUT,">$output";
+
&asm_init($ARGV[0],"rc5-586.pl");
$RC5_MAX_ROUNDS=16;
@@ -22,6 +25,8 @@ $tmp4="edx";
&cbc("RC5_32_cbc_encrypt","RC5_32_encrypt","RC5_32_decrypt",0,4,5,3,-1,-1);
&asm_finish();
+close STDOUT;
+
sub RC5_32_encrypt
{
local($name,$enc)=@_;
diff --git a/crypto/rc5/build.info b/crypto/rc5/build.info
index 0cf704b856..bb6e5a5b2a 100644
--- a/crypto/rc5/build.info
+++ b/crypto/rc5/build.info
@@ -2,9 +2,5 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
rc5_skey.c rc5_ecb.c {- $target{rc5_asm_src} -} rc5cfb64.c rc5ofb64.c
-BEGINRAW[Makefile]
-##### RC5 assembler implementations
-
-{- $builddir -}/rc5-586.s: {- $sourcedir -}/asm/rc5-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl {- $sourcetop -}/crypto/perlasm/cbc.pl
- CC="$(CC)" $(PERL) {- $sourcedir -}/asm/rc5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
-ENDRAW[Makefile]
+GENERATE[rc5-586.s]=asm/rc5-586.pl $(PERLASM_SCHEME) $(CFLAGS)
+DEPEND[rc5-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl