1*25c28e83SPiotr Jasiukajtis/*
2*25c28e83SPiotr Jasiukajtis * CDDL HEADER START
3*25c28e83SPiotr Jasiukajtis *
4*25c28e83SPiotr Jasiukajtis * The contents of this file are subject to the terms of the
5*25c28e83SPiotr Jasiukajtis * Common Development and Distribution License (the "License").
6*25c28e83SPiotr Jasiukajtis * You may not use this file except in compliance with the License.
7*25c28e83SPiotr Jasiukajtis *
8*25c28e83SPiotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*25c28e83SPiotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
10*25c28e83SPiotr Jasiukajtis * See the License for the specific language governing permissions
11*25c28e83SPiotr Jasiukajtis * and limitations under the License.
12*25c28e83SPiotr Jasiukajtis *
13*25c28e83SPiotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
14*25c28e83SPiotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*25c28e83SPiotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
16*25c28e83SPiotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
17*25c28e83SPiotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
18*25c28e83SPiotr Jasiukajtis *
19*25c28e83SPiotr Jasiukajtis * CDDL HEADER END
20*25c28e83SPiotr Jasiukajtis */
21*25c28e83SPiotr Jasiukajtis/*
22*25c28e83SPiotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
23*25c28e83SPiotr Jasiukajtis */
24*25c28e83SPiotr Jasiukajtis/*
25*25c28e83SPiotr Jasiukajtis * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26*25c28e83SPiotr Jasiukajtis * Use is subject to license terms.
27*25c28e83SPiotr Jasiukajtis */
28*25c28e83SPiotr Jasiukajtis
29*25c28e83SPiotr Jasiukajtis	.file	"__vsincosf.S"
30*25c28e83SPiotr Jasiukajtis
31*25c28e83SPiotr Jasiukajtis#include "libm.h"
32*25c28e83SPiotr Jasiukajtis
33*25c28e83SPiotr Jasiukajtis	RO_DATA
34*25c28e83SPiotr Jasiukajtis	.align	64
35*25c28e83SPiotr Jasiukajtisconstants:
36*25c28e83SPiotr Jasiukajtis	.word	0xbfc55554,0x60000000
37*25c28e83SPiotr Jasiukajtis	.word	0x3f811077,0xe0000000
38*25c28e83SPiotr Jasiukajtis	.word	0xbf29956b,0x60000000
39*25c28e83SPiotr Jasiukajtis	.word	0x3ff00000,0x00000000
40*25c28e83SPiotr Jasiukajtis	.word	0xbfe00000,0x00000000
41*25c28e83SPiotr Jasiukajtis	.word	0x3fa55554,0xa0000000
42*25c28e83SPiotr Jasiukajtis	.word	0xbf56c0c1,0xe0000000
43*25c28e83SPiotr Jasiukajtis	.word	0x3ef99e24,0xe0000000
44*25c28e83SPiotr Jasiukajtis	.word	0x3fe45f30,0x6dc9c883
45*25c28e83SPiotr Jasiukajtis	.word	0x43380000,0x00000000
46*25c28e83SPiotr Jasiukajtis	.word	0x3ff921fb,0x54400000
47*25c28e83SPiotr Jasiukajtis	.word	0x3dd0b461,0x1a626331
48*25c28e83SPiotr Jasiukajtis	.word	0x3f490fdb,0
49*25c28e83SPiotr Jasiukajtis	.word	0x49c90fdb,0
50*25c28e83SPiotr Jasiukajtis	.word	0x7f800000,0
51*25c28e83SPiotr Jasiukajtis	.word	0x80000000,0
52*25c28e83SPiotr Jasiukajtis
53*25c28e83SPiotr Jasiukajtis#define S0		0x0
54*25c28e83SPiotr Jasiukajtis#define S1		0x08
55*25c28e83SPiotr Jasiukajtis#define S2		0x10
56*25c28e83SPiotr Jasiukajtis#define one		0x18
57*25c28e83SPiotr Jasiukajtis#define mhalf		0x20
58*25c28e83SPiotr Jasiukajtis#define C0		0x28
59*25c28e83SPiotr Jasiukajtis#define C1		0x30
60*25c28e83SPiotr Jasiukajtis#define C2		0x38
61*25c28e83SPiotr Jasiukajtis#define invpio2		0x40
62*25c28e83SPiotr Jasiukajtis#define round		0x48
63*25c28e83SPiotr Jasiukajtis#define pio2_1		0x50
64*25c28e83SPiotr Jasiukajtis#define pio2_t		0x58
65*25c28e83SPiotr Jasiukajtis#define thresh1		0x60
66*25c28e83SPiotr Jasiukajtis#define thresh2		0x68
67*25c28e83SPiotr Jasiukajtis#define inf		0x70
68*25c28e83SPiotr Jasiukajtis#define signbit		0x78
69*25c28e83SPiotr Jasiukajtis
70*25c28e83SPiotr Jasiukajtis! local storage indices
71*25c28e83SPiotr Jasiukajtis
72*25c28e83SPiotr Jasiukajtis#define xsave		STACK_BIAS-0x8
73*25c28e83SPiotr Jasiukajtis#define ssave		STACK_BIAS-0x10
74*25c28e83SPiotr Jasiukajtis#define csave		STACK_BIAS-0x18
75*25c28e83SPiotr Jasiukajtis#define nsave		STACK_BIAS-0x1c
76*25c28e83SPiotr Jasiukajtis#define sxsave		STACK_BIAS-0x20
77*25c28e83SPiotr Jasiukajtis#define sssave		STACK_BIAS-0x24
78*25c28e83SPiotr Jasiukajtis#define junk		STACK_BIAS-0x28
79*25c28e83SPiotr Jasiukajtis#define n3		STACK_BIAS-0x38
80*25c28e83SPiotr Jasiukajtis#define n2		STACK_BIAS-0x40
81*25c28e83SPiotr Jasiukajtis#define n1		STACK_BIAS-0x48
82*25c28e83SPiotr Jasiukajtis#define n0		STACK_BIAS-0x50
83*25c28e83SPiotr Jasiukajtis! sizeof temp storage - must be a multiple of 16 for V9
84*25c28e83SPiotr Jasiukajtis#define tmps		0x50
85*25c28e83SPiotr Jasiukajtis
86*25c28e83SPiotr Jasiukajtis! register use
87*25c28e83SPiotr Jasiukajtis
88*25c28e83SPiotr Jasiukajtis! i0  n
89*25c28e83SPiotr Jasiukajtis! i1  x
90*25c28e83SPiotr Jasiukajtis! i2  stridex
91*25c28e83SPiotr Jasiukajtis! i3  s
92*25c28e83SPiotr Jasiukajtis! i4  strides
93*25c28e83SPiotr Jasiukajtis! i5  biguns
94*25c28e83SPiotr Jasiukajtis
95*25c28e83SPiotr Jasiukajtis! l0  ps0
96*25c28e83SPiotr Jasiukajtis! l1  ps1
97*25c28e83SPiotr Jasiukajtis! l2  ps2
98*25c28e83SPiotr Jasiukajtis! l3  ps3
99*25c28e83SPiotr Jasiukajtis! l4  pc0
100*25c28e83SPiotr Jasiukajtis! l5  pc1
101*25c28e83SPiotr Jasiukajtis! l6  pc2
102*25c28e83SPiotr Jasiukajtis! l7  pc3
103*25c28e83SPiotr Jasiukajtis
104*25c28e83SPiotr Jasiukajtis! the following are 64-bit registers in both V8+ and V9
105*25c28e83SPiotr Jasiukajtis
106*25c28e83SPiotr Jasiukajtis! g1
107*25c28e83SPiotr Jasiukajtis! g5
108*25c28e83SPiotr Jasiukajtis
109*25c28e83SPiotr Jasiukajtis! o0  n0
110*25c28e83SPiotr Jasiukajtis! o1  n1
111*25c28e83SPiotr Jasiukajtis! o2  n2
112*25c28e83SPiotr Jasiukajtis! o3  n3
113*25c28e83SPiotr Jasiukajtis! o4  c
114*25c28e83SPiotr Jasiukajtis! o5  stridec
115*25c28e83SPiotr Jasiukajtis! o7
116*25c28e83SPiotr Jasiukajtis
117*25c28e83SPiotr Jasiukajtis! f0  x0
118*25c28e83SPiotr Jasiukajtis! f2  x1
119*25c28e83SPiotr Jasiukajtis! f4  x2
120*25c28e83SPiotr Jasiukajtis! f6  x3
121*25c28e83SPiotr Jasiukajtis! f8  thresh1 (pi/4)
122*25c28e83SPiotr Jasiukajtis! f10 s0
123*25c28e83SPiotr Jasiukajtis! f12 s1
124*25c28e83SPiotr Jasiukajtis! f14 s2
125*25c28e83SPiotr Jasiukajtis! f16 s3
126*25c28e83SPiotr Jasiukajtis! f18 thresh2 (2^19 pi)
127*25c28e83SPiotr Jasiukajtis! f20 c0
128*25c28e83SPiotr Jasiukajtis! f22 c1
129*25c28e83SPiotr Jasiukajtis! f24 c2
130*25c28e83SPiotr Jasiukajtis! f26 c3
131*25c28e83SPiotr Jasiukajtis! f28 signbit
132*25c28e83SPiotr Jasiukajtis! f30
133*25c28e83SPiotr Jasiukajtis! f32
134*25c28e83SPiotr Jasiukajtis! f34
135*25c28e83SPiotr Jasiukajtis! f36
136*25c28e83SPiotr Jasiukajtis! f38 inf
137*25c28e83SPiotr Jasiukajtis! f40 S0
138*25c28e83SPiotr Jasiukajtis! f42 S1
139*25c28e83SPiotr Jasiukajtis! f44 S2
140*25c28e83SPiotr Jasiukajtis! f46 one
141*25c28e83SPiotr Jasiukajtis! f48 mhalf
142*25c28e83SPiotr Jasiukajtis! f50 C0
143*25c28e83SPiotr Jasiukajtis! f52 C1
144*25c28e83SPiotr Jasiukajtis! f54 C2
145*25c28e83SPiotr Jasiukajtis! f56 invpio2
146*25c28e83SPiotr Jasiukajtis! f58 round
147*25c28e83SPiotr Jasiukajtis! f60 pio2_1
148*25c28e83SPiotr Jasiukajtis! f62 pio2_t
149*25c28e83SPiotr Jasiukajtis
150*25c28e83SPiotr Jasiukajtis	ENTRY(__vsincosf)
151*25c28e83SPiotr Jasiukajtis	save	%sp,-SA(MINFRAME)-tmps,%sp
152*25c28e83SPiotr Jasiukajtis	PIC_SETUP(l7)
153*25c28e83SPiotr Jasiukajtis	PIC_SET(l7,constants,o0)
154*25c28e83SPiotr Jasiukajtis	mov	%o0,%g1
155*25c28e83SPiotr Jasiukajtis
156*25c28e83SPiotr Jasiukajtis#ifdef __sparcv9
157*25c28e83SPiotr Jasiukajtis	stx	%i1,[%fp+xsave]		! save arguments
158*25c28e83SPiotr Jasiukajtis	stx	%i3,[%fp+ssave]
159*25c28e83SPiotr Jasiukajtis	stx	%i5,[%fp+csave]
160*25c28e83SPiotr Jasiukajtis	ldx	[%fp+STACK_BIAS+0xb0],%o5
161*25c28e83SPiotr Jasiukajtis#else
162*25c28e83SPiotr Jasiukajtis	st	%i1,[%fp+xsave]		! save arguments
163*25c28e83SPiotr Jasiukajtis	st	%i3,[%fp+ssave]
164*25c28e83SPiotr Jasiukajtis	st	%i5,[%fp+csave]
165*25c28e83SPiotr Jasiukajtis	ld	[%fp+0x5c],%o5
166*25c28e83SPiotr Jasiukajtis#endif
167*25c28e83SPiotr Jasiukajtis	st	%i0,[%fp+nsave]
168*25c28e83SPiotr Jasiukajtis	st	%i2,[%fp+sxsave]
169*25c28e83SPiotr Jasiukajtis	st	%i4,[%fp+sssave]
170*25c28e83SPiotr Jasiukajtis	mov	%i5,%o4
171*25c28e83SPiotr Jasiukajtis	mov	0,%i5			! biguns = 0
172*25c28e83SPiotr Jasiukajtis	ldd	[%g1+S0],%f40		! load constants
173*25c28e83SPiotr Jasiukajtis	ldd	[%g1+S1],%f42
174*25c28e83SPiotr Jasiukajtis	ldd	[%g1+S2],%f44
175*25c28e83SPiotr Jasiukajtis	ldd	[%g1+one],%f46
176*25c28e83SPiotr Jasiukajtis	ldd	[%g1+mhalf],%f48
177*25c28e83SPiotr Jasiukajtis	ldd	[%g1+C0],%f50
178*25c28e83SPiotr Jasiukajtis	ldd	[%g1+C1],%f52
179*25c28e83SPiotr Jasiukajtis	ldd	[%g1+C2],%f54
180*25c28e83SPiotr Jasiukajtis	ldd	[%g1+invpio2],%f56
181*25c28e83SPiotr Jasiukajtis	ldd	[%g1+round],%f58
182*25c28e83SPiotr Jasiukajtis	ldd	[%g1+pio2_1],%f60
183*25c28e83SPiotr Jasiukajtis	ldd	[%g1+pio2_t],%f62
184*25c28e83SPiotr Jasiukajtis	ldd	[%g1+thresh1],%f8
185*25c28e83SPiotr Jasiukajtis	ldd	[%g1+thresh2],%f18
186*25c28e83SPiotr Jasiukajtis	ldd	[%g1+inf],%f38
187*25c28e83SPiotr Jasiukajtis	ldd	[%g1+signbit],%f28
188*25c28e83SPiotr Jasiukajtis	sll	%i2,2,%i2		! scale strides
189*25c28e83SPiotr Jasiukajtis	sll	%i4,2,%i4
190*25c28e83SPiotr Jasiukajtis	sll	%o5,2,%o5
191*25c28e83SPiotr Jasiukajtis	nop
192*25c28e83SPiotr Jasiukajtis	fzero	%f10			! loop prologue
193*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l0
194*25c28e83SPiotr Jasiukajtis	fzero	%f20
195*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l4
196*25c28e83SPiotr Jasiukajtis	fzero	%f12
197*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l1
198*25c28e83SPiotr Jasiukajtis	fzero	%f22
199*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l5
200*25c28e83SPiotr Jasiukajtis	fzero	%f14
201*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l2
202*25c28e83SPiotr Jasiukajtis	fzero	%f24
203*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l6
204*25c28e83SPiotr Jasiukajtis	fzero	%f16
205*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l3
206*25c28e83SPiotr Jasiukajtis	fzero	%f26
207*25c28e83SPiotr Jasiukajtis	ba	.start
208*25c28e83SPiotr Jasiukajtis	add	%fp,junk,%l7
209*25c28e83SPiotr Jasiukajtis
210*25c28e83SPiotr Jasiukajtis! 16-byte aligned
211*25c28e83SPiotr Jasiukajtis	.align	16
212*25c28e83SPiotr Jasiukajtis.start:
213*25c28e83SPiotr Jasiukajtis	ld	[%i1],%f0		! *x
214*25c28e83SPiotr Jasiukajtis	add	%i1,%i2,%i1		! x += stridex
215*25c28e83SPiotr Jasiukajtis	addcc	%i0,-1,%i0
216*25c28e83SPiotr Jasiukajtis	fdtos	%f10,%f10
217*25c28e83SPiotr Jasiukajtis
218*25c28e83SPiotr Jasiukajtis	st	%f10,[%l0]
219*25c28e83SPiotr Jasiukajtis	mov	%i3,%l0			! ps0 = s
220*25c28e83SPiotr Jasiukajtis	add	%i3,%i4,%i3		! s += strides
221*25c28e83SPiotr Jasiukajtis	fdtos	%f20,%f20
222*25c28e83SPiotr Jasiukajtis
223*25c28e83SPiotr Jasiukajtis	st	%f20,[%l4]
224*25c28e83SPiotr Jasiukajtis	mov	%o4,%l4			! pc0 = c
225*25c28e83SPiotr Jasiukajtis	ble,pn	%icc,.last1
226*25c28e83SPiotr Jasiukajtis! delay slot
227*25c28e83SPiotr Jasiukajtis	add	%o4,%o5,%o4		! c += stridec
228*25c28e83SPiotr Jasiukajtis
229*25c28e83SPiotr Jasiukajtis	ld	[%i1],%f2		! *x
230*25c28e83SPiotr Jasiukajtis	add	%i1,%i2,%i1		! x += stridex
231*25c28e83SPiotr Jasiukajtis	addcc	%i0,-1,%i0
232*25c28e83SPiotr Jasiukajtis	fdtos	%f12,%f12
233*25c28e83SPiotr Jasiukajtis
234*25c28e83SPiotr Jasiukajtis	st	%f12,[%l1]
235*25c28e83SPiotr Jasiukajtis	mov	%i3,%l1			! ps1 = s
236*25c28e83SPiotr Jasiukajtis	add	%i3,%i4,%i3		! s += strides
237*25c28e83SPiotr Jasiukajtis	fdtos	%f22,%f22
238*25c28e83SPiotr Jasiukajtis
239*25c28e83SPiotr Jasiukajtis	st	%f22,[%l5]
240*25c28e83SPiotr Jasiukajtis	mov	%o4,%l5			! pc1 = c
241*25c28e83SPiotr Jasiukajtis	ble,pn	%icc,.last2
242*25c28e83SPiotr Jasiukajtis! delay slot
243*25c28e83SPiotr Jasiukajtis	add	%o4,%o5,%o4		! c += stridec
244*25c28e83SPiotr Jasiukajtis
245*25c28e83SPiotr Jasiukajtis	ld	[%i1],%f4		! *x
246*25c28e83SPiotr Jasiukajtis	add	%i1,%i2,%i1		! x += stridex
247*25c28e83SPiotr Jasiukajtis	addcc	%i0,-1,%i0
248*25c28e83SPiotr Jasiukajtis	fdtos	%f14,%f14
249*25c28e83SPiotr Jasiukajtis
250*25c28e83SPiotr Jasiukajtis	st	%f14,[%l2]
251*25c28e83SPiotr Jasiukajtis	mov	%i3,%l2			! ps2 = s
252*25c28e83SPiotr Jasiukajtis	add	%i3,%i4,%i3		! s += strides
253*25c28e83SPiotr Jasiukajtis	fdtos	%f24,%f24
254*25c28e83SPiotr Jasiukajtis
255*25c28e83SPiotr Jasiukajtis	st	%f24,[%l6]
256*25c28e83SPiotr Jasiukajtis	mov	%o4,%l6			! pc2 = c
257*25c28e83SPiotr Jasiukajtis	ble,pn	%icc,.last3
258*25c28e83SPiotr Jasiukajtis! delay slot
259*25c28e83SPiotr Jasiukajtis	add	%o4,%o5,%o4		! c += stridec
260*25c28e83SPiotr Jasiukajtis
261*25c28e83SPiotr Jasiukajtis	ld	[%i1],%f6		! *x
262*25c28e83SPiotr Jasiukajtis	add	%i1,%i2,%i1		! x += stridex
263*25c28e83SPiotr Jasiukajtis	nop
264*25c28e83SPiotr Jasiukajtis	fdtos	%f16,%f16
265*25c28e83SPiotr Jasiukajtis
266*25c28e83SPiotr Jasiukajtis	st	%f16,[%l3]
267*25c28e83SPiotr Jasiukajtis	mov	%i3,%l3			! ps3 = s
268*25c28e83SPiotr Jasiukajtis	add	%i3,%i4,%i3		! s += strides
269*25c28e83SPiotr Jasiukajtis	fdtos	%f26,%f26
270*25c28e83SPiotr Jasiukajtis
271*25c28e83SPiotr Jasiukajtis	st	%f26,[%l7]
272*25c28e83SPiotr Jasiukajtis	mov	%o4,%l7			! pc3 = c
273*25c28e83SPiotr Jasiukajtis	add	%o4,%o5,%o4		! c += stridec
274*25c28e83SPiotr Jasiukajtis.cont:
275*25c28e83SPiotr Jasiukajtis	fabsd	%f0,%f30
276*25c28e83SPiotr Jasiukajtis
277*25c28e83SPiotr Jasiukajtis	fabsd	%f2,%f32
278*25c28e83SPiotr Jasiukajtis
279*25c28e83SPiotr Jasiukajtis	fabsd	%f4,%f34
280*25c28e83SPiotr Jasiukajtis
281*25c28e83SPiotr Jasiukajtis	fabsd	%f6,%f36
282*25c28e83SPiotr Jasiukajtis	fcmple32 %f30,%f18,%o0
283*25c28e83SPiotr Jasiukajtis
284*25c28e83SPiotr Jasiukajtis	fcmple32 %f32,%f18,%o1
285*25c28e83SPiotr Jasiukajtis
286*25c28e83SPiotr Jasiukajtis	fcmple32 %f34,%f18,%o2
287*25c28e83SPiotr Jasiukajtis
288*25c28e83SPiotr Jasiukajtis	fcmple32 %f36,%f18,%o3
289*25c28e83SPiotr Jasiukajtis	nop
290*25c28e83SPiotr Jasiukajtis
291*25c28e83SPiotr Jasiukajtis! 16-byte aligned
292*25c28e83SPiotr Jasiukajtis	andcc	%o0,2,%g0
293*25c28e83SPiotr Jasiukajtis	bz,pn	%icc,.range0		! branch if > 2^19 pi
294*25c28e83SPiotr Jasiukajtis! delay slot
295*25c28e83SPiotr Jasiukajtis	fcmple32 %f30,%f8,%o0
296*25c28e83SPiotr Jasiukajtis
297*25c28e83SPiotr Jasiukajtis.check1:
298*25c28e83SPiotr Jasiukajtis	andcc	%o1,2,%g0
299*25c28e83SPiotr Jasiukajtis	bz,pn	%icc,.range1		! branch if > 2^19 pi
300*25c28e83SPiotr Jasiukajtis! delay slot
301*25c28e83SPiotr Jasiukajtis	fcmple32 %f32,%f8,%o1
302*25c28e83SPiotr Jasiukajtis
303*25c28e83SPiotr Jasiukajtis.check2:
304*25c28e83SPiotr Jasiukajtis	andcc	%o2,2,%g0
305*25c28e83SPiotr Jasiukajtis	bz,pn	%icc,.range2		! branch if > 2^19 pi
306*25c28e83SPiotr Jasiukajtis! delay slot
307*25c28e83SPiotr Jasiukajtis	fcmple32 %f34,%f8,%o2
308*25c28e83SPiotr Jasiukajtis
309*25c28e83SPiotr Jasiukajtis.check3:
310*25c28e83SPiotr Jasiukajtis	andcc	%o3,2,%g0
311*25c28e83SPiotr Jasiukajtis	bz,pn	%icc,.range3		! branch if > 2^19 pi
312*25c28e83SPiotr Jasiukajtis! delay slot
313*25c28e83SPiotr Jasiukajtis	fcmple32 %f36,%f8,%o3
314*25c28e83SPiotr Jasiukajtis
315*25c28e83SPiotr Jasiukajtis.checkprimary:
316*25c28e83SPiotr Jasiukajtis	fsmuld	%f0,%f0,%f30
317*25c28e83SPiotr Jasiukajtis	fstod	%f0,%f0
318*25c28e83SPiotr Jasiukajtis
319*25c28e83SPiotr Jasiukajtis	fsmuld	%f2,%f2,%f32
320*25c28e83SPiotr Jasiukajtis	fstod	%f2,%f2
321*25c28e83SPiotr Jasiukajtis	and	%o0,%o1,%o7
322*25c28e83SPiotr Jasiukajtis
323*25c28e83SPiotr Jasiukajtis	fsmuld	%f4,%f4,%f34
324*25c28e83SPiotr Jasiukajtis	fstod	%f4,%f4
325*25c28e83SPiotr Jasiukajtis	and	%o2,%o7,%o7
326*25c28e83SPiotr Jasiukajtis
327*25c28e83SPiotr Jasiukajtis	fsmuld	%f6,%f6,%f36
328*25c28e83SPiotr Jasiukajtis	fstod	%f6,%f6
329*25c28e83SPiotr Jasiukajtis	and	%o3,%o7,%o7
330*25c28e83SPiotr Jasiukajtis
331*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f54,%f20
332*25c28e83SPiotr Jasiukajtis	andcc	%o7,2,%g0
333*25c28e83SPiotr Jasiukajtis	bz,pn	%icc,.medium		! branch if any argument is > pi/4
334*25c28e83SPiotr Jasiukajtis! delay slot
335*25c28e83SPiotr Jasiukajtis	nop
336*25c28e83SPiotr Jasiukajtis
337*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f54,%f22
338*25c28e83SPiotr Jasiukajtis
339*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f54,%f24
340*25c28e83SPiotr Jasiukajtis
341*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f54,%f26
342*25c28e83SPiotr Jasiukajtis
343*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f52,%f20
344*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f44,%f10
345*25c28e83SPiotr Jasiukajtis
346*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f52,%f22
347*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f44,%f12
348*25c28e83SPiotr Jasiukajtis
349*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f52,%f24
350*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f44,%f14
351*25c28e83SPiotr Jasiukajtis
352*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f52,%f26
353*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f44,%f16
354*25c28e83SPiotr Jasiukajtis
355*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
356*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f42,%f10
357*25c28e83SPiotr Jasiukajtis
358*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
359*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f42,%f12
360*25c28e83SPiotr Jasiukajtis
361*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
362*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f42,%f14
363*25c28e83SPiotr Jasiukajtis
364*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
365*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f42,%f16
366*25c28e83SPiotr Jasiukajtis
367*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f50,%f20
368*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f10,%f10
369*25c28e83SPiotr Jasiukajtis
370*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f50,%f22
371*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f12,%f12
372*25c28e83SPiotr Jasiukajtis
373*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f50,%f24
374*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f14,%f14
375*25c28e83SPiotr Jasiukajtis
376*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f50,%f26
377*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f16,%f16
378*25c28e83SPiotr Jasiukajtis
379*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
380*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f40,%f10
381*25c28e83SPiotr Jasiukajtis
382*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
383*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f40,%f12
384*25c28e83SPiotr Jasiukajtis
385*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
386*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f40,%f14
387*25c28e83SPiotr Jasiukajtis
388*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
389*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f40,%f16
390*25c28e83SPiotr Jasiukajtis
391*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f48,%f20
392*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f10,%f10
393*25c28e83SPiotr Jasiukajtis
394*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f48,%f22
395*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f12,%f12
396*25c28e83SPiotr Jasiukajtis
397*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f48,%f24
398*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f14,%f14
399*25c28e83SPiotr Jasiukajtis
400*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f48,%f26
401*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f16,%f16
402*25c28e83SPiotr Jasiukajtis
403*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
404*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f46,%f10
405*25c28e83SPiotr Jasiukajtis
406*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
407*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f46,%f12
408*25c28e83SPiotr Jasiukajtis
409*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
410*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f46,%f14
411*25c28e83SPiotr Jasiukajtis
412*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
413*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f46,%f16
414*25c28e83SPiotr Jasiukajtis
415*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f46,%f20
416*25c28e83SPiotr Jasiukajtis	fmuld	%f0,%f10,%f10
417*25c28e83SPiotr Jasiukajtis
418*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f46,%f22
419*25c28e83SPiotr Jasiukajtis	fmuld	%f2,%f12,%f12
420*25c28e83SPiotr Jasiukajtis
421*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f46,%f24
422*25c28e83SPiotr Jasiukajtis	fmuld	%f4,%f14,%f14
423*25c28e83SPiotr Jasiukajtis	addcc	%i0,-1,%i0
424*25c28e83SPiotr Jasiukajtis
425*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f46,%f26
426*25c28e83SPiotr Jasiukajtis	bg,pt	%icc,.start
427*25c28e83SPiotr Jasiukajtis! delay slot
428*25c28e83SPiotr Jasiukajtis	fmuld	%f6,%f16,%f16
429*25c28e83SPiotr Jasiukajtis
430*25c28e83SPiotr Jasiukajtis	ba,pt	%icc,.end
431*25c28e83SPiotr Jasiukajtis! delay slot
432*25c28e83SPiotr Jasiukajtis	nop
433*25c28e83SPiotr Jasiukajtis
434*25c28e83SPiotr Jasiukajtis
435*25c28e83SPiotr Jasiukajtis	.align	16
436*25c28e83SPiotr Jasiukajtis.medium:
437*25c28e83SPiotr Jasiukajtis	fmuld	%f0,%f56,%f10
438*25c28e83SPiotr Jasiukajtis
439*25c28e83SPiotr Jasiukajtis	fmuld	%f2,%f56,%f12
440*25c28e83SPiotr Jasiukajtis
441*25c28e83SPiotr Jasiukajtis	fmuld	%f4,%f56,%f14
442*25c28e83SPiotr Jasiukajtis
443*25c28e83SPiotr Jasiukajtis	fmuld	%f6,%f56,%f16
444*25c28e83SPiotr Jasiukajtis
445*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f58,%f10
446*25c28e83SPiotr Jasiukajtis	st	%f11,[%fp+n0]
447*25c28e83SPiotr Jasiukajtis
448*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f58,%f12
449*25c28e83SPiotr Jasiukajtis	st	%f13,[%fp+n1]
450*25c28e83SPiotr Jasiukajtis
451*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f58,%f14
452*25c28e83SPiotr Jasiukajtis	st	%f15,[%fp+n2]
453*25c28e83SPiotr Jasiukajtis
454*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f58,%f16
455*25c28e83SPiotr Jasiukajtis	st	%f17,[%fp+n3]
456*25c28e83SPiotr Jasiukajtis
457*25c28e83SPiotr Jasiukajtis	fsubd	%f10,%f58,%f10
458*25c28e83SPiotr Jasiukajtis
459*25c28e83SPiotr Jasiukajtis	fsubd	%f12,%f58,%f12
460*25c28e83SPiotr Jasiukajtis
461*25c28e83SPiotr Jasiukajtis	fsubd	%f14,%f58,%f14
462*25c28e83SPiotr Jasiukajtis
463*25c28e83SPiotr Jasiukajtis	fsubd	%f16,%f58,%f16
464*25c28e83SPiotr Jasiukajtis
465*25c28e83SPiotr Jasiukajtis	fmuld	%f10,%f60,%f20
466*25c28e83SPiotr Jasiukajtis	ld	[%fp+n0],%o0
467*25c28e83SPiotr Jasiukajtis
468*25c28e83SPiotr Jasiukajtis	fmuld	%f12,%f60,%f22
469*25c28e83SPiotr Jasiukajtis	ld	[%fp+n1],%o1
470*25c28e83SPiotr Jasiukajtis
471*25c28e83SPiotr Jasiukajtis	fmuld	%f14,%f60,%f24
472*25c28e83SPiotr Jasiukajtis	ld	[%fp+n2],%o2
473*25c28e83SPiotr Jasiukajtis
474*25c28e83SPiotr Jasiukajtis	fmuld	%f16,%f60,%f26
475*25c28e83SPiotr Jasiukajtis	ld	[%fp+n3],%o3
476*25c28e83SPiotr Jasiukajtis
477*25c28e83SPiotr Jasiukajtis	fsubd	%f0,%f20,%f0
478*25c28e83SPiotr Jasiukajtis	fmuld	%f10,%f62,%f30
479*25c28e83SPiotr Jasiukajtis	and	%o0,1,%o0
480*25c28e83SPiotr Jasiukajtis	mov	%l0,%g1
481*25c28e83SPiotr Jasiukajtis
482*25c28e83SPiotr Jasiukajtis	fsubd	%f2,%f22,%f2
483*25c28e83SPiotr Jasiukajtis	fmuld	%f12,%f62,%f32
484*25c28e83SPiotr Jasiukajtis	and	%o1,1,%o1
485*25c28e83SPiotr Jasiukajtis	movrnz	%o0,%l4,%l0		! if (n & 1) exchange ps and pc
486*25c28e83SPiotr Jasiukajtis
487*25c28e83SPiotr Jasiukajtis	fsubd	%f4,%f24,%f4
488*25c28e83SPiotr Jasiukajtis	fmuld	%f14,%f62,%f34
489*25c28e83SPiotr Jasiukajtis	and	%o2,1,%o2
490*25c28e83SPiotr Jasiukajtis	movrnz	%o0,%g1,%l4
491*25c28e83SPiotr Jasiukajtis
492*25c28e83SPiotr Jasiukajtis	fsubd	%f6,%f26,%f6
493*25c28e83SPiotr Jasiukajtis	fmuld	%f16,%f62,%f36
494*25c28e83SPiotr Jasiukajtis	and	%o3,1,%o3
495*25c28e83SPiotr Jasiukajtis	mov	%l1,%g1
496*25c28e83SPiotr Jasiukajtis
497*25c28e83SPiotr Jasiukajtis	fsubd	%f0,%f30,%f0
498*25c28e83SPiotr Jasiukajtis	movrnz	%o1,%l5,%l1
499*25c28e83SPiotr Jasiukajtis
500*25c28e83SPiotr Jasiukajtis	fsubd	%f2,%f32,%f2
501*25c28e83SPiotr Jasiukajtis	movrnz	%o1,%g1,%l5
502*25c28e83SPiotr Jasiukajtis
503*25c28e83SPiotr Jasiukajtis	fsubd	%f4,%f34,%f4
504*25c28e83SPiotr Jasiukajtis	mov	%l2,%g1
505*25c28e83SPiotr Jasiukajtis
506*25c28e83SPiotr Jasiukajtis	fsubd	%f6,%f36,%f6
507*25c28e83SPiotr Jasiukajtis	movrnz	%o2,%l6,%l2
508*25c28e83SPiotr Jasiukajtis
509*25c28e83SPiotr Jasiukajtis	fmuld	%f0,%f0,%f30
510*25c28e83SPiotr Jasiukajtis	fnegd	%f0,%f10
511*25c28e83SPiotr Jasiukajtis	movrnz	%o2,%g1,%l6
512*25c28e83SPiotr Jasiukajtis
513*25c28e83SPiotr Jasiukajtis	fmuld	%f2,%f2,%f32
514*25c28e83SPiotr Jasiukajtis	fnegd	%f2,%f12
515*25c28e83SPiotr Jasiukajtis	mov	%l3,%g1
516*25c28e83SPiotr Jasiukajtis
517*25c28e83SPiotr Jasiukajtis	fmuld	%f4,%f4,%f34
518*25c28e83SPiotr Jasiukajtis	fnegd	%f4,%f14
519*25c28e83SPiotr Jasiukajtis	movrnz	%o3,%l7,%l3
520*25c28e83SPiotr Jasiukajtis
521*25c28e83SPiotr Jasiukajtis	fmuld	%f6,%f6,%f36
522*25c28e83SPiotr Jasiukajtis	fnegd	%f6,%f16
523*25c28e83SPiotr Jasiukajtis	movrnz	%o3,%g1,%l7
524*25c28e83SPiotr Jasiukajtis
525*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f54,%f20
526*25c28e83SPiotr Jasiukajtis	fmovrdnz %o0,%f10,%f0		! if (n & 1) x = -x
527*25c28e83SPiotr Jasiukajtis
528*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f54,%f22
529*25c28e83SPiotr Jasiukajtis	fmovrdnz %o1,%f12,%f2
530*25c28e83SPiotr Jasiukajtis
531*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f54,%f24
532*25c28e83SPiotr Jasiukajtis	fmovrdnz %o2,%f14,%f4
533*25c28e83SPiotr Jasiukajtis
534*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f54,%f26
535*25c28e83SPiotr Jasiukajtis	fmovrdnz %o3,%f16,%f6
536*25c28e83SPiotr Jasiukajtis
537*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f52,%f20
538*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f44,%f10
539*25c28e83SPiotr Jasiukajtis	ld	[%fp+n0],%o0
540*25c28e83SPiotr Jasiukajtis
541*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f52,%f22
542*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f44,%f12
543*25c28e83SPiotr Jasiukajtis	and	%o0,2,%o0
544*25c28e83SPiotr Jasiukajtis
545*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f52,%f24
546*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f44,%f14
547*25c28e83SPiotr Jasiukajtis	sllx	%o0,62,%g1
548*25c28e83SPiotr Jasiukajtis	stx	%g1,[%fp+n0]
549*25c28e83SPiotr Jasiukajtis
550*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f52,%f26
551*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f44,%f16
552*25c28e83SPiotr Jasiukajtis	ld	[%fp+n1],%o1
553*25c28e83SPiotr Jasiukajtis
554*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
555*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f42,%f10
556*25c28e83SPiotr Jasiukajtis	and	%o1,2,%o1
557*25c28e83SPiotr Jasiukajtis
558*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
559*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f42,%f12
560*25c28e83SPiotr Jasiukajtis	sllx	%o1,62,%g1
561*25c28e83SPiotr Jasiukajtis	stx	%g1,[%fp+n1]
562*25c28e83SPiotr Jasiukajtis
563*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
564*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f42,%f14
565*25c28e83SPiotr Jasiukajtis	ld	[%fp+n2],%o2
566*25c28e83SPiotr Jasiukajtis
567*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
568*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f42,%f16
569*25c28e83SPiotr Jasiukajtis	and	%o2,2,%o2
570*25c28e83SPiotr Jasiukajtis
571*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f50,%f20
572*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f10,%f10
573*25c28e83SPiotr Jasiukajtis	sllx	%o2,62,%g1
574*25c28e83SPiotr Jasiukajtis	stx	%g1,[%fp+n2]
575*25c28e83SPiotr Jasiukajtis
576*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f50,%f22
577*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f12,%f12
578*25c28e83SPiotr Jasiukajtis	ld	[%fp+n3],%o3
579*25c28e83SPiotr Jasiukajtis
580*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f50,%f24
581*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f14,%f14
582*25c28e83SPiotr Jasiukajtis	and	%o3,2,%o3
583*25c28e83SPiotr Jasiukajtis
584*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f50,%f26
585*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f16,%f16
586*25c28e83SPiotr Jasiukajtis	sllx	%o3,62,%g1
587*25c28e83SPiotr Jasiukajtis	stx	%g1,[%fp+n3]
588*25c28e83SPiotr Jasiukajtis
589*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
590*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f40,%f10
591*25c28e83SPiotr Jasiukajtis
592*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
593*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f40,%f12
594*25c28e83SPiotr Jasiukajtis
595*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
596*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f40,%f14
597*25c28e83SPiotr Jasiukajtis
598*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
599*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f40,%f16
600*25c28e83SPiotr Jasiukajtis
601*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f48,%f20
602*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f10,%f10
603*25c28e83SPiotr Jasiukajtis
604*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f48,%f22
605*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f12,%f12
606*25c28e83SPiotr Jasiukajtis
607*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f48,%f24
608*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f14,%f14
609*25c28e83SPiotr Jasiukajtis
610*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f48,%f26
611*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f16,%f16
612*25c28e83SPiotr Jasiukajtis
613*25c28e83SPiotr Jasiukajtis	fmuld	%f30,%f20,%f20
614*25c28e83SPiotr Jasiukajtis	faddd	%f10,%f46,%f10
615*25c28e83SPiotr Jasiukajtis
616*25c28e83SPiotr Jasiukajtis	fmuld	%f32,%f22,%f22
617*25c28e83SPiotr Jasiukajtis	faddd	%f12,%f46,%f12
618*25c28e83SPiotr Jasiukajtis
619*25c28e83SPiotr Jasiukajtis	fmuld	%f34,%f24,%f24
620*25c28e83SPiotr Jasiukajtis	faddd	%f14,%f46,%f14
621*25c28e83SPiotr Jasiukajtis
622*25c28e83SPiotr Jasiukajtis	fmuld	%f36,%f26,%f26
623*25c28e83SPiotr Jasiukajtis	faddd	%f16,%f46,%f16
624*25c28e83SPiotr Jasiukajtis
625*25c28e83SPiotr Jasiukajtis	faddd	%f20,%f46,%f20
626*25c28e83SPiotr Jasiukajtis	fmuld	%f0,%f10,%f10
627*25c28e83SPiotr Jasiukajtis	ldd	[%fp+n0],%f30
628*25c28e83SPiotr Jasiukajtis
629*25c28e83SPiotr Jasiukajtis	faddd	%f22,%f46,%f22
630*25c28e83SPiotr Jasiukajtis	fmuld	%f2,%f12,%f12
631*25c28e83SPiotr Jasiukajtis	ldd	[%fp+n1],%f32
632*25c28e83SPiotr Jasiukajtis
633*25c28e83SPiotr Jasiukajtis	faddd	%f24,%f46,%f24
634*25c28e83SPiotr Jasiukajtis	fmuld	%f4,%f14,%f14
635*25c28e83SPiotr Jasiukajtis	ldd	[%fp+n2],%f34
636*25c28e83SPiotr Jasiukajtis
637*25c28e83SPiotr Jasiukajtis	faddd	%f26,%f46,%f26
638*25c28e83SPiotr Jasiukajtis	fmuld	%f6,%f16,%f16
639*25c28e83SPiotr Jasiukajtis	ldd	[%fp+n3],%f36
640*25c28e83SPiotr Jasiukajtis
641*25c28e83SPiotr Jasiukajtis	fxor	%f10,%f30,%f10		! if (n & 2) negate s, c
642*25c28e83SPiotr Jasiukajtis
643*25c28e83SPiotr Jasiukajtis	fxor	%f12,%f32,%f12
644*25c28e83SPiotr Jasiukajtis
645*25c28e83SPiotr Jasiukajtis	fxor	%f14,%f34,%f14
646*25c28e83SPiotr Jasiukajtis
647*25c28e83SPiotr Jasiukajtis	fxor	%f16,%f36,%f16
648*25c28e83SPiotr Jasiukajtis
649*25c28e83SPiotr Jasiukajtis	fxor	%f20,%f30,%f20
650*25c28e83SPiotr Jasiukajtis
651*25c28e83SPiotr Jasiukajtis	fxor	%f22,%f32,%f22
652*25c28e83SPiotr Jasiukajtis
653*25c28e83SPiotr Jasiukajtis	fxor	%f24,%f34,%f24
654*25c28e83SPiotr Jasiukajtis
655*25c28e83SPiotr Jasiukajtis	addcc	%i0,-1,%i0
656*25c28e83SPiotr Jasiukajtis	bg,pt	%icc,.start
657*25c28e83SPiotr Jasiukajtis! delay slot
658*25c28e83SPiotr Jasiukajtis	fxor	%f26,%f36,%f26
659*25c28e83SPiotr Jasiukajtis
660*25c28e83SPiotr Jasiukajtis	ba,pt	%icc,.end
661*25c28e83SPiotr Jasiukajtis! delay slot
662*25c28e83SPiotr Jasiukajtis	nop
663*25c28e83SPiotr Jasiukajtis
664*25c28e83SPiotr Jasiukajtis
665*25c28e83SPiotr Jasiukajtis	.align	32
666*25c28e83SPiotr Jasiukajtis.end:
667*25c28e83SPiotr Jasiukajtis	fdtos	%f10,%f10
668*25c28e83SPiotr Jasiukajtis	st	%f10,[%l0]
669*25c28e83SPiotr Jasiukajtis	fdtos	%f20,%f20
670*25c28e83SPiotr Jasiukajtis	st	%f20,[%l4]
671*25c28e83SPiotr Jasiukajtis	fdtos	%f12,%f12
672*25c28e83SPiotr Jasiukajtis	st	%f12,[%l1]
673*25c28e83SPiotr Jasiukajtis	fdtos	%f22,%f22
674*25c28e83SPiotr Jasiukajtis	st	%f22,[%l5]
675*25c28e83SPiotr Jasiukajtis	fdtos	%f14,%f14
676*25c28e83SPiotr Jasiukajtis	st	%f14,[%l2]
677*25c28e83SPiotr Jasiukajtis	fdtos	%f24,%f24
678*25c28e83SPiotr Jasiukajtis	st	%f24,[%l6]
679*25c28e83SPiotr Jasiukajtis	fdtos	%f16,%f16
680*25c28e83SPiotr Jasiukajtis	st	%f16,[%l3]
681*25c28e83SPiotr Jasiukajtis	fdtos	%f26,%f26
682*25c28e83SPiotr Jasiukajtis	tst	%i5			! check for huge arguments remaining
683*25c28e83SPiotr Jasiukajtis	be,pt	%icc,.exit
684*25c28e83SPiotr Jasiukajtis! delay slot
685*25c28e83SPiotr Jasiukajtis	st	%f26,[%l7]
686*25c28e83SPiotr Jasiukajtis#ifdef __sparcv9
687*25c28e83SPiotr Jasiukajtis	ldx	[%fp+xsave],%o1
688*25c28e83SPiotr Jasiukajtis	ldx	[%fp+ssave],%o3
689*25c28e83SPiotr Jasiukajtis	ldx	[%fp+csave],%o5
690*25c28e83SPiotr Jasiukajtis	ldx	[%fp+