Fix build error and set version 2.7.1
[platform/upstream/nettle.git] / x86_64 / salsa20.m4
1 C Needs T0 and T1
2 C QROUND(x0, x1, x2, x3)
3 define(<QROUND>, <
4         movaps  $4, T0          C 0
5         paddd   $1, T0          C 1
6         movaps  T0, T1          C 2
7         pslld   <$>7, T0        C 2
8         psrld   <$>25, T1       C 3
9         pxor    T0, $2          C 3
10         pxor    T1, $2          C 4
11
12         movaps  $1, T0          C 0
13         paddd   $2, T0          C 5
14         movaps  T0, T1          C 6
15         pslld   <$>9, T0        C 6
16         psrld   <$>23, T1       C 7
17         pxor    T0, $3          C 7
18         pxor    T1, $3          C 8
19
20         movaps  $2, T0          C 0
21         paddd   $3, T0          C 9
22         movaps  T0, T1          C 10
23         pslld   <$>13, T0       C 10
24         psrld   <$>19, T1       C 11
25         pxor    T0, $4          C 11
26         pxor    T1, $4          C 12
27
28         movaps  $3, T0          C 0
29         paddd   $4, T0          C 13
30         movaps  T0, T1          C 14
31         pslld   <$>18, T0       C 14
32         psrld   <$>14, T1       C 15
33         pxor    T0, $1          C 15
34         pxor    T1, $1          C 16
35 >)
36
37 C SWAP(x0, x1, mask)
38 C Swaps bits in x0 and x1, with bits selected by the mask
39 define(<SWAP>, <
40         movaps  $1, T0
41         pxor    $2, $1
42         pand    $3, $1
43         pxor    $1, $2
44         pxor    T0, $1
45 >)