1*7c478bd9Sstevel@tonic-gate! 2*7c478bd9Sstevel@tonic-gate! Copyright 2005 Sun Microsystems, Inc. All rights reserved. 3*7c478bd9Sstevel@tonic-gate! Use is subject to license terms. 4*7c478bd9Sstevel@tonic-gate! 5*7c478bd9Sstevel@tonic-gate! CDDL HEADER START 6*7c478bd9Sstevel@tonic-gate! 7*7c478bd9Sstevel@tonic-gate! The contents of this file are subject to the terms of the 8*7c478bd9Sstevel@tonic-gate! Common Development and Distribution License, Version 1.0 only 9*7c478bd9Sstevel@tonic-gate! (the "License"). You may not use this file except in compliance 10*7c478bd9Sstevel@tonic-gate! with the License. 11*7c478bd9Sstevel@tonic-gate! 12*7c478bd9Sstevel@tonic-gate! You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 13*7c478bd9Sstevel@tonic-gate! or http://www.opensolaris.org/os/licensing. 14*7c478bd9Sstevel@tonic-gate! See the License for the specific language governing permissions 15*7c478bd9Sstevel@tonic-gate! and limitations under the License. 16*7c478bd9Sstevel@tonic-gate! 17*7c478bd9Sstevel@tonic-gate! When distributing Covered Code, include this CDDL HEADER in each 18*7c478bd9Sstevel@tonic-gate! file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19*7c478bd9Sstevel@tonic-gate! If applicable, add the following below this CDDL HEADER, with the 20*7c478bd9Sstevel@tonic-gate! fields enclosed by brackets "[]" replaced with your own identifying 21*7c478bd9Sstevel@tonic-gate! information: Portions Copyright [yyyy] [name of copyright owner] 22*7c478bd9Sstevel@tonic-gate! 23*7c478bd9Sstevel@tonic-gate! CDDL HEADER END 24*7c478bd9Sstevel@tonic-gate! 25*7c478bd9Sstevel@tonic-gate! 26*7c478bd9Sstevel@tonic-gate! .ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate! 28*7c478bd9Sstevel@tonic-gate! This file contains inline templates for the internal routines used 29*7c478bd9Sstevel@tonic-gate! by the quad precision emulation code for SPARC. It should be used 30*7c478bd9Sstevel@tonic-gate! in preference to __quad.s whenever possible. 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate .inline __quad_getfsrp,1 33*7c478bd9Sstevel@tonic-gate st %fsr,[%o0] 34*7c478bd9Sstevel@tonic-gate .end 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate .inline __quad_setfsrp,1 37*7c478bd9Sstevel@tonic-gate ld [%o0],%fsr 38*7c478bd9Sstevel@tonic-gate .end 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate .inline __quad_dp_sqrt,1 41*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 42*7c478bd9Sstevel@tonic-gate fsqrtd %f0,%f0 43*7c478bd9Sstevel@tonic-gate .end 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate .inline __quad_faddq,3 46*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 47*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 48*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 49*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 50*7c478bd9Sstevel@tonic-gate faddq %f0,%f4,%f8 51*7c478bd9Sstevel@tonic-gate std %f8,[%o2] 52*7c478bd9Sstevel@tonic-gate std %f10,[%o2+8] 53*7c478bd9Sstevel@tonic-gate .end 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate .inline __quad_fsubq,3 56*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 57*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 58*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 59*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 60*7c478bd9Sstevel@tonic-gate fsubq %f0,%f4,%f8 61*7c478bd9Sstevel@tonic-gate std %f8,[%o2] 62*7c478bd9Sstevel@tonic-gate std %f10,[%o2+8] 63*7c478bd9Sstevel@tonic-gate .end 64*7c478bd9Sstevel@tonic-gate 65*7c478bd9Sstevel@tonic-gate .inline __quad_fmulq,3 66*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 67*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 68*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 69*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 70*7c478bd9Sstevel@tonic-gate fmulq %f0,%f4,%f8 71*7c478bd9Sstevel@tonic-gate std %f8,[%o2] 72*7c478bd9Sstevel@tonic-gate std %f10,[%o2+8] 73*7c478bd9Sstevel@tonic-gate .end 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate .inline __quad_fdivq,3 76*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 77*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 78*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 79*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 80*7c478bd9Sstevel@tonic-gate fdivq %f0,%f4,%f8 81*7c478bd9Sstevel@tonic-gate std %f8,[%o2] 82*7c478bd9Sstevel@tonic-gate std %f10,[%o2+8] 83*7c478bd9Sstevel@tonic-gate .end 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate .inline __quad_fsqrtq,2 86*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 87*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 88*7c478bd9Sstevel@tonic-gate fsqrtq %f0,%f4 89*7c478bd9Sstevel@tonic-gate std %f4,[%o1] 90*7c478bd9Sstevel@tonic-gate std %f6,[%o1+8] 91*7c478bd9Sstevel@tonic-gate .end 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate .inline __quad_fcmpq,3 94*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 95*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 96*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 97*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 98*7c478bd9Sstevel@tonic-gate .volatile 99*7c478bd9Sstevel@tonic-gate fcmpq %f0,%f4 100*7c478bd9Sstevel@tonic-gate st %fsr,[%o2] 101*7c478bd9Sstevel@tonic-gate .nonvolatile 102*7c478bd9Sstevel@tonic-gate .end 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gate .inline __quad_fcmpeq,3 105*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 106*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 107*7c478bd9Sstevel@tonic-gate ldd [%o1],%f4 108*7c478bd9Sstevel@tonic-gate ldd [%o1+8],%f6 109*7c478bd9Sstevel@tonic-gate .volatile 110*7c478bd9Sstevel@tonic-gate fcmpeq %f0,%f4 111*7c478bd9Sstevel@tonic-gate st %fsr,[%o2] 112*7c478bd9Sstevel@tonic-gate .nonvolatile 113*7c478bd9Sstevel@tonic-gate .end 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gate .inline __quad_fstoq,2 116*7c478bd9Sstevel@tonic-gate ld [%o0],%f0 117*7c478bd9Sstevel@tonic-gate fstoq %f0,%f4 118*7c478bd9Sstevel@tonic-gate std %f4,[%o1] 119*7c478bd9Sstevel@tonic-gate std %f6,[%o1+8] 120*7c478bd9Sstevel@tonic-gate .end 121*7c478bd9Sstevel@tonic-gate 122*7c478bd9Sstevel@tonic-gate .inline __quad_fdtoq,2 123*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 124*7c478bd9Sstevel@tonic-gate fdtoq %f0,%f4 125*7c478bd9Sstevel@tonic-gate std %f4,[%o1] 126*7c478bd9Sstevel@tonic-gate std %f6,[%o1+8] 127*7c478bd9Sstevel@tonic-gate .end 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate .inline __quad_fqtoi,2 130*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 131*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 132*7c478bd9Sstevel@tonic-gate fqtoi %f0,%f4 133*7c478bd9Sstevel@tonic-gate st %f4,[%o1] 134*7c478bd9Sstevel@tonic-gate .end 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate .inline __quad_fqtos,2 137*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 138*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 139*7c478bd9Sstevel@tonic-gate fqtos %f0,%f4 140*7c478bd9Sstevel@tonic-gate st %f4,[%o1] 141*7c478bd9Sstevel@tonic-gate .end 142*7c478bd9Sstevel@tonic-gate 143*7c478bd9Sstevel@tonic-gate .inline __quad_fqtod,2 144*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 145*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 146*7c478bd9Sstevel@tonic-gate fqtod %f0,%f4 147*7c478bd9Sstevel@tonic-gate std %f4,[%o1] 148*7c478bd9Sstevel@tonic-gate .end 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate! only used in V9 code 151*7c478bd9Sstevel@tonic-gate .inline __quad_fqtox,2 152*7c478bd9Sstevel@tonic-gate ldd [%o0],%f0 153*7c478bd9Sstevel@tonic-gate ldd [%o0+8],%f2 154*7c478bd9Sstevel@tonic-gate fqtox %f0,%f4 155*7c478bd9Sstevel@tonic-gate std %f4,[%o1] 156*7c478bd9Sstevel@tonic-gate .end 157