1 ! 2 ! #ident "%Z%%M% %I% %E% SMI" 3 ! 4 ! Copyright 2005 Sun Microsystems, Inc. All rights reserved. 5 ! Use is subject to license terms. 6 ! 7 ! CDDL HEADER START 8 ! 9 ! The contents of this file are subject to the terms of the 10 ! Common Development and Distribution License, Version 1.0 only 11 ! (the "License"). You may not use this file except in compliance 12 ! with the License. 13 ! 14 ! You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 15 ! or http://www.opensolaris.org/os/licensing. 16 ! See the License for the specific language governing permissions 17 ! and limitations under the License. 18 ! 19 ! When distributing Covered Code, include this CDDL HEADER in each 20 ! file and include the License file at usr/src/OPENSOLARIS.LICENSE. 21 ! If applicable, add the following below this CDDL HEADER, with the 22 ! fields enclosed by brackets "[]" replaced with your own identifying 23 ! information: Portions Copyright [yyyy] [name of copyright owner] 24 ! 25 ! CDDL HEADER END 26 ! 27 28 #include "SYS.h" 29 30 ENTRY(_Q_get_rp_rd) 31 .global fp_precision, fp_direction 32 __Q_get_rp_rd: 33 #ifdef PIC 34 PIC_SETUP(o5) 35 ld [%o5+fp_direction],%o3 36 #else 37 set fp_direction,%o3 38 #endif 39 set 0xc0000000,%o4 ! mask of rounding direction bits 40 st %fsr,[%sp+0x44] 41 ld [%sp+0x44],%o0 ! o0 = fsr 42 and %o0,%o4,%o1 43 srl %o1,30,%o1 44 st %o1,[%o3] 45 #ifdef PIC 46 ld [%o5+fp_precision],%o3 47 #else 48 set fp_precision,%o3 49 #endif 50 set 0x30000000,%o4 51 and %o0,%o4,%o1 52 srl %o1,28,%o1 53 retl 54 st %o1,[%o3] 55 SET_SIZE(_Q_get_rp_rd) 56