Commit | Line | Data |
---|---|---|
fa4dfedc DM |
1 | #include <linux/linkage.h> |
2 | #include <asm/visasm.h> | |
3 | ||
7cff82f5 DM |
4 | #include "opcodes.h" |
5 | ||
fa4dfedc DM |
6 | ENTRY(md5_sparc64_transform) |
7 | /* %o0 = digest, %o1 = data, %o2 = rounds */ | |
8 | VISEntryHalf | |
9 | ld [%o0 + 0x00], %f0 | |
10 | ld [%o0 + 0x04], %f1 | |
11 | andcc %o1, 0x7, %g0 | |
12 | ld [%o0 + 0x08], %f2 | |
13 | bne,pn %xcc, 10f | |
14 | ld [%o0 + 0x0c], %f3 | |
15 | ||
16 | 1: | |
17 | ldd [%o1 + 0x00], %f8 | |
18 | ldd [%o1 + 0x08], %f10 | |
19 | ldd [%o1 + 0x10], %f12 | |
20 | ldd [%o1 + 0x18], %f14 | |
21 | ldd [%o1 + 0x20], %f16 | |
22 | ldd [%o1 + 0x28], %f18 | |
23 | ldd [%o1 + 0x30], %f20 | |
24 | ldd [%o1 + 0x38], %f22 | |
25 | ||
7cff82f5 | 26 | MD5 |
fa4dfedc DM |
27 | |
28 | subcc %o2, 1, %o2 | |
29 | bne,pt %xcc, 1b | |
30 | add %o1, 0x40, %o1 | |
31 | ||
32 | 5: | |
33 | st %f0, [%o0 + 0x00] | |
34 | st %f1, [%o0 + 0x04] | |
35 | st %f2, [%o0 + 0x08] | |
36 | st %f3, [%o0 + 0x0c] | |
37 | retl | |
38 | VISExitHalf | |
39 | 10: | |
40 | alignaddr %o1, %g0, %o1 | |
41 | ||
42 | ldd [%o1 + 0x00], %f10 | |
43 | 1: | |
44 | ldd [%o1 + 0x08], %f12 | |
45 | ldd [%o1 + 0x10], %f14 | |
46 | ldd [%o1 + 0x18], %f16 | |
47 | ldd [%o1 + 0x20], %f18 | |
48 | ldd [%o1 + 0x28], %f20 | |
49 | ldd [%o1 + 0x30], %f22 | |
50 | ldd [%o1 + 0x38], %f24 | |
51 | ldd [%o1 + 0x40], %f26 | |
52 | ||
53 | faligndata %f10, %f12, %f8 | |
54 | faligndata %f12, %f14, %f10 | |
55 | faligndata %f14, %f16, %f12 | |
56 | faligndata %f16, %f18, %f14 | |
57 | faligndata %f18, %f20, %f16 | |
58 | faligndata %f20, %f22, %f18 | |
59 | faligndata %f22, %f24, %f20 | |
60 | faligndata %f24, %f26, %f22 | |
61 | ||
7cff82f5 | 62 | MD5 |
fa4dfedc DM |
63 | |
64 | subcc %o2, 1, %o2 | |
45dfe237 | 65 | fsrc2 %f26, %f10 |
fa4dfedc DM |
66 | bne,pt %xcc, 1b |
67 | add %o1, 0x40, %o1 | |
68 | ||
69 | ba,a,pt %xcc, 5b | |
70 | ENDPROC(md5_sparc64_transform) |