From 8fcb61dcdf00da7f8763a20735b82afe7a7b82ec Mon Sep 17 00:00:00 2001 From: Samuel Neves Date: Mon, 12 Nov 2018 08:27:52 +0000 Subject: chacha20: begin adapting to kernel setting Signed-off-by: Samuel Neves --- src/crypto/zinc/perlasm/x86_64-xlate.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/crypto/zinc/perlasm/x86_64-xlate.pl') diff --git a/src/crypto/zinc/perlasm/x86_64-xlate.pl b/src/crypto/zinc/perlasm/x86_64-xlate.pl index f8380f2..e4e6c85 100644 --- a/src/crypto/zinc/perlasm/x86_64-xlate.pl +++ b/src/crypto/zinc/perlasm/x86_64-xlate.pl @@ -70,6 +70,7 @@ if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } open STDOUT,">$output" || die "can't open $output: $!" if (defined($output)); +my $kernel=0; $kernel=1 if ($flavour =~ /linux/); my $gas=1; $gas=0 if ($output =~ /\.asm$/); my $elf=1; $elf=0 if (!$gas); my $win64=0; @@ -1134,7 +1135,7 @@ while(defined(my $line=<>)) { $line =~ s|\R$||; # Better chomp - $line =~ s|[#!].*$||; # get rid of asm-style comments... + $line =~ s|[#!](?!include)(?!ifdef)(?!endif).*$||; # get rid of asm-style comments... $line =~ s|/\*.*\*/||; # ... and C-style comments... $line =~ s|^\s+||; # ... and skip white spaces in beginning $line =~ s|\s+$||; # ... and at the end -- cgit v1.2.3-59-g8ed1b