xref: /freebsd/sys/crypto/openssl/powerpc64/poly1305-ppc.S (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1/* Do not modify. This file is auto-generated from poly1305-ppc.pl. */
2.machine	"any"
3.abiversion	2
4.text
5.globl	poly1305_init_int
6.type	poly1305_init_int,@function
7.align	4
8poly1305_init_int:
9.localentry	poly1305_init_int,0
10
11	xor	0,0,0
12	std	0,0(3)
13	std	0,8(3)
14	std	0,16(3)
15
16	cmpld	4,0
17	beq-	.Lno_key
18	li	7,4
19	lwbrx	10,0,4
20	li	11,8
21	lwbrx	7,7,4
22	li	8,12
23	lwbrx	11,11,4
24	lwbrx	8,8,4
25	insrdi	10,7,32,0
26	insrdi	11,8,32,0
27	lis	8,0xfff
28	ori	8,8,0xfffc
29	insrdi	8,8,32,0
30	ori	7,8,3
31
32	and	10,10,7
33	and	11,11,8
34
35	std	10,32(3)
36	std	11,40(3)
37
38.Lno_key:
39	xor	3,3,3
40	blr
41.long	0
42.byte	0,12,0x14,0,0,0,2,0
43.size	poly1305_init_int,.-poly1305_init_int
44
45.globl	poly1305_blocks
46.type	poly1305_blocks,@function
47.align	4
48poly1305_blocks:
49.localentry	poly1305_blocks,0
50
51	srdi.	5,5,4
52	beq-	.Labort
53
54	stdu	1,-192(1)
55	mflr	0
56	std	27,152(1)
57	std	28,160(1)
58	std	29,168(1)
59	std	30,176(1)
60	std	31,184(1)
61	std	0,208(1)
62
63	ld	27,32(3)
64	ld	28,40(3)
65
66	ld	7,0(3)
67	ld	8,8(3)
68	ld	9,16(3)
69
70	srdi	29,28,2
71	mtctr	5
72	add	29,29,28
73	li	0,3
74	b	.Loop
75
76.align	4
77.Loop:
78	li	10,4
79	lwbrx	30,0,4
80	li	31,8
81	lwbrx	10,10,4
82	li	11,12
83	lwbrx	31,31,4
84	lwbrx	11,11,4
85	insrdi	30,10,32,0
86	insrdi	31,11,32,0
87	addi	4,4,16
88
89	addc	7,7,30
90	adde	8,8,31
91
92	mulld	10,7,27
93	mulhdu	11,7,27
94	adde	9,9,6
95
96	mulld	30,8,29
97	mulhdu	31,8,29
98	addc	10,10,30
99	adde	11,11,31
100
101	mulld	30,7,28
102	mulhdu	12,7,28
103	addc	11,11,30
104	addze	12,12
105
106	mulld	30,8,27
107	mulhdu	31,8,27
108	addc	11,11,30
109	adde	12,12,31
110
111	mulld	30,9,29
112	mulld	31,9,27
113	addc	11,11,30
114	adde	12,12,31
115
116	andc	30,12,0
117	and	9,12,0
118	srdi	31,30,2
119	add	30,30,31
120	addc	7,10,30
121	addze	8,11
122	addze	9,9
123
124	bdnz	.Loop
125
126	std	7,0(3)
127	std	8,8(3)
128	std	9,16(3)
129
130	ld	27,152(1)
131	ld	28,160(1)
132	ld	29,168(1)
133	ld	30,176(1)
134	ld	31,184(1)
135	addi	1,1,192
136.Labort:
137	blr
138.long	0
139.byte	0,12,4,1,0x80,5,4,0
140.size	poly1305_blocks,.-poly1305_blocks
141
142.globl	poly1305_emit
143.type	poly1305_emit,@function
144.align	4
145poly1305_emit:
146.localentry	poly1305_emit,0
147
148	ld	7,0(3)
149	ld	8,8(3)
150	ld	9,16(3)
151	ld	6,0(5)
152	ld	5,8(5)
153
154	addic	10,7,5
155	addze	11,8
156	addze	12,9
157
158	srdi	0,12,2
159	neg	0,0
160
161	andc	7,7,0
162	and	10,10,0
163	andc	8,8,0
164	and	11,11,0
165	or	7,7,10
166	or	8,8,11
167	rotldi	6,6,32
168	rotldi	5,5,32
169	addc	7,7,6
170	adde	8,8,5
171	rldicl	0,7,32,32
172	li	10,4
173	stwbrx	7,0,4
174	rldicl	7,8,32,32
175	li	11,8
176	stwbrx	0,10,4
177	li	12,12
178	stwbrx	8,11,4
179	stwbrx	7,12,4
180	blr
181.long	0
182.byte	0,12,0x14,0,0,0,3,0
183.size	poly1305_emit,.-poly1305_emit
184.byte	80,111,108,121,49,51,48,53,32,102,111,114,32,80,80,67,44,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
185.align	2
186