Commit c5f17d45 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Further synchronizations with md32_common.h update, consistent naming

for low-level SHA block routines.
parent 31439046
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ sub BODY_40_59
	&add($f,$e);			# f+=ROTATE(a,5)
	}

&function_begin("sha1_block_asm_data_order",16);
&function_begin("sha1_block_data_order",16);
	&mov($tmp1,&wparam(0));	# SHA_CTX *c
	&mov($T,&wparam(1));	# const void *input
	&mov($A,&wparam(2));	# size_t num
@@ -214,7 +214,7 @@ sub BODY_40_59
	&jb(&label("loop"));

	&stack_pop(16);
&function_end("sha1_block_asm_data_order");
&function_end("sha1_block_data_order");
&asciz("SHA1 block transform for x86, CRYPTOGAMS by <appro\@openssl.org>");

&asm_finish();
+5 −5
Original line number Diff line number Diff line
@@ -239,11 +239,11 @@ tmp3=r11;
ctx=r32;	// in0
inp=r33;	// in1

// void sha1_block_asm_data_order(SHA_CTX *c,const void *p,size_t num);
.global	sha1_block_asm_data_order#
.proc	sha1_block_asm_data_order#
// void sha1_block_data_order(SHA_CTX *c,const void *p,size_t num);
.global	sha1_block_data_order#
.proc	sha1_block_data_order#
.align	32
sha1_block_asm_data_order:
sha1_block_data_order:
	.prologue
{ .mmi;	alloc	tmp1=ar.pfs,3,15,0,0
	$ADDP	tmp0=4,ctx
@@ -306,7 +306,7 @@ $code.=<<___;
{ .mib;	st4	[ctx]=$h4,-16
	mov	pr=r2,0x1ffff
	br.ret.sptk.many	b0	};;
.endp	sha1_block_asm_data_order#
.endp	sha1_block_data_order#
___

print $code;
+2 −2
Original line number Diff line number Diff line
@@ -158,9 +158,9 @@ ___
$code=<<___;
.text

.globl	.sha1_block_asm_data_order
.globl	.sha1_block_data_order
.align	4
.sha1_block_asm_data_order:
.sha1_block_data_order:
	mflr	r0
	$STU	$sp,`-($FRAME+64)`($sp)
	$PUSH	r0,`$FRAME-$SIZE_T*18`($sp)
+4 −2
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ $code.=<<___ if ($i<79);
	rol	\$30,$b
	add	$t0,$f
	rol	\$1,$xi
___
$code.=<<___ if ($i<76);
	mov	$xi,`4*($j%16)`(%rsp)
___
$code.=<<___ if ($i==79);
@@ -200,7 +202,7 @@ ___

$code=".text\n";

&PROLOGUE("sha1_block_asm_data_order");
&PROLOGUE("sha1_block_data_order");
$code.=".align	4\n.Lloop:\n";
for($i=0;$i<20;$i++)	{ &BODY_00_19($i,@V); unshift(@V,pop(@V)); }
for(;$i<40;$i++)	{ &BODY_20_39($i,@V); unshift(@V,pop(@V)); }
@@ -227,7 +229,7 @@ $code.=<<___;
	sub	\$1,$num
	jnz	.Lloop
___
&EPILOGUE("sha1_block_asm_data_order");
&EPILOGUE("sha1_block_data_order");
$code.=<<___;
.asciz	"SHA1 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>"
___
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ if ($output =~ /512.*\.[s|asm]/) {
	$ADD="add";
	$SHRU="shr.u";
	$TABLE="K512";
	$func="sha512_block";
	$func="sha512_block_data_order";
	@Sigma0=(28,34,39);
	@Sigma1=(14,18,41);
	@sigma0=(1,  8, 7);
@@ -85,7 +85,7 @@ if ($output =~ /512.*\.[s|asm]/) {
	$ADD="padd4";
	$SHRU="pshr4.u";
	$TABLE="K256";
	$func="sha256_block";
	$func="sha256_block_data_order";
	@Sigma0=( 2,13,22);
	@Sigma1=( 6,11,25);
	@sigma0=( 7,18, 3);
Loading