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