add.pl revision 7c478bd95313f5f23a4c958a745db2134aa03244
# x86 assember
sub bn_add_words
{
local($name)=@_;
&comment("");
$a="esi";
$b="edi";
$c="eax";
$r="ebx";
$tmp1="ecx";
$tmp2="edx";
$num="ebp";
&xor($c,$c); # clear carry
for ($i=0; $i<8; $i++)
{
&comment("Round $i");
&mov($c,0);
&adc($c,$c);
&adc($c,0);
}
&comment("");
&add($a,32);
&add($b,32);
&add($r,32);
for ($i=0; $i<7; $i++)
{
&comment("Tail Round $i");
&mov($c,0);
&adc($c,$c);
&adc($c,0);
}
# &mov("eax",$c); # $c is "eax"
&function_end($name);
}
1;