mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-14 01:53:41 +08:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
#!/usr/bin/env perl
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
#
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
|
||||
@@ -73,13 +80,16 @@
|
||||
# Sandy Bridge 7.70 6.10/+26% 4.99/+54%
|
||||
# Ivy Bridge 6.06 4.67/+30% 4.60/+32%
|
||||
# Haswell 5.45 4.15/+31% 3.57/+53%
|
||||
# Skylake 5.18 4.06/+28% 3.54/+46%
|
||||
# Bulldozer 9.11 5.95/+53%
|
||||
# VIA Nano 9.32 7.15/+30%
|
||||
# Atom 10.3 9.17/+12%
|
||||
# Silvermont 13.1(*) 9.37/+40%
|
||||
# Goldmont 8.13 6.42/+27% 1.70/+380%(**)
|
||||
#
|
||||
# (*) obviously suboptimal result, nothing was done about it,
|
||||
# because SSSE3 code is compiled unconditionally;
|
||||
# (**) SHAEXT result
|
||||
|
||||
$flavour = shift;
|
||||
$output = shift;
|
||||
@@ -107,14 +117,14 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([2-9]\.[0-9]+)/) {
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([2-9]\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
$shaext=1; ### set to zero if compiling for 1.0.1
|
||||
$avx=1 if (!$shaext && $avx);
|
||||
|
||||
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
$ctx="%rdi"; # 1st arg
|
||||
@@ -372,9 +382,9 @@ $code.=<<___;
|
||||
.align 16
|
||||
.Loop_shaext:
|
||||
dec $num
|
||||
lea 0x40($inp),%rax # next input block
|
||||
lea 0x40($inp),%r8 # next input block
|
||||
paddd @MSG[0],$E
|
||||
cmovne %rax,$inp
|
||||
cmovne %r8,$inp
|
||||
movdqa $ABCD,$ABCD_SAVE # offload $ABCD
|
||||
___
|
||||
for($i=0;$i<20-4;$i+=2) {
|
||||
|
||||
Reference in New Issue
Block a user