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