SPARCv9 assembly pack: unify build rules and argument handling.
[openssl.git] / crypto / bn / asm / sparcv9-mont.pl
index c08d8223f7d9318e5bca9472afa0dce532f2f5ab..4f922c3110e1230c472b5e6b85d3dfc7a9059ffc 100644 (file)
@@ -53,10 +53,8 @@ $np="%i3";   # const BN_ULONG *np,
 $n0="%i4";     # const BN_ULONG *n0,
 $num="%i5";    # int num);
 
-$bits=32;
-for (@ARGV)    { $bits=64 if (/\-m64/ || /\-xarch\=v9/); }
-if ($bits==64) { $bias=2047; $frame=192; }
-else           { $bias=0;    $frame=128; }
+$frame="STACK_FRAME";
+$bias="STACK_BIAS";
 
 $car0="%o0";
 $car1="%o1";
@@ -79,6 +77,8 @@ $tpj="%l7";
 $fname="bn_mul_mont_int";
 
 $code=<<___;
+#include "sparc_arch.h"
+
 .section       ".text",#alloc,#execinstr
 
 .global        $fname
@@ -108,7 +108,7 @@ $fname:
        ld      [$np],$car1             ! np[0]
        sub     %o7,$bias,%sp           ! alloca
        ld      [$np+4],$npj            ! np[1]
-       be,pt   `$bits==32?"%icc":"%xcc"`,.Lbn_sqr_mont
+       be,pt   SIZE_T_CC,.Lbn_sqr_mont
        mov     12,$j
 
        mulx    $car0,$mul0,$car0       ! ap[0]*bp[0]