Latest update.
This commit is contained in:
@@ -56,8 +56,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
push(@INC,"${dir}","${dir}../../perlasm");
|
||||
require "x86asm.pl";
|
||||
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
$output=pop and open STDOUT,">$output";
|
||||
|
||||
&asm_init($ARGV[0]);
|
||||
|
||||
|
||||
@@ -37,9 +37,10 @@
|
||||
# 3 on Opteron] and which is *unacceptably* slow with 64-bit
|
||||
# operand.
|
||||
|
||||
$flavour = shift;
|
||||
$output = shift;
|
||||
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
|
||||
# $output is the last argument if it looks like a file (it has an extension)
|
||||
# $flavour is the first argument if it doesn't look like a file
|
||||
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
|
||||
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
|
||||
|
||||
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
|
||||
|
||||
@@ -48,7 +49,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
|
||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||
die "can't locate x86_64-xlate.pl";
|
||||
|
||||
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
|
||||
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
|
||||
or die "can't call $xlate: $!";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
sub L() { $code.=".byte ".join(',',@_)."\n"; }
|
||||
|
||||
@@ -20,8 +20,7 @@ ENDIF
|
||||
SOURCE[../../libcrypto]=wp_dgst.c $WPASM
|
||||
DEFINE[../../libcrypto]=$WPDEF
|
||||
|
||||
GENERATE[wp-mmx.s]=asm/wp-mmx.pl \
|
||||
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)
|
||||
GENERATE[wp-mmx.s]=asm/wp-mmx.pl
|
||||
DEPEND[wp-mmx.s]=../perlasm/x86asm.pl
|
||||
|
||||
GENERATE[wp-x86_64.s]=asm/wp-x86_64.pl $(PERLASM_SCHEME)
|
||||
GENERATE[wp-x86_64.s]=asm/wp-x86_64.pl
|
||||
@@ -36,6 +36,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "internal/cryptlib.h"
|
||||
#include "wp_locl.h"
|
||||
#include <string.h>
|
||||
|
||||
@@ -75,7 +76,6 @@ typedef unsigned long long u64;
|
||||
# define OPENSSL_SMALL_FOOTPRINT
|
||||
# endif
|
||||
# define GO_FOR_MMX(ctx,inp,num) do { \
|
||||
extern unsigned long OPENSSL_ia32cap_P[]; \
|
||||
void whirlpool_block_mmx(void *,const void *,size_t); \
|
||||
if (!(OPENSSL_ia32cap_P[0] & (1<<23))) break; \
|
||||
whirlpool_block_mmx(ctx->H.c,inp,num); return; \
|
||||
@@ -87,6 +87,7 @@ typedef unsigned long long u64;
|
||||
#ifndef PEDANTIC
|
||||
# if defined(_MSC_VER)
|
||||
# if defined(_WIN64) /* applies to both IA-64 and AMD64 */
|
||||
# include <stdlib.h>
|
||||
# pragma intrinsic(_rotl64)
|
||||
# define ROTATE(a,n) _rotl64((a),n)
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user