]>
git.ipfire.org Git - thirdparty/freeswitch.git/blob - libs/libzrtp/third_party/bnlib/lbn68020.h
2 * Copyright (c) 1995 Colin Plumb. All rights reserved.
3 * For licensing and other legal details, see the file legal.c.
5 * lbn68020.h - 32-bit bignum primitives for the 68020 (or 683xx) processors.
7 * These primitives use little-endian word order.
8 * (The order of bytes within words is irrelevant.)
10 #define BN_LITTLE_ENDIAN 1
12 typedef unsigned long bnword32
;
13 #define BNWORD32 bnword32
15 bnword32
lbnSub1_32(bnword32
*num
, unsigned len
, bnword32 borrow
);
16 bnword32
lbnAdd1_32(bnword32
*num
, unsigned len
, bnword32 carry
);
17 void lbnMulN1_32(bnword32
*out
, bnword32
const *in
, unsigned len
, bnword32 k
);
19 lbnMulAdd1_32(bnword32
*out
, bnword32
const *in
, unsigned len
, bnword32 k
);
21 lbnMulSub1_32(bnword32
*out
, bnword32
const *in
, unsigned len
, bnword32 k
);
22 bnword32
lbnDiv21_32(bnword32
*q
, bnword32 nh
, bnword32 nl
, bnword32 d
);
23 unsigned lbnModQ_32(bnword32
const *n
, unsigned len
, unsigned d
);
25 /* #define the values to exclude the C versions */
26 #define lbnSub1_32 lbnSub1_32
27 #define lbnAdd1_32 lbnAdd1_32
28 #define lbnMulN1_32 lbnMulN1_32
29 #define lbnMulAdd1_32 lbnMulAdd1_32
30 #define lbnMulSub1_32 lbnMulSub1_32
31 #define lbnDiv21_32 lbnDiv21_32
32 #define lbnModQ_32 lbnModQ_32