]> git.ipfire.org Git - thirdparty/freeswitch.git/blob - libs/libzrtp/third_party/bnlib/lbn68000.h
[mod_http_cache] Fix leaking curl handle in http_get()
[thirdparty/freeswitch.git] / libs / libzrtp / third_party / bnlib / lbn68000.h
1 /*
2 * Copyright (c) 1995 Colin Plumb. All rights reserved.
3 * For licensing and other legal details, see the file legal.c.
4 *
5 * lbn68000.h - 16-bit bignum primitives for the 68000 (or 68010) processors.
6 *
7 * These primitives use little-endian word order.
8 * (The order of bytes within words is irrelevant.)
9 */
10 #define BN_LITTLE_ENDIAN 1
11
12 typedef unsigned short bnword16
13 #define BNWORD16 bnword16
14
15 bnword16 lbnSub1_16(bnword16 *num, unsigned len, bnword16 borrow);
16 bnword16 lbnAdd1_16(bnword16 *num, unsigned len, bnword16 carry);
17 void lbnMulN1_16(bnword16 *out, bnword16 const *in, unsigned len, bnword16 k);
18 bnword16
19 lbnMulAdd1_16(bnword16 *out, bnword16 const *in, unsigned len, bnword16 k);
20 bnword16
21 lbnMulSub1_16(bnword16 *out, bnword16 const *in, unsigned len, bnword16 k);
22 bnword16 lbnDiv21_16(bnword16 *q, bnword16 nh, bnword16 nl, bnword16 d);
23 unsigned lbnModQ_16(bnword16 const *n, unsigned len, bnword16 d);
24
25 int is68020(void);
26
27 /* #define the values to exclude the C versions */
28 #define lbnSub1_16 lbnSub1_16
29 #define lbnAdd1_16 lbnAdd1_16
30 #define lbnMulN1_16 lbnMulN1_16
31 #define lbnMulAdd1_16 lbnMulAdd1_16
32 #define lbnMulSub1_16 lbnMulSub1_16
33 #define lbnDiv21_16 lbnDiv21_16
34 #define lbnModQ_16 lbnModQ_16
35
36 /* Also include the 68020 definitions for 16/32 bit switching versions. */
37 #include <lbn68020.h>