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