]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/giantPort_PPC_Gnu.h
2 * giantPort_PPC_Gnu.h - giant definitions, PPC/GNU version.
5 #ifndef _CK_NSGIANT_PORT_PPC_GNU_H_
6 #define _CK_NSGIANT_PORT_PPC_GNU_H_
10 #include "giantIntegers.h"
16 /* define this true to disable this module and use generic C versions instead */
17 #define PPC_GIANT_PORT_INLINE 0
19 #if PPC_GIANT_PORT_INLINE
21 #include "giantPort_Generic.h"
23 #else // PPC_GIANT_PORT_INLINE
26 * Multiple-precision arithmetic routines/macros implemented in
31 * Add two digits, return sum. Carry bit returned as an out parameter.
33 extern giantDigit
giantAddDigits(
36 giantDigit
*carry
); /* RETURNED, 0 or 1 */
39 * Add a single digit value to a double digit accumulator in place.
40 * Carry out of the MSD of the accumulator is not handled.
43 giantDigit
*accLow
, /* IN/OUT */
44 giantDigit
*accHigh
, /* IN/OUT */
49 * Subtract a - b, return difference. Borrow bit returned as an out parameter.
51 giantDigit
giantSubDigits(
54 giantDigit
*borrow
); /* RETURNED, 0 or 1 */
58 * Multiply two digits, return two digits.
63 giantDigit
*lowProduct
, /* RETURNED, low digit */
64 giantDigit
*hiProduct
); /* RETURNED, high digit */
67 * Multiply a vector of giantDigits, candVector, by a single giantDigit,
68 * plierDigit, adding results into prodVector. Returns m.s. digit from
69 * final multiply; only candLength digits of *prodVector will be written.
71 giantDigit
VectorMultiply(
72 giantDigit plierDigit
,
73 giantDigit
*candVector
,
75 giantDigit
*prodVector
);
81 #endif /* !PPC_GIANT_PORT_INLINE */
83 #endif /*_CK_NSGIANT_PORT_PPC_GNU_H_*/