16429Svs195195/* 26429Svs195195 * CDDL HEADER START 36429Svs195195 * 46429Svs195195 * The contents of this file are subject to the terms of the 56429Svs195195 * Common Development and Distribution License (the "License"). 66429Svs195195 * You may not use this file except in compliance with the License. 76429Svs195195 * 86429Svs195195 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96429Svs195195 * or http://www.opensolaris.org/os/licensing. 106429Svs195195 * See the License for the specific language governing permissions 116429Svs195195 * and limitations under the License. 126429Svs195195 * 136429Svs195195 * When distributing Covered Code, include this CDDL HEADER in each 146429Svs195195 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156429Svs195195 * If applicable, add the following below this CDDL HEADER, with the 166429Svs195195 * fields enclosed by brackets "[]" replaced with your own identifying 176429Svs195195 * information: Portions Copyright [yyyy] [name of copyright owner] 186429Svs195195 * 196429Svs195195 * CDDL HEADER END 206429Svs195195 */ 216429Svs195195 226429Svs195195/* 236491Sia112686 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 246429Svs195195 * Use is subject to license terms. 256429Svs195195 */ 266429Svs195195 276429Svs195195#pragma ident "%Z%%M% %I% %E% SMI" 286429Svs195195 29*7186Skk158166/* 30*7186Skk158166 * Usage of %ncc 31*7186Skk158166 * 32*7186Skk158166 * When the branch instructions were modified from Bicc to BPcc format, 33*7186Skk158166 * the pseudo-op %ncc was used. This will be converted by the assembler 34*7186Skk158166 * to %icc or %xcc depending on whether the compilation is being done 35*7186Skk158166 * for 32-bit or 64-bit platforms. 36*7186Skk158166 */ 376429Svs195195 386429Svs195195 396429Svs195195#include<sys/asm_linkage.h> 406429Svs195195 41*7186Skk158166/* 42*7186Skk158166 * ------------------------------------------------------------------------ 43*7186Skk158166 * Name: datap_add() 44*7186Skk158166 * Function: This routine test the data path of the adder for single 45*7186Skk158166 * precision. 46*7186Skk158166 * Calling: i0 = value 47*7186Skk158166 * Returns: 48*7186Skk158166 * Convention: 49*7186Skk158166 * -------------------------------------------------------------------------- 50*7186Skk158166 * 51*7186Skk158166 * f0 = value 52*7186Skk158166 * f1 = 0 53*7186Skk158166 * add = f2 = value 54*7186Skk158166 */ 556429Svs195195 56*7186Skk158166#ifdef __lint 57*7186Skk158166 58*7186Skk158166/*ARGSUSED*/ 59*7186Skk158166unsigned long 60*7186Skk158166datap_add(unsigned long arg1) 61*7186Skk158166{ 62*7186Skk158166 return (0); 63*7186Skk158166} 64*7186Skk158166 65*7186Skk158166#else 66*7186Skk158166 67*7186Skk158166.section ".data" 68*7186Skk158166.align 4 696429Svs195195 706429Svs195195.Ldadd: 71*7186Skk158166 .skip 4 726429Svs195195.Ldadd1: 73*7186Skk158166 .skip 4 746429Svs195195 756429Svs195195ENTRY_NP(datap_add) 766429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the stack frame 776429Svs195195 setn .Ldadd,%l6,%l0 ! get a memory address 786429Svs195195 setn .Ldadd1,%l6,%l1 ! .. one for the result 796429Svs195195 mov %g0,%l3 ! .. get a zero 806429Svs195195 st %l3, [%l1] ! .... and store it in memory 816429Svs195195 st %i0, [%l0] ! .... store the value passed 826429Svs195195 ld [%l0], %f0 ! .... put the passed value into f0 836429Svs195195 ld [%l1], %f1 ! .... put value 0 into reg f1 846429Svs195195 fadds %f0, %f1, %f2 ! ...... add zero and value into f2 856429Svs195195 fcmps %fcc0, %f0, %f2 ! .... check the value passed and added value 866429Svs195195 fbe,a %fcc0, datap_ok ! .. if they are equal 876429Svs195195 nop ! .... delay 886429Svs195195 896429Svs195195 st %f2, [%l1] ! return the result on error 906429Svs195195 916429Svs195195datap_ok: 926429Svs195195 ld [%l1], %i0 ! then return a zero 936429Svs195195 ret ! .... delay 946429Svs195195 restore 956429Svs195195SET_SIZE(datap_add) 966429Svs195195 97*7186Skk158166#endif 986429Svs195195 99*7186Skk158166/* 100*7186Skk158166 * ------------------------------------------------------------------------ 101*7186Skk158166 * Name: 102*7186Skk158166 * Function: 103*7186Skk158166 * Calling: 104*7186Skk158166 * Returns: 105*7186Skk158166 * Convention: 106*7186Skk158166 * -------------------------------------------------------------------------- 107*7186Skk158166 * 108*7186Skk158166 * This routine test the data path of multiplier for single precision 109*7186Skk158166 * f0 = value 110*7186Skk158166 * f1 = 1 111*7186Skk158166 * mult = f2 = f0 * f1 112*7186Skk158166 */ 113*7186Skk158166 114*7186Skk158166#ifdef __lint 115*7186Skk158166 116*7186Skk158166/*ARGSUSED*/ 117*7186Skk158166unsigned long 118*7186Skk158166datap_mult(unsigned long arg1) 119*7186Skk158166{ 120*7186Skk158166 return (0); 121*7186Skk158166} 122*7186Skk158166 123*7186Skk158166#else 124*7186Skk158166 125*7186Skk158166.section ".data" 126*7186Skk158166.align 4 1276429Svs195195 1286429Svs195195.Ldtmlt: 129*7186Skk158166 .skip 4 1306429Svs195195.Ldtmlt1: 131*7186Skk158166 .skip 4 1326429Svs195195 1336429Svs195195ENTRY_NP(datap_mult) 1346429Svs195195 save %sp, -SA(MINFRAME), %sp 1356429Svs195195 setn .Ldtmlt,%l6,%l0 1366429Svs195195 setn .Ldtmlt1,%l6,%l1 1376429Svs195195 setn 0x3F800000,%l6,%l3 ! put value 1 into memory 1386429Svs195195 st %l3, [%l1] 1396429Svs195195 st %i0, [%l0] ! store the value passed into memory location 1406429Svs195195 ld [%l0], %f0 ! put the passed value into f0 1416429Svs195195 ld [%l1], %f1 ! put value 1 into reg f1 1426429Svs195195 fmuls %f0, %f1, %f2 ! multiply value with 1 , it has to be same 1436429Svs195195 fcmps %fcc0, %f0, %f2 1446429Svs195195 1456429Svs195195 fbne,a %fcc0, datap_mult_done 1466429Svs195195 st %f2, [%l1] ! executed only when the conditional 1476429Svs195195 ! branch is taken as annul bit is set. 1486429Svs195195 ! This branch will be taken under 1496429Svs195195 ! an error condition (%f0 != %f2). 1506429Svs195195 ! Then we need to return the result. 1516429Svs195195 1526429Svs195195 mov %g0,%l3 1536429Svs195195 st %l3, [%l1] 1546429Svs195195 1556429Svs195195datap_mult_done : 1566429Svs195195 ld [%l1], %i0 1576429Svs195195 ret 1586429Svs195195 restore 1596429Svs195195SET_SIZE(datap_mult) 1606429Svs195195 161*7186Skk158166#endif 1626429Svs195195 163*7186Skk158166/* 164*7186Skk158166 * ------------------------------------------------------------------------ 165*7186Skk158166 * Name: 166*7186Skk158166 * Function: 167*7186Skk158166 * Calling: 168*7186Skk158166 * Returns: 169*7186Skk158166 * Convention: 170*7186Skk158166 * -------------------------------------------------------------------------- 171*7186Skk158166 * 172*7186Skk158166 * This routine tests the data path of the weitek multiplier for 173*7186Skk158166 * double precision. Single-precision load and store are being 174*7186Skk158166 * used as the input double-precision value is taken as two SP 175*7186Skk158166 * arguments 176*7186Skk158166 * 177*7186Skk158166 * f0 = msw value 178*7186Skk158166 * f1 = lsw value 179*7186Skk158166 * 180*7186Skk158166 * f2 = 0 181*7186Skk158166 * f3 = 0 182*7186Skk158166 * add = f4 = f0 + f2 183*7186Skk158166 */ 184*7186Skk158166 185*7186Skk158166#ifdef __lint 186*7186Skk158166 187*7186Skk158166/*ARGSUSED*/ 188*7186Skk158166unsigned long 189*7186Skk158166datap_add_dp(unsigned long arg1, unsigned long arg2) 190*7186Skk158166{ 191*7186Skk158166 return (0); 192*7186Skk158166} 193*7186Skk158166 194*7186Skk158166#else 195*7186Skk158166 196*7186Skk158166.section ".data" 197*7186Skk158166.align 8 1986429Svs195195 1996429Svs195195.Ldtadddp: 200*7186Skk158166 .skip 8 2016429Svs195195.Ldtadddp1: 202*7186Skk158166 .skip 8 2036429Svs195195.Ldtadddp2: 204*7186Skk158166 .skip 8 2056429Svs195195.Lamsw: 206*7186Skk158166 .skip 8 2076429Svs195195.Lalsw: 208*7186Skk158166 .skip 8 2096429Svs195195 2106429Svs195195ENTRY_NP(datap_add_dp) 2116429Svs195195 save %sp, -SA(MINFRAME), %sp 2126429Svs195195 setn .Ldtadddp,%l6,%l0 2136429Svs195195 setn .Ldtadddp1,%l6,%l1 2146429Svs195195 setn .Ldtadddp2,%l6,%l2 2156429Svs195195 setn .Lamsw,%l6,%l4 2166429Svs195195 setn .Lalsw,%l6,%l5 2176429Svs195195 mov %g0,%l3 ! put value 0 into memory 2186429Svs195195 st %l3, [%l1] 2196429Svs195195 st %i0, [%l0] ! msw of value 2206429Svs195195 st %i1, [%l2] ! lsw of value 2216429Svs195195 ld [%l0], %f0 ! put the msw into f0 2226429Svs195195 ld [%l2], %f1 ! put the lsw into f1 2236429Svs195195 ld [%l1], %f2 ! put 0 into f2 2246429Svs195195 ld [%l1], %f3 ! put 0 into f3 2256429Svs195195 faddd %f0, %f2, %f4 ! add value + 0 into f4 2266429Svs195195 fcmpd %fcc0, %f0, %f4 ! now compare the result 2276429Svs195195 2286429Svs195195 fbe,a %fcc0, datap_add_dp_ok ! good 2296429Svs195195 nop 2306429Svs195195 2316429Svs195195 mov 0x1,%l3 2326429Svs195195 st %l3, [%l1] 2336429Svs195195 2346429Svs195195datap_add_dp_ok : 2356429Svs195195 ld [%l1], %i0 2366429Svs195195 ret 2376429Svs195195 restore 2386429Svs195195 2396429Svs195195SET_SIZE(datap_add_dp) 2406429Svs195195 241*7186Skk158166#endif 242*7186Skk158166 243*7186Skk158166/* 244*7186Skk158166 * ------------------------------------------------------------------------ 245*7186Skk158166 * Name: 246*7186Skk158166 * Function: 247*7186Skk158166 * Calling: 248*7186Skk158166 * Returns: 249*7186Skk158166 * Convention: 250*7186Skk158166 * 251*7186Skk158166 * This routine tests the data path of the weitek multiplier for 252*7186Skk158166 * double precision. Single-precision load and store are being 253*7186Skk158166 * used as the input double-precision value is taken as two SP 254*7186Skk158166 * arguments. 255*7186Skk158166 * 256*7186Skk158166 * f0 = msw value 257*7186Skk158166 * f1 = lsw value 258*7186Skk158166 * f2 = 0 259*7186Skk158166 * f3 = 0 260*7186Skk158166 * mult = f4 = f0 * f2 261*7186Skk158166 * ------------------------------------------------------------------------ 262*7186Skk158166 */ 263*7186Skk158166 264*7186Skk158166#ifdef __lint 265*7186Skk158166 266*7186Skk158166/*ARGSUSED*/ 267*7186Skk158166unsigned long 268*7186Skk158166datap_mult_dp(unsigned long arg1, unsigned long arg2) 269*7186Skk158166{ 270*7186Skk158166 return (0); 271*7186Skk158166} 272*7186Skk158166 273*7186Skk158166#else 274*7186Skk158166 275*7186Skk158166.section ".data" 276*7186Skk158166.align 8 2776429Svs195195 2786429Svs195195.Ldtmdp: 279*7186Skk158166 .skip 8 2806429Svs195195.Ldtmdp1: 281*7186Skk158166 .skip 8 2826429Svs195195.Ldtmdp2: 283*7186Skk158166 .skip 8 2846429Svs195195.Lmmsw: 285*7186Skk158166 .skip 8 2866429Svs195195.Lmlsw: 287*7186Skk158166 .skip 8 2886429Svs195195 2896429Svs195195ENTRY_NP(datap_mult_dp) 2906429Svs195195 save %sp, -SA(MINFRAME), %sp 2916429Svs195195 setn .Ldtmdp,%l6,%l0 2926429Svs195195 setn .Ldtmdp1,%l6,%l1 2936429Svs195195 setn .Ldtmdp2,%l6,%l2 2946429Svs195195 setn .Lmmsw,%l6,%l4 2956429Svs195195 setn .Lmlsw,%l6,%l5 2966429Svs195195 setn 0x3FF00000,%l6,%l3 ! put msw value of DP 1 into memory 2976429Svs195195 st %l3, [%l1] 2986429Svs195195 st %i0, [%l0] ! msw of value 2996429Svs195195 st %i1, [%l2] ! lsw of value 3006429Svs195195 ld [%l0], %f0 ! put the msw into f0 3016429Svs195195 ld [%l2], %f1 ! put the lsw into f1 3026429Svs195195 ld [%l1], %f2 ! put msw of DP 1 into f2 3036429Svs195195 mov %g0,%l3 3046429Svs195195 st %l3, [%l1] 3056429Svs195195 ld [%l1], %f3 ! put 0 into f3, i.e f2|f3 = 0x3ff0000000000000 (dp 1) 3066429Svs195195 fmuld %f0, %f2, %f4 ! mult value * 1 into f4 3076429Svs195195 fcmpd %fcc0, %f0, %f4 ! now compare the result 3086429Svs195195 3096429Svs195195 fbe,a %fcc0, datap_mult_dp_ok ! good 3106429Svs195195 nop 3116429Svs195195 3126429Svs195195 mov 0x1,%l3 3136429Svs195195 st %l3, [%l1] 3146429Svs195195 3156429Svs195195datap_mult_dp_ok : 3166429Svs195195 ld [%l1], %i0 3176429Svs195195 ret 3186429Svs195195 restore 3196429Svs195195 3206429Svs195195SET_SIZE(datap_mult_dp) 3216429Svs195195 322*7186Skk158166#endif 323*7186Skk158166 324*7186Skk158166/* 325*7186Skk158166 * ------------------------------------------------------------------------- 326*7186Skk158166 * for add routine all the f registers from 0 - 19 will be filled with numbers 327*7186Skk158166 * and the result should be 10. 328*7186Skk158166 * ------------------------------------------------------------------------- 329*7186Skk158166 */ 330*7186Skk158166 331*7186Skk158166#ifdef __lint 3326429Svs195195 333*7186Skk158166unsigned long 334*7186Skk158166timing_add_sp() 335*7186Skk158166{ 336*7186Skk158166 return (0); 337*7186Skk158166} 338*7186Skk158166 339*7186Skk158166#else 340*7186Skk158166 341*7186Skk158166.section ".data" 342*7186Skk158166.align 4 3436429Svs195195 3446429Svs195195.Ltmasp: 345*7186Skk158166 .skip 4 3466429Svs195195.Ltmasp1: 347*7186Skk158166 .skip 4 3486429Svs195195.Ltmasp2: 349*7186Skk158166 .skip 4 3506429Svs195195 3516429Svs195195ENTRY_NP(timing_add_sp) 3526429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stacck 3536429Svs195195 setn .Ltmasp,%l6,%l0 3546429Svs195195 setn .Ltmasp1,%l6,%l1 3556429Svs195195 setn .Ltmasp2,%l6,%l2 3566429Svs195195 mov %g0,%l3 3576429Svs195195 setn 0x3f800000,%l6,%l4 ! put value 1 3586429Svs195195 setn 0x41200000,%l6,%l5 ! put value 10 into local 5 3596429Svs195195 st %l5, [%l0] 3606429Svs195195 st %l4, [%l1] 3616429Svs195195 st %l3, [%l2] 3626429Svs195195 ld [%l0], %f31 ! register 31 has 10 3636429Svs195195 ld [%l1], %f30 ! register 30 has 1 3646429Svs195195 3656429Svs195195 ld [%l2], %f0 ! reg 0 has 0 3666429Svs195195 fmovs %f31, %f1 ! reg1 has 10 3676429Svs195195 fsubs %f31, %f30, %f18 ! reg 18 has 9 3686429Svs195195 fmovs %f18, %f3 ! reg 3 has 9 3696429Svs195195 fmovs %f30, %f2 ! reg 2 has 1 3706429Svs195195 fmovs %f30, %f19 ! reg 19 has 1 3716429Svs195195 fsubs %f18, %f19, %f16 ! reg 16 has 8 3726429Svs195195 fmovs %f16, %f5 ! reg 5 has 8 3736429Svs195195 fsubs %f31, %f16, %f17 ! reg 17 has 2 3746429Svs195195 fmovs %f17, %f4 ! reg 4 has 2 3756429Svs195195 fsubs %f16, %f30, %f14 ! reg 14 has 7 3766429Svs195195 fmovs %f14, %f7 ! reg 7 has 7 3776429Svs195195 fsubs %f31, %f14, %f15 ! reg 15 has 3 3786429Svs195195 fmovs %f15, %f6 ! reg 6 has 3 3796429Svs195195 fsubs %f14, %f30, %f12 ! reg 12 has 6 3806429Svs195195 fmovs %f12, %f9 ! reg 9 has 6 3816429Svs195195 fsubs %f31, %f12, %f13 ! reg 13 has 4 3826429Svs195195 fmovs %f13, %f8 ! reg 8 has 4 3836429Svs195195 fsubs %f12, %f30, %f10 ! reg 10 has 5 3846429Svs195195 fmovs %f10, %f11 ! reg 11 has 5 3856429Svs195195 3866429Svs195195 fadds %f0, %f1, %f20 ! reg 0 + reg 1 = reg 20 = 10 3876429Svs195195 fadds %f2, %f3, %f21 ! reg 2 + reg 3 = reg 21 = 10 3886429Svs195195 fadds %f4, %f5, %f22 ! reg 4 + reg 5 = reg 22 = 10 3896429Svs195195 fadds %f6, %f7, %f23 ! reg 6 + reg 7 = reg 23 = 10 3906429Svs195195 fadds %f8, %f9, %f24 ! reg 8 + reg 9 = reg 24 = 10 3916429Svs195195 fadds %f10, %f11, %f25 ! reg 10 + reg 11 = reg 25 = 10 3926429Svs195195 fadds %f12, %f13, %f26 ! reg 12 + reg 13 = reg 26 = 10 3936429Svs195195 fadds %f14, %f15, %f27 ! reg 14 + reg 15 = reg 27 = 10 3946429Svs195195 fadds %f16, %f17, %f28 ! reg 16 + reg 17 = reg 28 = 10 3956429Svs195195 fadds %f18, %f19, %f29 ! reg 18 + reg 19 = reg 29 = 10 3966429Svs195195 3976429Svs195195 ! Now additions are done check it out 3986429Svs195195 fcmps %fcc0, %f31, %f20 3996429Svs195195 fbne,a,pn %fcc0, done_t_add_sp ! If not equal, go to the end. 4006429Svs195195 st %f20, [%l2] ! Executed only when the conditional 4016429Svs195195 ! branch is taken as annul bit is set. 4026429Svs195195 ! This branch will be taken under 4036429Svs195195 ! an error condition. 4046429Svs195195 4056429Svs195195 ! No errors. Move on to the next register 4066429Svs195195 4076429Svs195195 fcmps %fcc0, %f31, %f21 4086429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4096429Svs195195 st %f21, [%l2] 4106429Svs195195 4116429Svs195195 4126429Svs195195 fcmps %fcc0, %f31, %f22 4136429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4146429Svs195195 st %f22, [%l2] 4156429Svs195195 4166429Svs195195 4176429Svs195195 fcmps %fcc0, %f31, %f23 4186429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4196429Svs195195 st %f23, [%l2] 4206429Svs195195 4216429Svs195195 4226429Svs195195 fcmps %fcc0, %f31, %f24 4236429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4246429Svs195195 st %f24, [%l2] 4256429Svs195195 4266429Svs195195 4276429Svs195195 fcmps %fcc0, %f31, %f25 4286429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4296429Svs195195 st %f25, [%l2] 4306429Svs195195 4316429Svs195195 4326429Svs195195 fcmps %fcc0, %f31, %f26 4336429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4346429Svs195195 st %f26, [%l2] 4356429Svs195195 4366429Svs195195 4376429Svs195195 fcmps %fcc0, %f31, %f27 4386429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4396429Svs195195 st %f27, [%l2] 4406429Svs195195 4416429Svs195195 4426429Svs195195 fcmps %fcc0, %f31, %f28 4436429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4446429Svs195195 st %f28, [%l2] 4456429Svs195195 4466429Svs195195 4476429Svs195195 ! Though this is the last set of compare instructions 4486429Svs195195 ! we cannot fall through as the store needs to be done 4496429Svs195195 ! only when the registers are not equal. That is why 4506429Svs195195 ! we need the unconditional branch with the annul bit set. 4516429Svs195195 fcmps %fcc0, %f31, %f29 4526429Svs195195 fbne,a,pn %fcc0, done_t_add_sp 4536429Svs195195 st %f29, [%l2] 4546429Svs195195 4556429Svs195195done_t_add_sp: 4566429Svs195195 ld [%l2], %i0 4576429Svs195195 ret 4586429Svs195195 restore 4596429Svs195195SET_SIZE(timing_add_sp) 4606429Svs195195 461*7186Skk158166#endif 462*7186Skk158166 463*7186Skk158166/* 464*7186Skk158166 * ---------------------------------------------------------------------- 465*7186Skk158166 * for mult routine all the f registers from 0 - 19 will be filled 466*7186Skk158166 * with numbers and the result should be the number. 467*7186Skk158166 * ---------------------------------------------------------------------- 468*7186Skk158166 */ 469*7186Skk158166 470*7186Skk158166 471*7186Skk158166#ifdef __lint 472*7186Skk158166 473*7186Skk158166unsigned long 474*7186Skk158166timing_mult_sp() 475*7186Skk158166{ 476*7186Skk158166 return (0); 477*7186Skk158166} 478*7186Skk158166 479*7186Skk158166#else 480*7186Skk158166 481*7186Skk158166.section ".data" 482*7186Skk158166.align 4 4836429Svs195195 4846429Svs195195.Ltmmsp: 485*7186Skk158166 .skip 4 4866429Svs195195.Ltmmsp1: 487*7186Skk158166 .skip 4 4886429Svs195195.Ltmmsp2: 489*7186Skk158166 .skip 4 4906429Svs195195 4916429Svs195195ENTRY_NP(timing_mult_sp) 4926429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stacck 4936429Svs195195 setn .Ltmmsp,%l6, %l0 4946429Svs195195 setn .Ltmmsp1,%l6, %l1 4956429Svs195195 setn .Ltmmsp2,%l6, %l2 4966429Svs195195 mov %g0, %l3 4976429Svs195195 setn 0x3f800000,%l6, %l4 ! put value 1 4986429Svs195195 setn 0x41200000,%l6, %l5 ! put value 10 into local 5 4996429Svs195195 st %l5, [%l0] 5006429Svs195195 st %l4, [%l1] 5016429Svs195195 st %l3, [%l2] 5026429Svs195195 ld [%l0], %f31 ! register 31 has 10 5036429Svs195195 ld [%l1], %f1 ! register 1 has 1 5046429Svs195195 fmovs %f1, %f3 5056429Svs195195 fmovs %f1, %f5 5066429Svs195195 fmovs %f1, %f7 5076429Svs195195 fmovs %f1, %f9 5086429Svs195195 fmovs %f1, %f11 ! register 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 5096429Svs195195 fmovs %f1, %f13 ! has a value of 1 5106429Svs195195 fmovs %f1, %f15 5116429Svs195195 fmovs %f1, %f17 5126429Svs195195 fmovs %f1, %f19 ! 5136429Svs195195 fmovs %f1, %f0 5146429Svs195195 fmovs %f31, %f18 ! reg 18 has 10 5156429Svs195195 fsubs %f31, %f0, %f16 ! reg 16 has 9 5166429Svs195195 fsubs %f16, %f0, %f14 ! reg 14 has 8 5176429Svs195195 fsubs %f14, %f0, %f12 ! reg 12 has 7 5186429Svs195195 fsubs %f12, %f0, %f10 ! reg 10 has 6 5196429Svs195195 fsubs %f10, %f0, %f8 ! reg 8 has 5 5206429Svs195195 fsubs %f8, %f0, %f6 ! reg 6 has 4 5216429Svs195195 fsubs %f6, %f0, %f4 ! reg 4 has 3 5226429Svs195195 fsubs %f4, %f0, %f2 ! reg 2 has 2 5236429Svs195195 5246429Svs195195 fmuls %f0, %f1, %f20 ! reg 0 * reg 1 = reg 20 = 1 5256429Svs195195 fmuls %f2, %f3, %f21 ! reg 2 * reg 3 = reg 21 = 2 5266429Svs195195 fmuls %f4, %f5, %f22 ! reg 4 * reg 5 = reg 22 = 3 5276429Svs195195 fmuls %f6, %f7, %f23 ! reg 6 * reg 7 = reg 23 = 4 5286429Svs195195 fmuls %f8, %f9, %f24 ! reg 8 * reg 9 = reg 24 = 5 5296429Svs195195 fmuls %f10, %f11, %f25 ! reg 10 * reg 11 = reg 25 = 6 5306429Svs195195 fmuls %f12, %f13, %f26 ! reg 12 * reg 13 = reg 26 = 7 5316429Svs195195 fmuls %f14, %f15, %f27 ! reg 14 * reg 15 = reg 27 = 8 5326429Svs195195 fmuls %f16, %f17, %f28 ! reg 16 * reg 17 = reg 28 = 9 5336429Svs195195 fmuls %f18, %f19, %f29 ! reg 18 * reg 19 = reg 29 = 10 5346429Svs195195 5356429Svs195195 fcmps %fcc0, %f0, %f20 5366429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5376429Svs195195 st %f20, [%l2] ! Executed only when the conditional 5386429Svs195195 ! branch is taken as annul bit is set. 5396429Svs195195 ! This branch will be taken under 5406429Svs195195 ! an error condition. 5416429Svs195195 5426429Svs195195 ! No errors. Move on to the next register 5436429Svs195195 5446429Svs195195 fcmps %fcc0, %f2, %f21 5456429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5466429Svs195195 st %f21, [%l2] 5476429Svs195195 5486429Svs195195 5496429Svs195195 fcmps %fcc0, %f4, %f22 5506429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5516429Svs195195 st %f22, [%l2] 5526429Svs195195 5536429Svs195195 5546429Svs195195 fcmps %fcc0, %f6, %f23 5556429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5566429Svs195195 st %f23, [%l2] 5576429Svs195195 5586429Svs195195 5596429Svs195195 fcmps %fcc0, %f8, %f24 5606429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5616429Svs195195 st %f24, [%l2] 5626429Svs195195 5636429Svs195195 5646429Svs195195 fcmps %fcc0, %f10, %f25 5656429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5666429Svs195195 st %f25, [%l2] 5676429Svs195195 5686429Svs195195 5696429Svs195195 fcmps %fcc0, %f12, %f26 5706429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5716429Svs195195 st %f26, [%l2] 5726429Svs195195 5736429Svs195195 5746429Svs195195 fcmps %fcc0, %f14, %f27 5756429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5766429Svs195195 st %f27, [%l2] 5776429Svs195195 5786429Svs195195 5796429Svs195195 fcmps %fcc0, %f16, %f28 5806429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5816429Svs195195 st %f28, [%l2] 5826429Svs195195 5836429Svs195195 5846429Svs195195 ! Though this is the last set of compare instructions 5856429Svs195195 ! we cannot fall through as the store needs to be done 5866429Svs195195 ! only when the registers are not equal. That is why 5876429Svs195195 ! we need the unconditional branch with the annul bit set. 5886429Svs195195 fcmps %fcc0, %f18, %f29 5896429Svs195195 fbne,a,pn %fcc0, done_t_mult_sp 5906429Svs195195 st %f29, [%l2] 5916429Svs195195 5926429Svs195195 5936429Svs195195done_t_mult_sp: 5946429Svs195195 ld [%l2], %i0 5956429Svs195195 ret 5966429Svs195195 restore 5976429Svs195195SET_SIZE(timing_mult_sp) 5986429Svs195195 599*7186Skk158166#endif 600*7186Skk158166 601*7186Skk158166/* 602*7186Skk158166 * ---------------------------------------------------------------- 603*7186Skk158166 * same thing for double precision 604*7186Skk158166 * ---------------------------------------------------------------- 605*7186Skk158166 */ 606*7186Skk158166 607*7186Skk158166#ifdef __lint 608*7186Skk158166 609*7186Skk158166uint64_t 610*7186Skk158166timing_add_dp() 611*7186Skk158166{ 612*7186Skk158166 return (0); 613*7186Skk158166} 614*7186Skk158166 615*7186Skk158166#else 616*7186Skk158166 617*7186Skk158166.section ".data" 618*7186Skk158166.align 8 6196429Svs195195 6206429Svs195195.Ltmadp: 621*7186Skk158166 .skip 8 6226429Svs195195.Ltmadp1: 623*7186Skk158166 .skip 8 6246429Svs195195.Ltmadp2: 625*7186Skk158166 .skip 8 6266429Svs195195 6276429Svs195195ENTRY_NP(timing_add_dp) 6286429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stacck 6296429Svs195195 setn .Ltmadp,%l6, %l0 6306429Svs195195 setn .Ltmadp1,%l6, %l1 6316429Svs195195 setn .Ltmadp2,%l6, %l2 6326429Svs195195 mov %g0, %l3 6336429Svs195195 setn 0x3ff0000000000000,%l6, %l4 ! put value 1 6346429Svs195195 setn 0x4024000000000000,%l6, %l5 ! put value 10 into local 5 6356429Svs195195 stx %l5, [%l0] 6366429Svs195195 stx %l4, [%l1] 6376429Svs195195 stx %l3, [%l2] 6386429Svs195195 ldd [%l0], %f30 ! register 30 has 10 6396429Svs195195 fmovd %f30, %f2 ! reg 2 has 10 6406429Svs195195 ldd [%l2], %f0 ! reg 0 has 0 6416429Svs195195 ldd [%l1], %f4 ! reg 4 has 1 6426429Svs195195 fsubd %f30, %f4, %f6 ! reg 6 has 9 6436429Svs195195 fsubd %f6, %f4, %f10 ! reg 10 has 8 6446429Svs195195 fsubd %f30, %f10, %f8 ! reg 8 has 2 6456429Svs195195 fsubd %f10, %f4, %f14 ! reg 14 has 7 6466429Svs195195 fsubd %f30, %f14, %f12 ! reg 12 has 3 6476429Svs195195 fsubd %f14, %f4, %f18 ! reg 18 has 6 6486429Svs195195 fsubd %f30, %f18, %f16 ! reg 16 has 4 6496429Svs195195! 6506429Svs195195 faddd %f0, %f2, %f20 ! reg 20 has 10 6516429Svs195195 faddd %f4, %f6, %f22 ! reg 22 has 10 6526429Svs195195 faddd %f8, %f10, %f24 ! reg 24 has 10 6536429Svs195195 faddd %f12, %f14, %f26 ! reg 26 has 10 6546429Svs195195 faddd %f16, %f18, %f28 ! reg 28 has 10 6556429Svs195195! 6566429Svs195195 fcmpd %fcc0, %f30, %f20 6576429Svs195195 fbne,a,pn %fcc0, done_t_add_dp 6586429Svs195195 std %f20, [%l2] 6596429Svs195195 6606429Svs195195 fcmpd %fcc0, %f30, %f22 6616429Svs195195 fbne,a,pn %fcc0, done_t_add_dp 6626429Svs195195 std %f22, [%l2] 6636429Svs195195 6646429Svs195195 fcmpd %fcc0, %f30, %f24 6656429Svs195195 fbne,a,pn %fcc0, done_t_add_dp 6666429Svs195195 std %f24, [%l2] 6676429Svs195195 6686429Svs195195 fcmpd %fcc0, %f30, %f26 6696429Svs195195 fbne,a,pn %fcc0, done_t_add_dp 6706429Svs195195 std %f26, [%l2] 6716429Svs195195 6726429Svs195195 ! Though this is the last set of compare instructions 6736429Svs195195 ! we cannot fall through as the store needs to be done 6746429Svs195195 ! only when the registers are not equal. That is why 6756429Svs195195 ! we need the unconditional branch with the annul bit set. 6766429Svs195195 fcmpd %fcc0, %f30, %f28 6776429Svs195195 fbne,a %fcc0, done_t_add_dp 6786429Svs195195 std %f28, [%l2] 6796429Svs195195 6806429Svs195195done_t_add_dp: 6816429Svs195195 ldx [%l2], %i0 6826429Svs195195 6836429Svs195195 ret 6846429Svs195195 restore 6856429Svs195195SET_SIZE(timing_add_dp) 6866429Svs195195 687*7186Skk158166#endif 6886429Svs195195 689*7186Skk158166/* 690*7186Skk158166 * ------------------------------------------------------------------- 691*7186Skk158166 * Now for mult 692*7186Skk158166 * ------------------------------------------------------------------- 693*7186Skk158166 */ 694*7186Skk158166 695*7186Skk158166#ifdef __lint 696*7186Skk158166 697*7186Skk158166uint64_t 698*7186Skk158166timing_mult_dp() 699*7186Skk158166{ 700*7186Skk158166 return (0); 701*7186Skk158166} 702*7186Skk158166 703*7186Skk158166#else 704*7186Skk158166 705*7186Skk158166.section ".data" 706*7186Skk158166.align 8 7076429Svs195195 7086429Svs195195.Ltmmdp: 709*7186Skk158166 .skip 8 7106429Svs195195.Ltmmdp1: 711*7186Skk158166 .skip 8 7126429Svs195195.Ltmmdp2: 713*7186Skk158166 .skip 8 7146429Svs195195 7156429Svs195195ENTRY_NP(timing_mult_dp) 7166429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stacck 7176429Svs195195 setn .Ltmmdp,%l6, %l0 7186429Svs195195 setn .Ltmmdp1,%l6, %l1 7196429Svs195195 setn .Ltmmdp2,%l6, %l2 7206429Svs195195 mov %g0, %l3 7216429Svs195195 setn 0x3ff0000000000000,%l6, %l4 ! put value 1 7226429Svs195195 setn 0x4034000000000000,%l6, %l5 ! put value 20 into local 5 7236429Svs195195 stx %l5, [%l0] 7246429Svs195195 stx %l4, [%l1] 7256429Svs195195 stx %l3, [%l2] 7266429Svs195195 ldd [%l0], %f30 ! register 30 has 20 7276429Svs195195 ldd [%l1], %f2 ! register 2 has 1 7286429Svs195195 fmovd %f30, %f0 ! register 0 has 20 7296429Svs195195 faddd %f2, %f2, %f10 ! register 10 has 2 7306429Svs195195 fmovd %f10, %f16 ! register 16 has 2 7316429Svs195195 faddd %f10, %f16, %f4 ! register 4 has 4 7326429Svs195195 faddd %f4, %f2, %f6 ! register 6 has 5 7336429Svs195195 fmovd %f6, %f12 ! reg. 12 has 5 7346429Svs195195 fmovd %f4, %f14 ! reg 14 has 4 7356429Svs195195 faddd %f12, %f6, %f18 ! reg 18 has 10 7366429Svs195195 fmovd %f18, %f8 ! reg 8 has 10 7376429Svs195195! 7386429Svs195195! now everything is set 7396429Svs195195! 7406429Svs195195 fmuld %f0, %f2, %f20 ! reg 20 has 20 7416429Svs195195 fmuld %f4, %f6, %f22 ! reg 22 has 20 7426429Svs195195 fmuld %f8, %f10, %f24 ! reg 24 has 20 7436429Svs195195 fmuld %f12, %f14, %f26 ! reg 26 has 20 7446429Svs195195 fmuld %f16, %f18, %f28 ! reg 28 has 20 7456429Svs195195! 7466429Svs195195 fcmpd %fcc0, %f30, %f20 7476429Svs195195 fbne,a,pn %fcc0, done_t_mult_dp 7486429Svs195195 std %f20, [%l2] 7496429Svs195195 7506429Svs195195 fcmpd %fcc0, %f30, %f22 7516429Svs195195 fbne,a,pn %fcc0, done_t_mult_dp 7526429Svs195195 std %f22, [%l2] 7536429Svs195195 7546429Svs195195 fcmpd %fcc0, %f30, %f24 7556429Svs195195 fbne,a,pn %fcc0, done_t_mult_dp 7566429Svs195195 std %f24, [%l2] 7576429Svs195195 7586429Svs195195 fcmpd %fcc0, %f30, %f26 7596429Svs195195 fbne,a,pn %fcc0, done_t_mult_dp 7606429Svs195195 std %f26, [%l2] 7616429Svs195195 7626429Svs195195 ! Though this is the last set of compare instructions 7636429Svs195195 ! we cannot fall through as the store needs to be done 7646429Svs195195 ! only when the registers are not equal. That is why 7656429Svs195195 ! we need the unconditional branch with the annul bit set. 7666429Svs195195 fcmpd %fcc0, %f30, %f28 7676429Svs195195 fbne,a %fcc0, done_t_mult_dp 7686429Svs195195 std %f28, [%l2] 7696429Svs195195 7706429Svs195195done_t_mult_dp: 7716429Svs195195 ldx [%l2], %i0 7726429Svs195195 7736429Svs195195 ret 7746429Svs195195 restore 7756429Svs195195SET_SIZE(timing_mult_dp) 7766429Svs195195 777*7186Skk158166#endif 7786429Svs195195 779*7186Skk158166/* 780*7186Skk158166 * -------------------------------------------------------------------------- 781*7186Skk158166 * The following routines are for testing the IEEE754 exception fields 782*7186Skk158166 * of the FSR (cexc, aexc) 783*7186Skk158166 * The input is : i0 = amsw 784*7186Skk158166 * i1 = bmsw or alsw (for double precision) 785*7186Skk158166 * i2 = bmsw (for dp) 786*7186Skk158166 * i3 = blsw (for dp) 787*7186Skk158166 * 788*7186Skk158166 * The output is i0 = value of FSR register 789*7186Skk158166 * ------------------------------------------------------------------------- 790*7186Skk158166 */ 791*7186Skk158166 792*7186Skk158166#ifdef __lint 793*7186Skk158166 794*7186Skk158166/*ARGSUSED*/ 795*7186Skk158166uint64_t 796*7186Skk158166wadd_sp(unsigned long arg1, unsigned long arg2) 797*7186Skk158166{ 798*7186Skk158166 return (0); 799*7186Skk158166} 800*7186Skk158166 801*7186Skk158166#else 802*7186Skk158166 803*7186Skk158166.section ".data" 804*7186Skk158166.align 8 8056429Svs195195 8066429Svs195195.Lwadds: 807*7186Skk158166 .word 0 8086429Svs195195.Lwadds1: 809*7186Skk158166 .word 0 8106429Svs195195.Lwadds2: 811*7186Skk158166 .xword 0 ! For the FSR contents 8126429Svs195195 8136429Svs195195ENTRY_NP(wadd_sp) 8146429Svs195195 save %sp, -SA(MINFRAME), %sp 8156429Svs195195 setn .Lwadds,%l6, %l0 8166429Svs195195 setn .Lwadds1,%l6, %l1 8176429Svs195195 setn .Lwadds2,%l6, %l2 8186429Svs195195 8196429Svs195195 st %i0, [%l0] ! get the first value 8206429Svs195195 st %i1, [%l1] ! get the second value 8216429Svs195195 ld [%l0], %f0 ! f0 has the first value 8226429Svs195195 ld [%l1], %f2 ! f2 has the second value 8236429Svs195195 8246429Svs195195 fadds %f0, %f2, %f3 ! now do the instruction 8256429Svs195195 stx %fsr, [%l2] ! get the fsr value 8266429Svs195195 8276429Svs195195 ldx [%l2], %i0 8286429Svs195195 ret 8296429Svs195195 restore 8306429Svs195195SET_SIZE(wadd_sp) 8316429Svs195195 832*7186Skk158166#endif 8336429Svs195195 834*7186Skk158166/* 835*7186Skk158166 * ------------------------------------------------------------- 836*7186Skk158166 * same thing for add double precision 837*7186Skk158166 * ------------------------------------------------------------- 838*7186Skk158166 */ 839*7186Skk158166 840*7186Skk158166#ifdef __lint 841*7186Skk158166 842*7186Skk158166/*ARGSUSED*/ 843*7186Skk158166uint64_t 844*7186Skk158166wadd_dp(unsigned long arg1, unsigned long arg2, 845*7186Skk158166 unsigned long arg3, unsigned long arg4) 846*7186Skk158166{ 847*7186Skk158166 return (0); 848*7186Skk158166} 849*7186Skk158166 850*7186Skk158166#else 851*7186Skk158166 852*7186Skk158166.section ".data" 853*7186Skk158166.align 8 8546429Svs195195 8556429Svs195195.Ladddp: 856*7186Skk158166 .word 0 8576429Svs195195.Ladddp1: 858*7186Skk158166 .word 0 8596429Svs195195.Ladddp2: 860*7186Skk158166 .xword 0 ! For the FSR contents 8616429Svs195195 8626429Svs195195ENTRY_NP(wadd_dp) 8636429Svs195195 save %sp, -SA(MINFRAME), %sp 8646429Svs195195 setn .Ladddp,%l6, %l0 8656429Svs195195 setn .Ladddp1,%l6, %l1 8666429Svs195195 setn .Ladddp2,%l6, %l2 8676429Svs195195 8686429Svs195195 st %i0, [%l0] ! get the first value 8696429Svs195195 st %i1, [%l1] ! get the lsw of first value 8706429Svs195195 ld [%l0], %f0 8716429Svs195195 ld [%l1], %f1 8726429Svs195195 st %i2, [%l0] ! get the second value 8736429Svs195195 st %i3, [%l1] ! get the lsw of second value 8746429Svs195195 ld [%l0], %f2 8756429Svs195195 ld [%l1], %f3 8766429Svs195195 8776429Svs195195 faddd %f0, %f2, %f4 ! now do the instruction 8786429Svs195195 stx %fsr, [%l2] ! get the fsr value 8796429Svs195195 8806429Svs195195 ldx [%l2], %i0 8816429Svs195195 ret 8826429Svs195195 restore 8836429Svs195195 8846429Svs195195SET_SIZE(wadd_dp) 8856429Svs195195 886*7186Skk158166#endif 8876429Svs195195 888*7186Skk158166/* 889*7186Skk158166 * -------------------------------------------------------------- 890*7186Skk158166 * for divide single precision 891*7186Skk158166 * -------------------------------------------------------------- 892*7186Skk158166 */ 893*7186Skk158166 894*7186Skk158166#ifdef __lint 895*7186Skk158166 896*7186Skk158166/*ARGSUSED*/ 897*7186Skk158166uint64_t wdiv_sp(unsigned long arg1, unsigned long arg2) 898*7186Skk158166{ 899*7186Skk158166 return (0); 900*7186Skk158166} 901*7186Skk158166 902*7186Skk158166#else 903*7186Skk158166 904*7186Skk158166.section ".data" 905*7186Skk158166.align 8 9066429Svs195195 9076429Svs195195.Ldvsp: 908*7186Skk158166 .word 0 9096429Svs195195.Ldvsp1: 910*7186Skk158166 .word 0 9116429Svs195195.Ldvsp2: 912*7186Skk158166 .xword 0 ! For the FSR contents 9136429Svs195195 9146429Svs195195ENTRY_NP(wdiv_sp) 9156429Svs195195 save %sp, -SA(MINFRAME), %sp 9166429Svs195195 setn .Ldvsp,%l6, %l0 9176429Svs195195 setn .Ldvsp1,%l6, %l1 9186429Svs195195 setn .Ldvsp2,%l6, %l2 9196429Svs195195 9206429Svs195195 st %i0, [%l0] ! get the first value 9216429Svs195195 st %i1, [%l1] ! get the second value 9226429Svs195195 ld [%l0], %f0 ! f0 has the first value 9236429Svs195195 ld [%l1], %f2 ! f2 has the second value 9246429Svs195195 9256429Svs195195 fdivs %f0, %f2, %f3 ! now do the instruction 9266429Svs195195 stx %fsr, [%l2] ! get the fsr value 9276429Svs195195 9286429Svs195195 ldx [%l2], %i0 9296429Svs195195 ret 9306429Svs195195 restore 9316429Svs195195 9326429Svs195195SET_SIZE(wdiv_sp) 9336429Svs195195 934*7186Skk158166#endif 9356429Svs195195 936*7186Skk158166/* 937*7186Skk158166 * ---------------------------------------------------------------- 938*7186Skk158166 * for divide double precision 939*7186Skk158166 * ---------------------------------------------------------------- 940*7186Skk158166 */ 941*7186Skk158166 942*7186Skk158166#ifdef __lint 943*7186Skk158166 944*7186Skk158166/*ARGSUSED*/ 945*7186Skk158166uint64_t 946*7186Skk158166wdiv_dp(unsigned long arg1, unsigned long arg2, 947*7186Skk158166 unsigned long arg3, unsigned long arg4) 948*7186Skk158166{ 949*7186Skk158166 return (0); 950*7186Skk158166} 951*7186Skk158166 952*7186Skk158166#else 953*7186Skk158166 954*7186Skk158166 .section ".data" 955*7186Skk158166 .align 8 9566429Svs195195 9576429Svs195195.Ldvdp: 958*7186Skk158166 .word 0 9596429Svs195195.Ldvdp1: 960*7186Skk158166 .word 0 9616429Svs195195.Ldvdp2: 962*7186Skk158166 .xword 0 ! For the FSR contents 9636429Svs195195 9646429Svs195195ENTRY_NP(wdiv_dp) 9656429Svs195195 save %sp, -SA(MINFRAME), %sp 9666429Svs195195 setn .Ldvdp,%l6, %l0 9676429Svs195195 setn .Ldvdp1,%l6, %l1 9686429Svs195195 setn .Ldvdp2,%l6, %l2 9696429Svs195195 9706429Svs195195 st %i0, [%l0] ! get the first value 9716429Svs195195 st %i1, [%l1] ! get the lsw of first value 9726429Svs195195 ld [%l0], %f0 9736429Svs195195 ld [%l1], %f1 9746429Svs195195 st %i2, [%l0] ! get the second value 9756429Svs195195 st %i3, [%l1] ! get the lsw of second value 9766429Svs195195 ld [%l0], %f2 9776429Svs195195 ld [%l1], %f3 9786429Svs195195 9796429Svs195195 fdivd %f0, %f2, %f4 ! now do the instruction 9806429Svs195195 stx %fsr, [%l2] ! get the fsr value 9816429Svs195195 9826429Svs195195 ldx [%l2], %i0 9836429Svs195195 ret 9846429Svs195195 restore 9856429Svs195195 9866429Svs195195SET_SIZE(wdiv_dp) 9876429Svs195195 988*7186Skk158166#endif 9896429Svs195195 990*7186Skk158166/* 991*7186Skk158166 * ------------------------------------------------------------------------ 992*7186Skk158166 * for multiply single precision 993*7186Skk158166 * ------------------------------------------------------------------------ 994*7186Skk158166 */ 995*7186Skk158166 996*7186Skk158166#ifdef __lint 997*7186Skk158166 998*7186Skk158166/*ARGSUSED*/ 999*7186Skk158166uint64_t 1000*7186Skk158166wmult_sp(unsigned long arg1, unsigned long arg2) 1001*7186Skk158166{ 1002*7186Skk158166 return (0); 1003*7186Skk158166} 1004*7186Skk158166 1005*7186Skk158166#else 1006*7186Skk158166 1007*7186Skk158166.section ".data" 1008*7186Skk158166.align 8 10096429Svs195195 10106429Svs195195.Lmltsp: 1011*7186Skk158166 .word 0 10126429Svs195195.Lmltsp1: 1013*7186Skk158166 .word 0 10146429Svs195195.Lmltsp2: 1015*7186Skk158166 .xword 0 ! For the FSR contents 10166429Svs195195 10176429Svs195195ENTRY_NP(wmult_sp) 10186429Svs195195 save %sp, -SA(MINFRAME), %sp 10196429Svs195195 setn .Lmltsp,%l6, %l0 10206429Svs195195 setn .Lmltsp1,%l6, %l1 10216429Svs195195 setn .Lmltsp2,%l6, %l2 10226429Svs195195 10236429Svs195195 st %i0, [%l0] ! get the first value 10246429Svs195195 st %i1, [%l1] ! get the second value 10256429Svs195195 ld [%l0], %f0 ! f0 has the first value 10266429Svs195195 ld [%l1], %f2 ! f2 has the second value 10276429Svs195195 10286429Svs195195 fmuls %f0, %f2, %f3 ! now do the instruction 10296429Svs195195 stx %fsr, [%l2] ! get the fsr value 10306429Svs195195 10316429Svs195195 ldx [%l2], %i0 10326429Svs195195 ret 10336429Svs195195 restore 10346429Svs195195 10356429Svs195195SET_SIZE(wmult_sp) 10366429Svs195195 1037*7186Skk158166#endif 10386429Svs195195 1039*7186Skk158166/* 1040*7186Skk158166 * --------------------------------------------------------------------- 1041*7186Skk158166 * for multiply double precision 1042*7186Skk158166 * --------------------------------------------------------------------- 1043*7186Skk158166 */ 1044*7186Skk158166 1045*7186Skk158166#ifdef __lint 1046*7186Skk158166 1047*7186Skk158166/*ARGSUSED*/ 1048*7186Skk158166uint64_t 1049*7186Skk158166wmult_dp(unsigned long arg1, unsigned long arg2, 1050*7186Skk158166 unsigned long arg3, unsigned long arg4) 1051*7186Skk158166{ 1052*7186Skk158166 return (0); 1053*7186Skk158166} 1054*7186Skk158166 1055*7186Skk158166#else 1056*7186Skk158166 1057*7186Skk158166.section ".data" 1058*7186Skk158166.align 8 10596429Svs195195 10606429Svs195195.Lmltdp: 1061*7186Skk158166 .word 0 10626429Svs195195.Lmltdp1: 1063*7186Skk158166 .word 0 10646429Svs195195.Lmltdp2: 1065*7186Skk158166 .xword 0 ! For the FSR contents 10666429Svs195195 10676429Svs195195ENTRY_NP(wmult_dp) 10686429Svs195195 save %sp, -SA(MINFRAME), %sp 10696429Svs195195 setn .Lmltdp,%l6, %l0 10706429Svs195195 setn .Lmltdp1,%l6, %l1 10716429Svs195195 setn .Lmltdp2,%l6, %l2 10726429Svs195195 10736429Svs195195 st %i0, [%l0] ! get the first value 10746429Svs195195 st %i1, [%l1] ! get the lsw of first value 10756429Svs195195 ld [%l0], %f0 10766429Svs195195 ld [%l1], %f1 10776429Svs195195 st %i2, [%l0] ! get the second value 10786429Svs195195 st %i3, [%l1] ! get the lsw of second value 10796429Svs195195 ld [%l0], %f2 10806429Svs195195 ld [%l1], %f3 10816429Svs195195 10826429Svs195195 fmuld %f0, %f2, %f4 ! now do the instruction 10836429Svs195195 stx %fsr, [%l2] ! get the fsr value 10846429Svs195195 10856429Svs195195 ldx [%l2], %i0 10866429Svs195195 ret 10876429Svs195195 restore 10886429Svs195195 10896429Svs195195SET_SIZE(wmult_dp) 10906429Svs195195 1091*7186Skk158166#endif 10926429Svs195195 1093*7186Skk158166/* 1094*7186Skk158166 * ----------------------------------------------------------------- 1095*7186Skk158166 * for square-root single precision 1096*7186Skk158166 * ----------------------------------------------------------------- 1097*7186Skk158166 */ 1098*7186Skk158166 1099*7186Skk158166#ifdef __lint 1100*7186Skk158166 1101*7186Skk158166/*ARGSUSED*/ 1102*7186Skk158166uint64_t 1103*7186Skk158166wsqrt_sp(unsigned long arg1) 1104*7186Skk158166{ 1105*7186Skk158166 return (0); 1106*7186Skk158166} 1107*7186Skk158166 1108*7186Skk158166#else 1109*7186Skk158166 1110*7186Skk158166.section ".data" 1111*7186Skk158166.align 4 11126429Svs195195.Lsqsp_opr: 1113*7186Skk158166 .word 0 11146429Svs195195 11156429Svs195195 .align 8 11166429Svs195195.Lsqsp_fsr: 1117*7186Skk158166 .xword 0 ! For the FSR contents 11186429Svs195195 11196429Svs195195ENTRY_NP(wsqrt_sp) 11206429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stack 11216429Svs195195 setn .Lsqsp_opr,%l6,%l0 ! .. get the address of temp2 11226429Svs195195 setn .Lsqsp_fsr,%l6,%l2 ! .. and temp 11236429Svs195195 11246429Svs195195 st %i0, [%l0] ! .. get the callers value 11256429Svs195195 ld [%l0], %f0 ! .. into the float register 11266429Svs195195 11276429Svs195195 fsqrts %f0, %f2 ! .... have the fpu perform the operation 11286429Svs195195 stx %fsr, [%l2] ! get the fsr value 11296429Svs195195 11306429Svs195195 ldx [%l2], %i0 11316429Svs195195 ret 11326429Svs195195 restore 11336429Svs195195 11346429Svs195195SET_SIZE(wsqrt_sp) 11356429Svs195195 1136*7186Skk158166#endif 11376429Svs195195 1138*7186Skk158166/* 1139*7186Skk158166 * --------------------------------------------------------------------- 1140*7186Skk158166 * for square-root double precision 1141*7186Skk158166 * --------------------------------------------------------------------- 1142*7186Skk158166 */ 1143*7186Skk158166 1144*7186Skk158166#ifdef __lint 1145*7186Skk158166 1146*7186Skk158166/*ARGSUSED*/ 1147*7186Skk158166uint64_t 1148*7186Skk158166wsqrt_dp(uint64_t arg1) 1149*7186Skk158166{ 1150*7186Skk158166 return (0); 1151*7186Skk158166} 1152*7186Skk158166 1153*7186Skk158166#else 1154*7186Skk158166 1155*7186Skk158166.section ".data" 1156*7186Skk158166.align 8 11576429Svs195195.Lsqdp_opr: 1158*7186Skk158166 .xword 0 11596429Svs195195.Lsqdp_fsr: 1160*7186Skk158166 .xword 0 ! For the FSR contents 11616429Svs195195 11626429Svs195195ENTRY_NP(wsqrt_dp) 11636429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stack 11646429Svs195195 setn .Lsqdp_opr,%l6,%l0 ! .. get the address of temp2 11656429Svs195195 setn .Lsqdp_fsr,%l6,%l2 ! .. and temp 11666429Svs195195 11676429Svs195195 stx %i0, [%l0] ! .. get the callers value 11686429Svs195195 ldd [%l0], %f0 ! .. into a float register 11696429Svs195195 11706429Svs195195 fsqrtd %f0, %f2 ! .... have the fpu perform the operation 11716429Svs195195 stx %fsr, [%l2] ! get the fsr value 11726429Svs195195 11736429Svs195195 ldx [%l2], %i0 11746429Svs195195 ret 11756429Svs195195 restore 11766429Svs195195 11776429Svs195195SET_SIZE(wsqrt_dp) 11786429Svs195195 1179*7186Skk158166#endif 11806429Svs195195 1181*7186Skk158166/* 1182*7186Skk158166 * --------------------------------------------------------------------- 1183*7186Skk158166 * Chaining test. 1184*7186Skk158166 * --------------------------------------------------------------------- 1185*7186Skk158166 */ 1186*7186Skk158166 1187*7186Skk158166#ifdef __lint 1188*7186Skk158166 1189*7186Skk158166/*ARGSUSED*/ 1190*7186Skk158166unsigned long 1191*7186Skk158166chain_sp(int arg1) 1192*7186Skk158166{ 1193*7186Skk158166 return (0); 1194*7186Skk158166} 1195*7186Skk158166 1196*7186Skk158166#else 1197*7186Skk158166 1198*7186Skk158166.section ".data" 1199*7186Skk158166.align 8 12006429Svs195195 12016429Svs195195.Lchsp: 1202*7186Skk158166 .word 0 12036429Svs195195.Lchsp1: 1204*7186Skk158166 .word 0 12056429Svs195195 12066429Svs195195ENTRY_NP(chain_sp) 12076429Svs195195 save %sp, -SA(MINFRAME), %sp 12086429Svs195195 setn .Lchsp,%l6, %l0 12096429Svs195195 setn .Lchsp1,%l6, %l1 12106429Svs195195 st %i0, [%l0] ! store the value 12116429Svs195195 ld [%l0], %f0 12126429Svs195195 fitos %f0, %f2 ! convert integer into single 12136429Svs195195 fmovs %f2, %f0 ! f0 has the same value x 12146429Svs195195 fadds %f0, %f2, %f4 ! f4 will have 2x 12156429Svs195195 fsubs %f4, %f0, %f6 ! f6 will have x 12166429Svs195195 fmuls %f6, %f4, %f8 ! f8 will have (2x * x) 12176429Svs195195 fdivs %f8, %f4, %f10 ! f10 will have (2x * x) / 2x = x 12186429Svs195195 fstoi %f10, %f12 12196429Svs195195 12206429Svs195195 st %f12, [%l1] 12216429Svs195195 ld [%l1], %i0 12226429Svs195195 12236429Svs195195 ret 12246429Svs195195 restore 12256429Svs195195SET_SIZE(chain_sp) 12266429Svs195195 1227*7186Skk158166#endif 12286429Svs195195 1229*7186Skk158166#ifdef __lint 1230*7186Skk158166 1231*7186Skk158166/*ARGSUSED*/ 1232*7186Skk158166unsigned long 1233*7186Skk158166chain_dp(int arg1) 1234*7186Skk158166{ 1235*7186Skk158166 return (0); 1236*7186Skk158166} 1237*7186Skk158166 1238*7186Skk158166#else 1239*7186Skk158166 1240*7186Skk158166.section ".data" 1241*7186Skk158166.align 8 12426429Svs195195 12436429Svs195195.Lchdp: 1244*7186Skk158166 .word 0 12456429Svs195195.Lchdp1: 1246*7186Skk158166 .word 0 12476429Svs195195 12486429Svs195195ENTRY_NP(chain_dp) 12496429Svs195195 save %sp, -SA(MINFRAME), %sp 12506429Svs195195 setn .Lchdp,%l6, %l0 12516429Svs195195 setn .Lchdp1,%l6, %l1 12526429Svs195195 st %i0, [%l0] ! store the value 12536429Svs195195 ld [%l0], %f0 12546429Svs195195 fitod %f0, %f2 ! convert integer into double 12556429Svs195195 fmovs %f2, %f0 ! f0 has the same value x 12566429Svs195195 faddd %f0, %f2, %f4 ! f4 will have 2x 12576429Svs195195 fsubd %f4, %f0, %f6 ! f6 will have x 12586429Svs195195 fmuld %f6, %f4, %f8 ! f8 will have (2x * x) 12596429Svs195195 fdivd %f8, %f4, %f10 ! f10 will have (2x * x) / 2x = x 12606429Svs195195 fdtoi %f10, %f12 12616429Svs195195 12626429Svs195195 st %f12, [%l1] 12636429Svs195195 ld [%l1], %i0 12646429Svs195195 12656429Svs195195 ret 12666429Svs195195 restore 12676429Svs195195SET_SIZE(chain_dp) 12686429Svs195195 1269*7186Skk158166#endif 12706429Svs195195 1271*7186Skk158166/* 1272*7186Skk158166 * -------------------------------------------------------------------------- 1273*7186Skk158166 * Name: Initialize all SP Registers 1274*7186Skk158166 * Function: Loads the callers value into all SP floating point registers. 1275*7186Skk158166 * Calling: in0 = Value 1276*7186Skk158166 * Returns: All float register = Value 1277*7186Skk158166 * Convention: init_regs(val); 1278*7186Skk158166 * Method: Copys the user value into each fp reg in sequence. 1279*7186Skk158166 * -------------------------------------------------------------------------- 1280*7186Skk158166 */ 1281*7186Skk158166 1282*7186Skk158166#ifdef __lint 1283*7186Skk158166 1284*7186Skk158166/*ARGSUSED*/ 1285*7186Skk158166void 1286*7186Skk158166init_regs(uint32_t arg1) 1287*7186Skk158166{ 1288*7186Skk158166} 1289*7186Skk158166 1290*7186Skk158166#else 1291*7186Skk158166 1292*7186Skk158166.section ".data" 1293*7186Skk158166.align 8 12946429Svs195195 12956429Svs195195.Lclrg: 1296*7186Skk158166 .skip 8 12976429Svs195195 12986429Svs195195ENTRY_NP(init_regs) 12996429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stack 13006429Svs195195 setn .Lclrg,%l6,%l0 ! load the address of temp2 in local0 13016429Svs195195 st %i0, [%l0] ! load the value in temp2 via local0 13026429Svs195195 ld [%l0], %f0 ! .. load the value 13036429Svs195195 ld [%l0], %f1 ! .. load the value 13046429Svs195195 ld [%l0], %f2 ! .. load the value 13056429Svs195195 ld [%l0], %f3 ! .. load the value 13066429Svs195195 ld [%l0], %f4 ! .. load the value 13076429Svs195195 ld [%l0], %f5 ! .. load the value 13086429Svs195195 ld [%l0], %f6 ! .. load the value 13096429Svs195195 ld [%l0], %f7 ! .. load the value 13106429Svs195195 ld [%l0], %f8 ! .. load the value 13116429Svs195195 ld [%l0], %f9 ! .. load the value 13126429Svs195195 ld [%l0], %f10 ! .. load the value 13136429Svs195195 ld [%l0], %f11 ! .. load the value 13146429Svs195195 ld [%l0], %f12 ! .. load the value 13156429Svs195195 ld [%l0], %f13 ! .. load the value 13166429Svs195195 ld [%l0], %f14 ! .. load the value 13176429Svs195195 ld [%l0], %f15 ! .. load the value 13186429Svs195195 ld [%l0], %f16 ! .. load the value 13196429Svs195195 ld [%l0], %f17 ! .. load the value 13206429Svs195195 ld [%l0], %f18 ! .. load the value 13216429Svs195195 ld [%l0], %f19 ! .. load the value 13226429Svs195195 ld [%l0], %f20 ! .. load the value 13236429Svs195195 ld [%l0], %f21 ! .. load the value 13246429Svs195195 ld [%l0], %f22 ! .. load the value 13256429Svs195195 ld [%l0], %f23 ! .. load the value 13266429Svs195195 ld [%l0], %f24 ! .. load the value 13276429Svs195195 ld [%l0], %f25 ! .. load the value 13286429Svs195195 ld [%l0], %f26 ! .. load the value 13296429Svs195195 ld [%l0], %f27 ! .. load the value 13306429Svs195195 ld [%l0], %f28 ! .. load the value 13316429Svs195195 ld [%l0], %f29 ! .. load the value 13326429Svs195195 ld [%l0], %f30 ! .. load the value 13336429Svs195195 ld [%l0], %f31 ! .. load the value 13346429Svs195195 ret 13356429Svs195195 restore 13366429Svs195195SET_SIZE(init_regs) 13376429Svs195195 1338*7186Skk158166#endif 13396429Svs195195 1340*7186Skk158166/* 1341*7186Skk158166 * Name: Initialize all double precision Registers 1342*7186Skk158166 * Function: Loads the callers value into all floating point registers. 1343*7186Skk158166 * Calling: in0 = Value 1344*7186Skk158166 * Returns: All float register = Value 1345*7186Skk158166 * Convention: init_regs_dp(val); 1346*7186Skk158166 * Method: Copys the user value into each fp reg in sequence. 1347*7186Skk158166 * -------------------------------------------------------------------------- 1348*7186Skk158166 */ 13496429Svs195195 1350*7186Skk158166#ifdef __lint 1351*7186Skk158166 1352*7186Skk158166/*ARGSUSED*/ 1353*7186Skk158166void 1354*7186Skk158166init_regs_dp(uint64_t arg1) 1355*7186Skk158166{ 1356*7186Skk158166} 1357*7186Skk158166 1358*7186Skk158166#else 1359*7186Skk158166 1360*7186Skk158166.section ".data" 1361*7186Skk158166.align 8 13626429Svs195195 13636429Svs195195.Lclrg_dp: 1364*7186Skk158166 .skip 16 13656429Svs195195 13666429Svs195195ENTRY_NP(init_regs_dp) 13676429Svs195195 save %sp, -SA(MINFRAME), %sp 13686429Svs195195 ! save the registers, stack 13696429Svs195195 setx .Lclrg_dp,%l6,%l0 ! load the address of temp2 in local0 13706429Svs195195 stx %i0, [%l0] ! load the value in temp2 via local0 13716429Svs195195 ldd [%l0], %f0 ! .. load the value 13726429Svs195195 ldd [%l0], %f2 ! .. load the value 13736429Svs195195 ldd [%l0], %f4 ! .. load the value 13746429Svs195195 ldd [%l0], %f6 ! .. load the value 13756429Svs195195 ldd [%l0], %f8 ! .. load the value 13766429Svs195195 ldd [%l0], %f10 ! .. load the value 13776429Svs195195 ldd [%l0], %f12 ! .. load the value 13786429Svs195195 ldd [%l0], %f14 ! .. load the value 13796429Svs195195 ldd [%l0], %f16 ! .. load the value 13806429Svs195195 ldd [%l0], %f18 ! .. load the value 13816429Svs195195 ldd [%l0], %f20 ! .. load the value 13826429Svs195195 ldd [%l0], %f22 ! .. load the value 13836429Svs195195 ldd [%l0], %f24 ! .. load the value 13846429Svs195195 ldd [%l0], %f26 ! .. load the value 13856429Svs195195 ldd [%l0], %f28 ! .. load the value 13866429Svs195195 ldd [%l0], %f30 ! .. load the value 13876429Svs195195 ldd [%l0], %f32 ! .. load the value 13886429Svs195195 ldd [%l0], %f34 ! .. load the value 13896429Svs195195 ldd [%l0], %f36 ! .. load the value 13906429Svs195195 ldd [%l0], %f38 ! .. load the value 13916429Svs195195 ldd [%l0], %f40 ! .. load the value 13926429Svs195195 ldd [%l0], %f42 ! .. load the value 13936429Svs195195 ldd [%l0], %f44 ! .. load the value 13946429Svs195195 ldd [%l0], %f46 ! .. load the value 13956429Svs195195 ldd [%l0], %f48 ! .. load the value 13966429Svs195195 ldd [%l0], %f50 ! .. load the value 13976429Svs195195 ldd [%l0], %f52 ! .. load the value 13986429Svs195195 ldd [%l0], %f54 ! .. load the value 13996429Svs195195 ldd [%l0], %f56 ! .. load the value 14006429Svs195195 ldd [%l0], %f58 ! .. load the value 14016429Svs195195 ldd [%l0], %f60 ! .. load the value 14026429Svs195195 ldd [%l0], %f62 ! .. load the value 14036429Svs195195 ret 14046429Svs195195 restore 14056429Svs195195SET_SIZE(init_regs_dp) 14066429Svs195195 1407*7186Skk158166#endif 14086429Svs195195 1409*7186Skk158166/* 1410*7186Skk158166 * Name: 1411*7186Skk158166 * Function: 1412*7186Skk158166 * Calling: 1413*7186Skk158166 * Returns: 1414*7186Skk158166 * Convention: 1415*7186Skk158166 * -------------------------------------------------------------------------- 1416*7186Skk158166 */ 14176429Svs195195 1418*7186Skk158166#ifdef __lint 14196429Svs195195 1420*7186Skk158166/*ARGSUSED*/ 1421*7186Skk158166uint32_t 1422*7186Skk158166register_test(int arg1, uint32_t arg2) 1423*7186Skk158166{ 1424*7186Skk158166 return (0); 1425*7186Skk158166} 1426*7186Skk158166 1427*7186Skk158166#else 1428*7186Skk158166 1429*7186Skk158166.section ".data" 1430*7186Skk158166.align 4 14316429Svs195195 14326429Svs195195.Lrgtst1: 1433*7186Skk158166 .skip 4 14346429Svs195195.Lrgtst2: 1435*7186Skk158166 .skip 4 14366429Svs195195 14376429Svs195195ENTRY_NP(register_test) 14386429Svs195195 save %sp, -SA(MINFRAME), %sp 14396429Svs195195 14406429Svs195195 setn .Lrgtst1,%l6,%l1 14416429Svs195195 setn .Lrgtst2,%l6,%l2 14426429Svs195195 14436429Svs195195 14446429Svs195195 setn regTable, %l6, %o0 14456429Svs195195 mulx %i0, 12, %o1 ! Table entries are 12 bytes each. 14466429Svs195195 14476429Svs195195 ! Jump to the appropriate set of instructions 14486429Svs195195 jmp %o0+%o1 14496429Svs195195 st %i1, [%l1] ! save the pattern to be written 14506429Svs195195 14516429Svs195195 14526429Svs195195! If the number of instructions in this macro are changed, 14536429Svs195195! please ensure that the second operand for the mulx above 14546429Svs195195! is also updated. We can calculate this during run-time but 14556429Svs195195! that will mean extra instructions and time. 14566429Svs195195#define TEST_REG(reg_num) \ 14576429Svs195195 ld [%l1], %f/**/reg_num; \ 14586429Svs195195 ba %ncc, reg_done; \ 14596429Svs195195 st %f/**/reg_num, [%l2] 14606429Svs195195 14616429Svs195195regTable : 14626429Svs195195 14636429Svs195195 TEST_REG(0) 14646429Svs195195 TEST_REG(1) 14656429Svs195195 TEST_REG(2) 14666429Svs195195 TEST_REG(3) 14676429Svs195195 TEST_REG(4) 14686429Svs195195 TEST_REG(5) 14696429Svs195195 TEST_REG(6) 14706429Svs195195 TEST_REG(7) 14716429Svs195195 TEST_REG(8) 14726429Svs195195 TEST_REG(9) 14736429Svs195195 TEST_REG(10) 14746429Svs195195 TEST_REG(11) 14756429Svs195195 TEST_REG(12) 14766429Svs195195 TEST_REG(13) 14776429Svs195195 TEST_REG(14) 14786429Svs195195 TEST_REG(15) 14796429Svs195195 TEST_REG(16) 14806429Svs195195 TEST_REG(17) 14816429Svs195195 TEST_REG(18) 14826429Svs195195 TEST_REG(19) 14836429Svs195195 TEST_REG(20) 14846429Svs195195 TEST_REG(21) 14856429Svs195195 TEST_REG(22) 14866429Svs195195 TEST_REG(23) 14876429Svs195195 TEST_REG(24) 14886429Svs195195 TEST_REG(25) 14896429Svs195195 TEST_REG(26) 14906429Svs195195 TEST_REG(27) 14916429Svs195195 TEST_REG(28) 14926429Svs195195 TEST_REG(29) 14936429Svs195195 TEST_REG(30) 14946429Svs195195 14956429Svs195195 ! No need for a branch here as this the last entry in 14966429Svs195195 ! the table and the label is will be reached by falling 14976429Svs195195 ! through. 14986429Svs195195 ld [%l1], %f31 14996429Svs195195 st %f31, [%l2] 15006429Svs195195 15016429Svs195195reg_done: 15026429Svs195195 ld [%l2], %i0 15036429Svs195195 15046429Svs195195 ret 15056429Svs195195 restore 15066429Svs195195SET_SIZE(register_test) 15076429Svs195195 1508*7186Skk158166#endif 15096429Svs195195 1510*7186Skk158166/* 1511*7186Skk158166 * Name: 1512*7186Skk158166 * Function: 1513*7186Skk158166 * Calling: 1514*7186Skk158166 * Returns: 1515*7186Skk158166 * Convention: 1516*7186Skk158166 * -------------------------------------------------------------------------- 1517*7186Skk158166 */ 1518*7186Skk158166 1519*7186Skk158166#ifdef __lint 1520*7186Skk158166 1521*7186Skk158166/*ARGSUSED*/ 1522*7186Skk158166uint64_t 1523*7186Skk158166register_test_dp(int arg1, uint64_t arg2) 1524*7186Skk158166{ 1525*7186Skk158166 return (0); 1526*7186Skk158166} 1527*7186Skk158166 1528*7186Skk158166#else 1529*7186Skk158166 1530*7186Skk158166.section ".data" 1531*7186Skk158166.align 8 15326429Svs195195 15336429Svs195195.Lrgtst1_dp: 1534*7186Skk158166 .skip 8 15356429Svs195195.Lrgtst2_dp: 1536*7186Skk158166 .skip 8 15376429Svs195195 15386429Svs195195ENTRY_NP(register_test_dp) 15396429Svs195195 save %sp, -SA(MINFRAME), %sp 15406429Svs195195 15416429Svs195195 setx .Lrgtst1_dp,%l6,%l1 15426429Svs195195 setx .Lrgtst2_dp,%l6,%l2 15436429Svs195195 15446429Svs195195 setn regTable_dp, %l6, %o0 15456429Svs195195 mulx %i0, 6, %o1 ! Registers are 64-bit and hence the 15466429Svs195195 ! register numbers given will be even. 15476429Svs195195 ! Each table entry is 12 bytes. 15486429Svs195195 ! Multiplying the even register number 15496429Svs195195 ! by 6 will give the correct offset. 15506429Svs195195 15516429Svs195195 15526429Svs195195 ! Jump to the appropriate set of instructions 15536429Svs195195 jmp %o0+%o1 15546429Svs195195 stx %i1, [%l1] !save the pattern to be written 15556429Svs195195 15566429Svs195195! If the number of instructions in this macro are changed, 15576429Svs195195! please ensure that the second operand for the mulx above 15586429Svs195195! is also updated. We can calculate this during run-time but 15596429Svs195195! that will mean extra instructions and time. 15606429Svs195195#define TEST_REG_DP(reg_num) \ 15616429Svs195195 ldd [%l1], %f/**/reg_num; \ 15626429Svs195195 ba %ncc, reg_done_dp; \ 15636429Svs195195 std %f/**/reg_num, [%l2] 15646429Svs195195 15656429Svs195195regTable_dp : 15666429Svs195195 15676429Svs195195 TEST_REG_DP(0) 15686429Svs195195 TEST_REG_DP(2) 15696429Svs195195 TEST_REG_DP(4) 15706429Svs195195 TEST_REG_DP(6) 15716429Svs195195 TEST_REG_DP(8) 15726429Svs195195 TEST_REG_DP(10) 15736429Svs195195 TEST_REG_DP(12) 15746429Svs195195 TEST_REG_DP(14) 15756429Svs195195 TEST_REG_DP(16) 15766429Svs195195 TEST_REG_DP(18) 15776429Svs195195 TEST_REG_DP(20) 15786429Svs195195 TEST_REG_DP(22) 15796429Svs195195 TEST_REG_DP(24) 15806429Svs195195 TEST_REG_DP(26) 15816429Svs195195 TEST_REG_DP(28) 15826429Svs195195 TEST_REG_DP(30) 15836429Svs195195 TEST_REG_DP(32) 15846429Svs195195 TEST_REG_DP(34) 15856429Svs195195 TEST_REG_DP(36) 15866429Svs195195 TEST_REG_DP(38) 15876429Svs195195 TEST_REG_DP(40) 15886429Svs195195 TEST_REG_DP(42) 15896429Svs195195 TEST_REG_DP(44) 15906429Svs195195 TEST_REG_DP(46) 15916429Svs195195 TEST_REG_DP(48) 15926429Svs195195 TEST_REG_DP(50) 15936429Svs195195 TEST_REG_DP(52) 15946429Svs195195 TEST_REG_DP(54) 15956429Svs195195 TEST_REG_DP(56) 15966429Svs195195 TEST_REG_DP(58) 15976429Svs195195 TEST_REG_DP(60) 15986429Svs195195 15996429Svs195195 ! No need for a branch here as this the last entry in 16006429Svs195195 ! the table and the label is will be reached by falling 16016429Svs195195 ! through. 16026429Svs195195 ldd [%l1], %f62 16036429Svs195195 std %f62, [%l2] 16046429Svs195195 16056429Svs195195reg_done_dp: 16066429Svs195195 ldx [%l2], %i0 16076429Svs195195 16086429Svs195195 ret 16096429Svs195195 restore 16106429Svs195195SET_SIZE(register_test_dp) 16116429Svs195195 1612*7186Skk158166#endif 16136429Svs195195 1614*7186Skk158166/* 1615*7186Skk158166 * ------------------------------------------------------------------------ 1616*7186Skk158166 * Name: Move Registers 1617*7186Skk158166 * Function: Move a value thru the float registers 1618*7186Skk158166 * Calling: in0 = value 1619*7186Skk158166 * Returns: in0 = result 1620*7186Skk158166 * Convention: if (result != move_regs(value)) 1621*7186Skk158166 * error(result-value); 1622*7186Skk158166 * -------------------------------------------------------------------------- 1623*7186Skk158166 */ 16246429Svs195195 1625*7186Skk158166#ifdef __lint 1626*7186Skk158166 1627*7186Skk158166/*ARGSUSED*/ 1628*7186Skk158166unsigned long 1629*7186Skk158166move_regs(unsigned long arg1) 1630*7186Skk158166{ 1631*7186Skk158166 return (0); 1632*7186Skk158166} 1633*7186Skk158166 1634*7186Skk158166#else 1635*7186Skk158166 1636*7186Skk158166.section ".data" 1637*7186Skk158166.align 4 16386429Svs195195 16396429Svs195195.Lmvrg: 1640*7186Skk158166 .skip 4 16416429Svs195195.Lmvrg1: 1642*7186Skk158166 .skip 4 16436429Svs195195 16446429Svs195195ENTRY_NP(move_regs) 16456429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stack 16466429Svs195195 setn .Lmvrg1,%l6,%l0 ! get the address to temp2 16476429Svs195195 setn .Lmvrg,%l6,%l1 ! .. and temp 16486429Svs195195 st %i0, [%l0] ! get the callers value 16496429Svs195195 ld [%l0], %f0 ! .. into a float register 16506429Svs195195 fmovs %f0, %f1 ! copy from 1 register to the next 16516429Svs195195 fmovs %f1, %f2 ! .. to the next 16526429Svs195195 fmovs %f2, %f3 ! .. to the next 16536429Svs195195 fmovs %f3, %f4 ! .. to the next 16546429Svs195195 fmovs %f4, %f5 ! .. to the next 16556429Svs195195 fmovs %f5, %f6 ! .. to the next 16566429Svs195195 fmovs %f6, %f7 ! .. to the next 16576429Svs195195 fmovs %f7, %f8 ! .. to the next 16586429Svs195195 fmovs %f8, %f9 ! .. to the next 16596429Svs195195 fmovs %f9, %f10 ! .. to the next 16606429Svs195195 fmovs %f10, %f11 ! .. to the next 16616429Svs195195 fmovs %f11, %f12 ! .. to the next 16626429Svs195195 fmovs %f12, %f13 ! .. to the next 16636429Svs195195 fmovs %f13, %f14 ! .. to the next 16646429Svs195195 fmovs %f14, %f15 ! .. to the next 16656429Svs195195 fmovs %f15, %f16 ! .. to the next 16666429Svs195195 fmovs %f16, %f17 ! .. to the next 16676429Svs195195 fmovs %f17, %f18 ! .. to the next 16686429Svs195195 fmovs %f18, %f19 ! .. to the next 16696429Svs195195 fmovs %f19, %f20 ! .. to the next 16706429Svs195195 fmovs %f20, %f21 ! .. to the next 16716429Svs195195 fmovs %f21, %f22 ! .. to the next 16726429Svs195195 fmovs %f22, %f23 ! .. to the next 16736429Svs195195 fmovs %f23, %f24 ! .. to the next 16746429Svs195195 fmovs %f24, %f25 ! .. to the next 16756429Svs195195 fmovs %f25, %f26 ! .. to the next 16766429Svs195195 fmovs %f26, %f27 ! .. to the next 16776429Svs195195 fmovs %f27, %f28 ! .. to the next 16786429Svs195195 fmovs %f28, %f29 ! .. to the next 16796429Svs195195 fmovs %f29, %f30 ! .. to the next 16806429Svs195195 fmovs %f30, %f31 ! .. to the next 16816429Svs195195 st %f31, [%l1] ! .... save the result 16826429Svs195195 ld [%l1], %i0 ! .. and return it to the caller 16836429Svs195195 ret 16846429Svs195195 restore 16856429Svs195195SET_SIZE(move_regs) 16866429Svs195195 1687*7186Skk158166#endif 16886429Svs195195 1689*7186Skk158166/* 1690*7186Skk158166 * ------------------------------------------------------------------------ 1691*7186Skk158166 * Name: 1692*7186Skk158166 * Function: 1693*7186Skk158166 * Calling: 1694*7186Skk158166 * Returns: 1695*7186Skk158166 * Convention: 1696*7186Skk158166 * -------------------------------------------------------------------------- 1697*7186Skk158166 * 1698*7186Skk158166 * The following routine checks the branching is done accordingly 1699*7186Skk158166 * to the ficc bits. 1700*7186Skk158166 * input %i0 = 0 = branch unordered 1701*7186Skk158166 * 1 = branch greater 1702*7186Skk158166 * 2 = branch unordered or greater 1703*7186Skk158166 * 3 = branch less 1704*7186Skk158166 * 4 = branch unordered or less 1705*7186Skk158166 * 5 = branch less or greater 1706*7186Skk158166 * 6 = branch not equal 1707*7186Skk158166 * 7 = branch equal 1708*7186Skk158166 * 8 = branch unordered or equal 1709*7186Skk158166 * . 9 = branch greater or equal 1710*7186Skk158166 * 10 = branch branch unordered or greater or equal 1711*7186Skk158166 * 11 = branch less or equal 1712*7186Skk158166 * 12 = branch unordered or or less or equal 1713*7186Skk158166 * 13 = branch ordered 1714*7186Skk158166 * 14 = branch always 1715*7186Skk158166 * 15 = branch never 1716*7186Skk158166 * 1717*7186Skk158166 * ouput : %i0 = 0 = good 1718*7186Skk158166 * = 1 = error 1719*7186Skk158166 */ 17206429Svs195195 1721*7186Skk158166#ifdef __lint 17226429Svs195195 1723*7186Skk158166/*ARGSUSED*/ 1724*7186Skk158166unsigned long 1725*7186Skk158166branches(unsigned long arg1, unsigned long arg2, unsigned long arg3) 1726*7186Skk158166{ 1727*7186Skk158166 return (0); 1728*7186Skk158166} 17296429Svs195195 1730*7186Skk158166#else 1731*7186Skk158166 1732*7186Skk158166.section ".data" 1733*7186Skk158166.align 8 17346429Svs195195 17356429Svs195195.Lbr: 1736*7186Skk158166 .skip 8 17376429Svs195195.Lbr1: 1738*7186Skk158166 .skip 8 17396429Svs195195 17406429Svs195195ENTRY_NP(branches) 17416429Svs195195 save %sp, -SA(MINFRAME), %sp ! save the registers, stacck 17426429Svs195195 setn .Lbr1,%l6,%l1 17436429Svs195195 setn .Lbr,%l6,%l2 17446429Svs195195 st %i1, [%l1] 17456429Svs195195 st %i2, [%l2] 17466429Svs195195 ld [%l1], %f0 17476429Svs195195 ld [%l2], %f2 17486429Svs195195 17496429Svs195195 setn brn_0, %l6, %o0 17506429Svs195195 mulx %i0, 12, %o1 17516429Svs195195 17526429Svs195195 17536429Svs195195 jmp %o0+%o1 17546429Svs195195 fcmps %fcc0, %f0, %f2 ! compare the values to get ficc 17556429Svs195195! 17566429Svs195195! branch unordered 17576429Svs195195brn_0: 17586429Svs195195 fbu,a %fcc0, br_good 17596429Svs195195 nop 17606429Svs195195 ba,a %ncc, br_error 17616429Svs195195 17626429Svs195195! branch greater 17636429Svs195195brn_1: 17646429Svs195195 fbg,a %fcc0, br_good 17656429Svs195195 nop 17666429Svs195195 ba,a %ncc, br_error 17676429Svs195195 17686429Svs195195! branch unordered or greater 17696429Svs195195brn_2: 17706429Svs195195 fbug,a %fcc0, br_good 17716429Svs195195 nop 17726429Svs195195 ba,a %ncc, br_error 17736429Svs195195 17746429Svs195195! branch less 17756429Svs195195brn_3: 17766429Svs195195 fbl,a %fcc0, br_good 17776429Svs195195 nop 17786429Svs195195 ba,a %ncc, br_error 17796429Svs195195 17806429Svs195195! branch unorderd or less 17816429Svs195195brn_4: 17826429Svs195195 fbul,a %fcc0, br_good 17836429Svs195195 nop 17846429Svs195195 ba,a %ncc, br_error 17856429Svs195195 17866429Svs195195! branch less or greater 17876429Svs195195brn_5: 17886429Svs195195 fblg,a %fcc0, br_good 17896429Svs195195 nop 17906429Svs195195 ba,a %ncc, br_error 17916429Svs195195 17926429Svs195195! branch not equal 17936429Svs195195brn_6: 17946429Svs195195 fbne,a %fcc0, br_good 17956429Svs195195 nop 17966429Svs195195 ba,a %ncc, br_error 17976429Svs195195 17986429Svs195195! branch equal 17996429Svs195195brn_7: 18006429Svs195195 fbe,a %fcc0, br_good 18016429Svs195195 nop 18026429Svs195195 ba,a %ncc, br_error 18036429Svs195195 18046429Svs195195! branch unordered or equal 18056429Svs195195brn_8: 18066429Svs195195 fbue,a %fcc0, br_good 18076429Svs195195 nop 18086429Svs195195 ba,a %ncc, br_error 18096429Svs195195 18106429Svs195195! branch greater or equal 18116429Svs195195brn_9: 18126429Svs195195 fbge,a %fcc0, br_good 18136429Svs195195 nop 18146429Svs195195 ba,a %ncc, br_error 18156429Svs195195 18166429Svs195195! branch unordered or greater or equal 18176429Svs195195brn_10: 18186429Svs195195 fbuge,a %fcc0, br_good 18196429Svs195195 nop 18206429Svs195195 ba,a %ncc, br_error 18216429Svs195195 18226429Svs195195! branch less or equal 18236429Svs195195brn_11: 18246429Svs195195 fble,a %fcc0, br_good 18256429Svs195195 nop 18266429Svs195195 ba,a %ncc, br_error 18276429Svs195195 18286429Svs195195! branch unordered or less or equal 18296429Svs195195brn_12: 18306429Svs195195 fbule,a %fcc0, br_good 18316429Svs195195 nop 18326429Svs195195 ba,a %ncc, br_error 18336429Svs195195 18346429Svs195195! branch ordered 18356429Svs195195brn_13: 18366429Svs195195 fbo,a %fcc0, br_good 18376429Svs195195 nop 18386429Svs195195 ba,a %ncc, br_error 18396429Svs195195 18406429Svs195195! branch always 18416429Svs195195brn_14: 18426429Svs195195 fba,a %fcc0, br_good 18436429Svs195195 nop 18446429Svs195195 ba,a %ncc, br_error 18456429Svs195195 18466429Svs195195! branch never 18476429Svs195195brn_15: 18486429Svs195195 fbn,a %fcc0, br_error 18496429Svs195195 nop 18506429Svs195195 18516429Svs195195br_good: 18526429Svs195195 mov %g0, %i0 ! Branch worked as expected 18536429Svs195195 18546429Svs195195 ret 18556429Svs195195 restore 18566429Svs195195 18576429Svs195195br_error: 18586429Svs195195 mov 0xff, %i0 ! set the flag that it is error 18596429Svs195195 18606429Svs195195 ret 18616429Svs195195 restore 18626429Svs195195SET_SIZE(branches) 18636429Svs195195 1864*7186Skk158166#endif 18656429Svs195195 1866*7186Skk158166/* 1867*7186Skk158166 * void read_fpreg(pf, n) 1868*7186Skk158166 * FPU_REGS_TYPE *pf; Old freg value. 1869*7186Skk158166 * unsigned n; Want to read register n. 1870*7186Skk158166 * 1871*7186Skk158166 * { 1872*7186Skk158166 * *pf = %f[n]; 1873*7186Skk158166 * } 1874*7186Skk158166 */ 1875*7186Skk158166 1876*7186Skk158166 1877*7186Skk158166#ifdef __lint 1878*7186Skk158166 1879*7186Skk158166/*ARGSUSED*/ 1880*7186Skk158166void 1881*7186Skk158166read_fpreg(unsigned int *arg1, int arg2) 1882*7186Skk158166{ 1883*7186Skk158166} 1884*7186Skk158166 1885*7186Skk158166#else 18866429Svs195195 18876429Svs195195ENTRY_NP(read_fpreg) 18886429Svs195195 save %sp, -SA(MINFRAME), %sp 18896429Svs195195 mulx %i1, 12, %i1 ! Table entries are 12 bytes each. 18906429Svs195195 setn stable, %l1, %g1 ! g1 gets base of table. 18916429Svs195195 jmp %g1 + %i1 ! Jump into table 18926429Svs195195 nop ! Can't follow CTI by CTI. 18936429Svs195195 18946429Svs195195#define STOREFP(n) st %f/**/n, [%i0]; ret; restore 18956429Svs195195 18966429Svs195195stable: 18976429Svs195195 STOREFP(0) 18986429Svs195195 STOREFP(1) 18996429Svs195195 STOREFP(2) 19006429Svs195195 STOREFP(3) 19016429Svs195195 STOREFP(4) 19026429Svs195195 STOREFP(5) 19036429Svs195195 STOREFP(6) 19046429Svs195195 STOREFP(7) 19056429Svs195195 STOREFP(8) 19066429Svs195195 STOREFP(9) 19076429Svs195195 STOREFP(10) 19086429Svs195195 STOREFP(11) 19096429Svs195195 STOREFP(12) 19106429Svs195195 STOREFP(13) 19116429Svs195195 STOREFP(14) 19126429Svs195195 STOREFP(15) 19136429Svs195195 STOREFP(16) 19146429Svs195195 STOREFP(17) 19156429Svs195195 STOREFP(18) 19166429Svs195195 STOREFP(19) 19176429Svs195195 STOREFP(20) 19186429Svs195195 STOREFP(21) 19196429Svs195195 STOREFP(22) 19206429Svs195195 STOREFP(23) 19216429Svs195195 STOREFP(24) 19226429Svs195195 STOREFP(25) 19236429Svs195195 STOREFP(26) 19246429Svs195195 STOREFP(27) 19256429Svs195195 STOREFP(28) 19266429Svs195195 STOREFP(29) 19276429Svs195195 STOREFP(30) 19286429Svs195195 STOREFP(31) 19296429Svs195195SET_SIZE(read_fpreg) 19306429Svs195195 1931*7186Skk158166#endif 1932*7186Skk158166 1933*7186Skk158166#ifdef __lint 1934*7186Skk158166 1935*7186Skk158166/*ARGSUSED*/ 1936*7186Skk158166void 1937*7186Skk158166read_fpreg_dp(unsigned long *arg1, int arg2) 1938*7186Skk158166{ 1939*7186Skk158166 return; 1940*7186Skk158166} 1941*7186Skk158166 1942*7186Skk158166#else 19436429Svs195195 19446429Svs195195ENTRY_NP(read_fpreg_dp) 19456429Svs195195 save %sp, -SA(MINFRAME), %sp 19466429Svs195195 mulx %i1, 6, %i1 ! Table entries are 12 bytes each. 19476429Svs195195 ! But o1 will have even numbered 19486429Svs195195 ! index 19496429Svs195195 setn stable_dp, %l0, %g1 ! g1 gets base of table. 19506429Svs195195 jmp %g1 + %i1 ! Jump into table 19516429Svs195195 nop ! Can't follow CTI by CTI. 19526429Svs195195 19536429Svs195195#define STOREFP_DP(n) std %f/**/n, [%i0]; ret; restore 19546429Svs195195 19556429Svs195195stable_dp: 19566429Svs195195 STOREFP_DP(0) 19576429Svs195195 STOREFP_DP(2) 19586429Svs195195 STOREFP_DP(4) 19596429Svs195195 STOREFP_DP(6) 19606429Svs195195 STOREFP_DP(8) 19616429Svs195195 STOREFP_DP(10) 19626429Svs195195 STOREFP_DP(12) 19636429Svs195195 STOREFP_DP(14) 19646429Svs195195 STOREFP_DP(16) 19656429Svs195195 STOREFP_DP(18) 19666429Svs195195 STOREFP_DP(20) 19676429Svs195195 STOREFP_DP(22) 19686429Svs195195 STOREFP_DP(24) 19696429Svs195195 STOREFP_DP(26) 19706429Svs195195 STOREFP_DP(28) 19716429Svs195195 STOREFP_DP(30) 19726429Svs195195 STOREFP_DP(32) 19736429Svs195195 STOREFP_DP(34) 19746429Svs195195 STOREFP_DP(36) 19756429Svs195195 STOREFP_DP(38) 19766429Svs195195 STOREFP_DP(40) 19776429Svs195195 STOREFP_DP(42) 19786429Svs195195 STOREFP_DP(44) 19796429Svs195195 STOREFP_DP(46) 19806429Svs195195 STOREFP_DP(48) 19816429Svs195195 STOREFP_DP(50) 19826429Svs195195 STOREFP_DP(52) 19836429Svs195195 STOREFP_DP(54) 19846429Svs195195 STOREFP_DP(56) 19856429Svs195195 STOREFP_DP(58) 19866429Svs195195 STOREFP_DP(60) 19876429Svs195195 STOREFP_DP(62) 19886429Svs195195 19896429Svs195195SET_SIZE(read_fpreg_dp) 19906429Svs195195 1991*7186Skk158166#endif 1992*7186Skk158166 1993*7186Skk158166/* 1994*7186Skk158166 * void 1995*7186Skk158166 * write_fpreg(pf, n) 1996*7186Skk158166 * FPU_REGS_TYPE *pf; New freg value. 1997*7186Skk158166 * unsigned n; Want to read register n. 1998*7186Skk158166 * 1999*7186Skk158166 * { 2000*7186Skk158166 * %f[n] = *pf; 2001*7186Skk158166 * } 2002*7186Skk158166 */ 2003*7186Skk158166 2004*7186Skk158166#ifdef __lint 2005*7186Skk158166 2006*7186Skk158166#else 20076429Svs195195 20086429Svs195195ENTRY_NP(write_fpreg) 20096429Svs195195 sll %o1, 3, %o1 ! Table entries are 8 bytes each. 20106429Svs195195 setn ltable, %l0, %g1 ! g1 gets base of table. 20116429Svs195195 jmp %g1 + %o1 ! Jump into table 20126429Svs195195 nop ! Can't follow CTI by CTI. 20136429Svs195195 20146429Svs195195 20156429Svs195195#define LOADFP(n) jmp %o7+8 ; ld [%o0],%f/**/n 20166429Svs195195 20176429Svs195195ltable: 20186429Svs195195 LOADFP(0) 20196429Svs195195 LOADFP(1) 20206429Svs195195 LOADFP(2) 20216429Svs195195 LOADFP(3) 20226429Svs195195 LOADFP(4) 20236429Svs195195 LOADFP(5) 20246429Svs195195 LOADFP(6) 20256429Svs195195 LOADFP(7) 20266429Svs195195 LOADFP(8) 20276429Svs195195 LOADFP(9) 20286429Svs195195 LOADFP(10) 20296429Svs195195 LOADFP(11) 20306429Svs195195 LOADFP(12) 20316429Svs195195 LOADFP(13) 20326429Svs195195 LOADFP(14) 20336429Svs195195 LOADFP(15) 20346429Svs195195 LOADFP(16) 20356429Svs195195 LOADFP(17) 20366429Svs195195 LOADFP(18) 20376429Svs195195 LOADFP(19) 20386429Svs195195 LOADFP(20) 20396429Svs195195 LOADFP(21) 20406429Svs195195 LOADFP(22) 20416429Svs195195 LOADFP(23) 20426429Svs195195 LOADFP(24) 20436429Svs195195 LOADFP(25) 20446429Svs195195 LOADFP(26) 20456429Svs195195 LOADFP(27) 20466429Svs195195 LOADFP(28) 20476429Svs195195 LOADFP(29) 20486429Svs195195 LOADFP(30) 20496429Svs195195 LOADFP(31) 20506429Svs195195SET_SIZE(write_fpreg) 2051*7186Skk158166 2052*7186Skk158166#endif 2053