Start 1.33.0 development cycle
[oweals/busybox.git] / networking / tls_pstm_montgomery_reduce.c
index e9ae81c537e689eab1c1f6d3dc2bf32d874b5afe..20f9c26d5fced042f467e3e9427aba639dbafbad 100644 (file)
@@ -6,7 +6,7 @@
 #include "tls.h"
 
 /* The file is taken almost verbatim from matrixssl-3-7-2b-open/crypto/math/.
- * Changes are flagged with ///bbox
+ * Changes are flagged with //bbox
  */
 
 /**
@@ -43,7 +43,7 @@
  */
 /******************************************************************************/
 
-///bbox
+//bbox
 //#include "../cryptoApi.h"
 #ifndef DISABLE_PSTM
 
@@ -73,7 +73,7 @@ asm(                                                      \
    "movl %%edx,%1 \n\t"                                   \
 :"=g"(_c[LO]), "=r"(cy)                                   \
 :"0"(_c[LO]), "1"(cy), "g"(mu), "g"(*tmpm++)              \
-: "%eax", "%edx", "%cc")
+: "%eax", "%edx", "cc")
 
 #define PROPCARRY                           \
 asm(                                        \
@@ -82,7 +82,7 @@ asm(                                        \
    "movzbl %%al,%1 \n\t"                    \
 :"=g"(_c[LO]), "=r"(cy)                     \
 :"0"(_c[LO]), "1"(cy)                       \
-: "%eax", "%cc")
+: "%eax", "cc")
 
 /******************************************************************************/
 #elif defined(PSTM_X86_64)
@@ -235,7 +235,7 @@ asm(                                \
        " STR    r0,%1            \n\t" \
        :"=r"(cy),"=m"(_c[0])\
        :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\
-       :"r0","%cc");
+       :"r0","cc");
 #define PROPCARRY                  \
 asm(                               \
        " LDR   r0,%1            \n\t" \
@@ -246,7 +246,7 @@ asm(                               \
        " MOVCC %0,#0            \n\t" \
        :"=r"(cy),"=m"(_c[0])\
        :"0"(cy),"m"(_c[0])\
-       :"r0","%cc");
+       :"r0","cc");
 #else /* Non-Thumb2 code */
 //#pragma message ("Using 32 bit ARM Assembly Optimizations")
 #define INNERMUL                    \
@@ -259,7 +259,7 @@ asm(                                \
        " STR    r0,%1            \n\t" \
        :"=r"(cy),"=m"(_c[0])\
        :"0"(cy),"r"(mu),"r"(*tmpm++),"m"(_c[0])\
-       :"r0","%cc");
+       :"r0","cc");
 #define PROPCARRY                  \
 asm(                               \
        " LDR   r0,%1            \n\t" \
@@ -269,7 +269,7 @@ asm(                               \
        " MOVCC %0,#0            \n\t" \
        :"=r"(cy),"=m"(_c[0])\
        :"0"(cy),"m"(_c[0])\
-       :"r0","%cc");
+       :"r0","cc");
 #endif /* __thumb2__ */
 
 
@@ -340,12 +340,12 @@ asm(                                  \
 #define LO 0
 
 /* computes x/R == x (mod N) via Montgomery Reduction */
-int32 pstm_montgomery_reduce(psPool_t *pool, pstm_int *a, pstm_int *m,
+int32 FAST_FUNC pstm_montgomery_reduce(psPool_t *pool, pstm_int *a, pstm_int *m,
                pstm_digit mp, pstm_digit *paD, uint32 paDlen)
 {
        pstm_digit      *c, *_c, *tmpm, mu;
        int32           oldused, x, y;
-       int16           pa;
+       int             pa; //bbox: was int16
 
        pa = m->used;
        if (pa > a->alloc) {
@@ -357,7 +357,7 @@ int32 pstm_montgomery_reduce(psPool_t *pool, pstm_int *a, pstm_int *m,
                c = paD;
                memset(c, 0x0, paDlen);
        } else {
-               c = xzalloc(2*pa+1);///bbox
+               c = xzalloc(2*pa+1);//bbox
        }
        /* copy the input */
        oldused = a->used;