2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
12 l|=((unsigned long)(*((c)++)))<< 8L, \
13 l|=((unsigned long)(*((c)++)))<<16L, \
14 l|=((unsigned long)(*((c)++)))<<24L)
16 /* NOTE - c is not incremented as per c2l */
18 #define c2ln(c,l1,l2,n) { \
22 case 8: l2 =((unsigned long)(*(--(c))))<<24L; \
23 case 7: l2|=((unsigned long)(*(--(c))))<<16L; \
24 case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \
25 case 5: l2|=((unsigned long)(*(--(c)))); \
26 case 4: l1 =((unsigned long)(*(--(c))))<<24L; \
27 case 3: l1|=((unsigned long)(*(--(c))))<<16L; \
28 case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \
29 case 1: l1|=((unsigned long)(*(--(c)))); \
34 #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
35 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
36 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
37 *((c)++)=(unsigned char)(((l)>>24L)&0xff))
39 /* NOTE - c is not incremented as per l2c */
41 #define l2cn(l1,l2,c,n) { \
44 case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \
45 case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \
46 case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \
47 case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
48 case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \
49 case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \
50 case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \
51 case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
55 /* NOTE - c is not incremented as per n2l */
56 #define n2ln(c,l1,l2,n) { \
60 case 8: l2 =((unsigned long)(*(--(c)))) ; \
61 case 7: l2|=((unsigned long)(*(--(c))))<< 8; \
62 case 6: l2|=((unsigned long)(*(--(c))))<<16; \
63 case 5: l2|=((unsigned long)(*(--(c))))<<24; \
64 case 4: l1 =((unsigned long)(*(--(c)))) ; \
65 case 3: l1|=((unsigned long)(*(--(c))))<< 8; \
66 case 2: l1|=((unsigned long)(*(--(c))))<<16; \
67 case 1: l1|=((unsigned long)(*(--(c))))<<24; \
71 /* NOTE - c is not incremented as per l2n */
72 #define l2nn(l1,l2,c,n) { \
75 case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \
76 case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
77 case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
78 case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
79 case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \
80 case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
81 case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
82 case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
87 #define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
88 l|=((unsigned long)(*((c)++)))<<16L, \
89 l|=((unsigned long)(*((c)++)))<< 8L, \
90 l|=((unsigned long)(*((c)++))))
93 #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
94 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
95 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
96 *((c)++)=(unsigned char)(((l) )&0xff))
99 t=(x0+(x1& ~x3)+(x2&x3)+ *(p0++))&0xffff; \
101 t=(x1+(x2& ~x0)+(x3&x0)+ *(p0++))&0xffff; \
103 t=(x2+(x3& ~x1)+(x0&x1)+ *(p0++))&0xffff; \
105 t=(x3+(x0& ~x2)+(x1&x2)+ *(p0++))&0xffff; \