Use for \n
[gnuk/gnuk.git] / src / muladd_256.h
1 #define MULADD_256_ASM(s_,d_,w_,c_)                      \
2  asm ( "ldmia  %[s]!, { r8, r9, r10 } \n\t"              \
3        "ldmia  %[d], { r5, r6, r7 }   \n\t"              \
4        "umull  r4, r8, %[w], r8       \n\t"              \
5        "adds   r5, r5, r4             \n\t"              \
6        "adcs   r6, r6, r8             \n\t"              \
7        "umull  r4, r8, %[w], r9       \n\t"              \
8        "adc    %[c], r8, #0           \n\t"              \
9        "adds   r6, r6, r4             \n\t"              \
10        "adcs   r7, r7, %[c]           \n\t"              \
11        "umull  r4, r8, %[w], r10      \n\t"              \
12        "adc    %[c], r8, #0           \n\t"              \
13        "adds   r7, r7, r4             \n\t"              \
14        "stmia  %[d]!, { r5, r6, r7 }  \n\t"              \
15        "ldmia  %[s]!, { r8, r9, r10 } \n\t"              \
16        "ldmia  %[d], { r5, r6, r7 }   \n\t"              \
17        "adcs   r5, r5, %[c]           \n\t"              \
18        "umull  r4, r8, %[w], r8       \n\t"              \
19        "adc    %[c], r8, #0           \n\t"              \
20        "adds   r5, r5, r4             \n\t"              \
21        "adcs   r6, r6, %[c]           \n\t"              \
22        "umull  r4, r8, %[w], r9       \n\t"              \
23        "adc    %[c], r8, #0           \n\t"              \
24        "adds   r6, r6, r4             \n\t"              \
25        "adcs   r7, r7, %[c]           \n\t"              \
26        "umull  r4, r8, %[w], r10      \n\t"              \
27        "adc    %[c], r8, #0           \n\t"              \
28        "adds   r7, r7, r4             \n\t"              \
29        "stmia  %[d]!, { r5, r6, r7 }  \n\t"              \
30        "ldmia  %[s]!, { r8, r9 }      \n\t"              \
31        "ldmia  %[d], { r5, r6 }       \n\t"              \
32        "adcs   r5, r5, %[c]           \n\t"              \
33        "umull  r4, r8, %[w], r8       \n\t"              \
34        "adc    %[c], r8, #0           \n\t"              \
35        "adds   r5, r5, r4             \n\t"              \
36        "adcs   r6, r6, %[c]           \n\t"              \
37        "umull  r4, r8, %[w], r9       \n\t"              \
38        "adc    %[c], r8, #0           \n\t"              \
39        "adds   r6, r6, r4             \n\t"              \
40        "adc    %[c], %[c], #0         \n\t"              \
41        "stmia  %[d]!, { r5, r6 }"                        \
42        : [s] "=&r" (s_), [d] "=&r" (d_), [c] "=&r" (c_)  \
43        : "[s]" (s_), "[d]" (d_), [w] "r" (w_)            \
44        : "r4", "r5", "r6", "r7", "r8", "r9", "r10",      \
45          "memory", "cc" )
46
47 #define MULADD_256(s__,d__,w__,c__) do { \
48   MULADD_256_ASM(s__,d__,w__,c__);       \
49   *d__ = c__;                            \
50 } while (0)