x86_64 assembler pack to comply with updated styling x86_64-xlate.pl rules.
[openssl.git] / crypto / bn / asm / x86_64-gcc.c
index d13ec5a..c4d941d 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef __SUNPRO_C
+# include "../bn_asm.c"        /* kind of dirty hack for Sun Studio */
+#else
 /*
  * x86_64 BIGNUM accelerator version 0.1, December 2002.
  *
@@ -179,14 +182,14 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
 
        asm (
        "       subq    %2,%2           \n"
-       ".align 16                      \n"
+       ".p2align 4                     \n"
        "1:     movq    (%4,%2,8),%0    \n"
        "       adcq    (%5,%2,8),%0    \n"
        "       movq    %0,(%3,%2,8)    \n"
        "       leaq    1(%2),%2        \n"
        "       loop    1b              \n"
        "       sbbq    %0,%0           \n"
-               : "+a"(ret),"+c"(n),"+r"(i)
+               : "=&a"(ret),"+c"(n),"=&r"(i)
                : "r"(rp),"r"(ap),"r"(bp)
                : "cc"
        );
@@ -202,14 +205,14 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
 
        asm (
        "       subq    %2,%2           \n"
-       ".align 16                      \n"
+       ".p2align 4                     \n"
        "1:     movq    (%4,%2,8),%0    \n"
        "       sbbq    (%5,%2,8),%0    \n"
        "       movq    %0,(%3,%2,8)    \n"
        "       leaq    1(%2),%2        \n"
        "       loop    1b              \n"
        "       sbbq    %0,%0           \n"
-               : "+a"(ret),"+c"(n),"+r"(i)
+               : "=&a"(ret),"+c"(n),"=&r"(i)
                : "r"(rp),"r"(ap),"r"(bp)
                : "cc"
        );
@@ -591,3 +594,4 @@ void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a)
        r[6]=c1;
        r[7]=c2;
        }
+#endif