xref: /titanic_41/usr/src/lib/libc/sparcv9/fp/base.il (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1! .ident	"%Z%%M%	%I%	%E% SMI"
2!
3! Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4! Use is subject to license terms.
5!
6! CDDL HEADER START
7!
8! The contents of this file are subject to the terms of the
9! Common Development and Distribution License, Version 1.0 only
10! (the "License").  You may not use this file except in compliance
11! with the License.
12!
13! You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14! or http://www.opensolaris.org/os/licensing.
15! See the License for the specific language governing permissions
16! and limitations under the License.
17!
18! When distributing Covered Code, include this CDDL HEADER in each
19! file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20! If applicable, add the following below this CDDL HEADER, with the
21! fields enclosed by brackets "[]" replaced with your own identifying
22! information: Portions Copyright [yyyy] [name of copyright owner]
23!
24! CDDL HEADER END
25!
26
27	.inline	__mul_set,0
28	.volatile
29	fmuld	%f0,%f2,%f0		! compute result and leave it for return
30	st	%fsr,[%sp+0x87f]
31	.nonvolatile
32	ld	[%sp+0x87f],%o0
33	and	%o0,1,%o0
34	st	%o0,[%o2]		! store eround
35	.end
36
37	.inline	__div_set,0
38	.volatile
39	fdivd	%f0,%f2,%f0
40	st	%fsr,[%sp+0x87f]
41	.nonvolatile
42	ld	[%sp+0x87f],%o0
43	and	%o0,1,%o0
44	st	%o0,[%o2]		! store eround
45	.end
46
47	.inline	__dabs,0
48	ldd	[%o0],%f0
49	fabsd	%f0,%f0
50	.end
51
52	.inline	__get_ieee_flags,0
53	.volatile
54	st	%fsr,[%o0]
55	st	%g0,[%sp+0x87f]
56	ld	[%sp+0x87f],%fsr
57	.nonvolatile
58	.end
59
60	.inline	__set_ieee_flags,0
61	ld	[%o0],%fsr
62	.end
63