diff options
author | Samuel Neves <sneves@dei.uc.pt> | 2018-11-12 08:27:52 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-11-14 23:59:05 -0800 |
commit | 8fcb61dcdf00da7f8763a20735b82afe7a7b82ec (patch) | |
tree | dde59313e0cf5f5dc4558f228266498bd78bacba /src/crypto/zinc/perlasm/x86_64-xlate.pl | |
parent | chacha20,poly1305: switch to perlasm originals on x86_64 (diff) | |
download | wireguard-monolithic-historical-8fcb61dcdf00da7f8763a20735b82afe7a7b82ec.tar.xz wireguard-monolithic-historical-8fcb61dcdf00da7f8763a20735b82afe7a7b82ec.zip |
chacha20: begin adapting to kernel setting
Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
Diffstat (limited to 'src/crypto/zinc/perlasm/x86_64-xlate.pl')
-rw-r--r-- | src/crypto/zinc/perlasm/x86_64-xlate.pl | 3 |
1 files changed, 2 insertions, 1 deletions
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 |