michael@0: ! michael@0: ! This Source Code Form is subject to the terms of the Mozilla Public michael@0: ! License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: ! file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: .file "montmulf.c" michael@0: michael@0: .section ".rodata",#alloc michael@0: .global TwoTo16 michael@0: .align 8 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .global TwoTo16 michael@0: TwoTo16: michael@0: .word 1089470464 michael@0: .word 0 michael@0: .type TwoTo16,#object michael@0: .size TwoTo16,8 michael@0: .global TwoToMinus16 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .global TwoToMinus16 michael@0: TwoToMinus16: michael@0: .word 1055916032 michael@0: .word 0 michael@0: .type TwoToMinus16,#object michael@0: .size TwoToMinus16,8 michael@0: .global Zero michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .global Zero michael@0: Zero: michael@0: .word 0 michael@0: .word 0 michael@0: .type Zero,#object michael@0: .size Zero,8 michael@0: .global TwoTo32 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .global TwoTo32 michael@0: TwoTo32: michael@0: .word 1106247680 michael@0: .word 0 michael@0: .type TwoTo32,#object michael@0: .size TwoTo32,8 michael@0: .global TwoToMinus32 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .global TwoToMinus32 michael@0: TwoToMinus32: michael@0: .word 1039138816 michael@0: .word 0 michael@0: .type TwoToMinus32,#object michael@0: .size TwoToMinus32,8 michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: /* 000000 0 */ .register %g3,#scratch michael@0: /* 000000 */ .register %g2,#scratch michael@0: /* 000000 0 */ .align 8 michael@0: ! michael@0: ! SUBROUTINE conv_d16_to_i32 michael@0: ! michael@0: ! OFFSET SOURCE LINE LABEL INSTRUCTION michael@0: michael@0: .global conv_d16_to_i32 michael@0: conv_d16_to_i32: michael@0: /* 000000 */ save %sp,-208,%sp michael@0: ! FILE montmulf.c michael@0: michael@0: ! 1 !/* michael@0: ! 2 ! * The contents of this file are subject to the Mozilla Public michael@0: ! 3 ! * License Version 1.1 (the "License"); you may not use this file michael@0: ! 4 ! * except in compliance with the License. You may obtain a copy of michael@0: ! 5 ! * the License at http://www.mozilla.org/MPL/ michael@0: ! 6 ! * michael@0: ! 7 ! * Software distributed under the License is distributed on an "AS michael@0: ! 8 ! * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or michael@0: ! 9 ! * implied. See the License for the specific language governing michael@0: ! 10 ! * rights and limitations under the License. michael@0: ! 11 ! * michael@0: ! 12 ! * The Original Code is SPARC optimized Montgomery multiply functions. michael@0: ! 13 ! * michael@0: ! 14 ! * The Initial Developer of the Original Code is Sun Microsystems Inc. michael@0: ! 15 ! * Portions created by Sun Microsystems Inc. are michael@0: ! 16 ! * Copyright (C) 1999-2000 Sun Microsystems Inc. All Rights Reserved. michael@0: ! 17 ! * michael@0: ! 18 ! * Contributor(s): michael@0: ! 19 ! * Netscape Communications Corporation michael@0: ! 20 ! * michael@0: ! 21 ! * Alternatively, the contents of this file may be used under the michael@0: ! 22 ! * terms of the GNU General Public License Version 2 or later (the michael@0: ! 23 ! * "GPL"), in which case the provisions of the GPL are applicable michael@0: ! 24 ! * instead of those above. If you wish to allow use of your michael@0: ! 25 ! * version of this file only under the terms of the GPL and not to michael@0: ! 26 ! * allow others to use your version of this file under the MPL, michael@0: ! 27 ! * indicate your decision by deleting the provisions above and michael@0: ! 28 ! * replace them with the notice and other provisions required by michael@0: ! 29 ! * the GPL. If you do not delete the provisions above, a recipient michael@0: ! 30 ! * may use your version of this file under either the MPL or the michael@0: ! 31 ! * GPL. michael@0: ! 34 ! */ michael@0: ! 36 !#define RF_INLINE_MACROS michael@0: ! 38 !static const double TwoTo16=65536.0; michael@0: ! 39 !static const double TwoToMinus16=1.0/65536.0; michael@0: ! 40 !static const double Zero=0.0; michael@0: ! 41 !static const double TwoTo32=65536.0*65536.0; michael@0: ! 42 !static const double TwoToMinus32=1.0/(65536.0*65536.0); michael@0: ! 44 !#ifdef RF_INLINE_MACROS michael@0: ! 46 !double upper32(double); michael@0: ! 47 !double lower32(double, double); michael@0: ! 48 !double mod(double, double, double); michael@0: ! 50 !void i16_to_d16_and_d32x4(const double * /*1/(2^16)*/, michael@0: ! 51 ! const double * /* 2^16*/, michael@0: ! 52 ! const double * /* 0 */, michael@0: ! 53 ! double * /*result16*/, michael@0: ! 54 ! double * /* result32 */, michael@0: ! 55 ! float * /*source - should be unsigned int* michael@0: ! 56 ! converted to float* */); michael@0: ! 58 !#else michael@0: ! 60 !static double upper32(double x) michael@0: ! 61 !{ michael@0: ! 62 ! return floor(x*TwoToMinus32); michael@0: ! 63 !} michael@0: ! 65 !static double lower32(double x, double y) michael@0: ! 66 !{ michael@0: ! 67 ! return x-TwoTo32*floor(x*TwoToMinus32); michael@0: ! 68 !} michael@0: ! 70 !static double mod(double x, double oneoverm, double m) michael@0: ! 71 !{ michael@0: ! 72 ! return x-m*floor(x*oneoverm); michael@0: ! 73 !} michael@0: ! 75 !#endif michael@0: ! 78 !static void cleanup(double *dt, int from, int tlen) michael@0: ! 79 !{ michael@0: ! 80 ! int i; michael@0: ! 81 ! double tmp,tmp1,x,x1; michael@0: ! 83 ! tmp=tmp1=Zero; michael@0: ! 84 ! /* original code ** michael@0: ! 85 ! for(i=2*from;i<2*tlen-2;i++) michael@0: ! 86 ! { michael@0: ! 87 ! x=dt[i]; michael@0: ! 88 ! dt[i]=lower32(x,Zero)+tmp1; michael@0: ! 89 ! tmp1=tmp; michael@0: ! 90 ! tmp=upper32(x); michael@0: ! 91 ! } michael@0: ! 92 ! dt[tlen-2]+=tmp1; michael@0: ! 93 ! dt[tlen-1]+=tmp; michael@0: ! 94 ! **end original code ***/ michael@0: ! 95 ! /* new code ***/ michael@0: ! 96 ! for(i=2*from;i<2*tlen;i+=2) michael@0: ! 97 ! { michael@0: ! 98 ! x=dt[i]; michael@0: ! 99 ! x1=dt[i+1]; michael@0: ! 100 ! dt[i]=lower32(x,Zero)+tmp; michael@0: ! 101 ! dt[i+1]=lower32(x1,Zero)+tmp1; michael@0: ! 102 ! tmp=upper32(x); michael@0: ! 103 ! tmp1=upper32(x1); michael@0: ! 104 ! } michael@0: ! 105 ! /** end new code **/ michael@0: ! 106 !} michael@0: ! 109 !void conv_d16_to_i32(unsigned int *i32, double *d16, long long *tmp, int ilen) michael@0: ! 110 !{ michael@0: ! 111 !int i; michael@0: ! 112 !long long t, t1, a, b, c, d; michael@0: ! 114 ! t1=0; michael@0: ! 115 ! a=(long long)d16[0]; michael@0: michael@0: /* 0x0004 115 */ ldd [%i1],%f2 michael@0: michael@0: ! 116 ! b=(long long)d16[1]; michael@0: ! 117 ! for(i=0; i>32); michael@0: ! 122 ! d=(long long)d16[2*i+3]; michael@0: ! 123 ! t1+=(b&0xffff)<<16; michael@0: michael@0: /* 0x0068 123 */ and %i2,%o5,%i4 michael@0: /* 0x006c */ sllx %i4,16,%o1 michael@0: /* 0x0070 117 */ cmp %g2,6 michael@0: /* 0x0074 */ bl,pn %icc,.L77000134 michael@0: /* 0x0078 */ or %g0,3,%i0 michael@0: /* 0x007c 119 */ ldd [%o4+16],%f0 michael@0: /* 0x0080 120 */ and %i3,%g3,%o3 michael@0: michael@0: ! 124 ! t+=(b>>16)+(t1>>32); michael@0: michael@0: /* 0x0084 124 */ srax %i2,16,%i5 michael@0: /* 0x0088 117 */ add %o3,%o1,%i4 michael@0: /* 0x008c 121 */ srax %i3,32,%i3 michael@0: /* 0x0090 119 */ fdtox %f0,%f0 michael@0: /* 0x0094 */ std %f0,[%sp+2231] michael@0: michael@0: ! 125 ! i32[i]=t1&0xffffffff; michael@0: michael@0: /* 0x0098 125 */ and %i4,%g3,%l0 michael@0: /* 0x009c 117 */ or %g0,72,%o3 michael@0: /* 0x00a0 122 */ ldd [%g4+24],%f0 michael@0: /* 0x00a4 117 */ or %g0,64,%o4 michael@0: /* 0x00a8 */ or %g0,4,%o1 michael@0: michael@0: ! 126 ! t1=t; michael@0: ! 127 ! a=c; michael@0: ! 128 ! b=d; michael@0: michael@0: /* 0x00ac 128 */ or %g0,5,%i0 michael@0: /* 0x00b0 */ or %g0,4,%i1 michael@0: /* 0x00b4 119 */ ldx [%sp+2231],%g2 michael@0: /* 0x00b8 122 */ fdtox %f0,%f0 michael@0: /* 0x00bc 128 */ or %g0,4,%o0 michael@0: /* 0x00c0 122 */ std %f0,[%sp+2223] michael@0: /* 0x00c4 */ ldd [%g4+40],%f2 michael@0: /* 0x00c8 120 */ and %g2,%g3,%i2 michael@0: /* 0x00cc 119 */ ldd [%g4+32],%f0 michael@0: /* 0x00d0 121 */ srax %g2,32,%g2 michael@0: /* 0x00d4 122 */ ldd [%g4+56],%f4 michael@0: /* 0x00d8 */ fdtox %f2,%f2 michael@0: /* 0x00dc */ ldx [%sp+2223],%g5 michael@0: /* 0x00e0 119 */ fdtox %f0,%f0 michael@0: /* 0x00e4 125 */ st %l0,[%g1] michael@0: /* 0x00e8 124 */ srax %i4,32,%l0 michael@0: /* 0x00ec 122 */ fdtox %f4,%f4 michael@0: /* 0x00f0 */ std %f2,[%sp+2223] michael@0: /* 0x00f4 123 */ and %g5,%o5,%i4 michael@0: /* 0x00f8 124 */ add %i5,%l0,%i5 michael@0: /* 0x00fc 119 */ std %f0,[%sp+2231] michael@0: /* 0x0100 123 */ sllx %i4,16,%i4 michael@0: /* 0x0104 124 */ add %i3,%i5,%i3 michael@0: /* 0x0108 119 */ ldd [%g4+48],%f2 michael@0: /* 0x010c 124 */ srax %g5,16,%g5 michael@0: /* 0x0110 117 */ add %i2,%i4,%i2 michael@0: /* 0x0114 122 */ ldd [%g4+72],%f0 michael@0: /* 0x0118 117 */ add %i2,%i3,%i4 michael@0: /* 0x011c 124 */ srax %i4,32,%i5 michael@0: /* 0x0120 119 */ fdtox %f2,%f2 michael@0: /* 0x0124 125 */ and %i4,%g3,%i4 michael@0: /* 0x0128 122 */ ldx [%sp+2223],%i2 michael@0: /* 0x012c 124 */ add %g5,%i5,%g5 michael@0: /* 0x0130 119 */ ldx [%sp+2231],%i3 michael@0: /* 0x0134 124 */ add %g2,%g5,%g5 michael@0: /* 0x0138 119 */ std %f2,[%sp+2231] michael@0: /* 0x013c 122 */ std %f4,[%sp+2223] michael@0: /* 0x0140 119 */ ldd [%g4+64],%f2 michael@0: /* 0x0144 125 */ st %i4,[%g1+4] michael@0: .L900000108: michael@0: /* 0x0148 122 */ ldx [%sp+2223],%i4 michael@0: /* 0x014c 128 */ add %o0,2,%o0 michael@0: /* 0x0150 */ add %i0,4,%i0 michael@0: /* 0x0154 119 */ ldx [%sp+2231],%l0 michael@0: /* 0x0158 117 */ add %o3,16,%o3 michael@0: /* 0x015c 123 */ and %i2,%o5,%g2 michael@0: /* 0x0160 */ sllx %g2,16,%i5 michael@0: /* 0x0164 120 */ and %i3,%g3,%g2 michael@0: /* 0x0168 122 */ ldd [%g4+%o3],%f4 michael@0: /* 0x016c */ fdtox %f0,%f0 michael@0: /* 0x0170 */ std %f0,[%sp+2223] michael@0: /* 0x0174 124 */ srax %i2,16,%i2 michael@0: /* 0x0178 117 */ add %g2,%i5,%g2 michael@0: /* 0x017c 119 */ fdtox %f2,%f0 michael@0: /* 0x0180 117 */ add %o4,16,%o4 michael@0: /* 0x0184 119 */ std %f0,[%sp+2231] michael@0: /* 0x0188 117 */ add %g2,%g5,%g2 michael@0: /* 0x018c 119 */ ldd [%g4+%o4],%f2 michael@0: /* 0x0190 124 */ srax %g2,32,%i5 michael@0: /* 0x0194 128 */ cmp %o0,%o2 michael@0: /* 0x0198 121 */ srax %i3,32,%g5 michael@0: /* 0x019c 124 */ add %i2,%i5,%i2 michael@0: /* 0x01a0 */ add %g5,%i2,%i5 michael@0: /* 0x01a4 117 */ add %o1,4,%o1 michael@0: /* 0x01a8 125 */ and %g2,%g3,%g2 michael@0: /* 0x01ac 127 */ or %g0,%l0,%g5 michael@0: /* 0x01b0 125 */ st %g2,[%g1+%o1] michael@0: /* 0x01b4 128 */ add %i1,4,%i1 michael@0: /* 0x01b8 122 */ ldx [%sp+2223],%i2 michael@0: /* 0x01bc 119 */ ldx [%sp+2231],%i3 michael@0: /* 0x01c0 117 */ add %o3,16,%o3 michael@0: /* 0x01c4 123 */ and %i4,%o5,%g2 michael@0: /* 0x01c8 */ sllx %g2,16,%l0 michael@0: /* 0x01cc 120 */ and %g5,%g3,%g2 michael@0: /* 0x01d0 122 */ ldd [%g4+%o3],%f0 michael@0: /* 0x01d4 */ fdtox %f4,%f4 michael@0: /* 0x01d8 */ std %f4,[%sp+2223] michael@0: /* 0x01dc 124 */ srax %i4,16,%i4 michael@0: /* 0x01e0 117 */ add %g2,%l0,%g2 michael@0: /* 0x01e4 119 */ fdtox %f2,%f2 michael@0: /* 0x01e8 117 */ add %o4,16,%o4 michael@0: /* 0x01ec 119 */ std %f2,[%sp+2231] michael@0: /* 0x01f0 117 */ add %g2,%i5,%g2 michael@0: /* 0x01f4 119 */ ldd [%g4+%o4],%f2 michael@0: /* 0x01f8 124 */ srax %g2,32,%i5 michael@0: /* 0x01fc 121 */ srax %g5,32,%g5 michael@0: /* 0x0200 124 */ add %i4,%i5,%i4 michael@0: /* 0x0204 */ add %g5,%i4,%g5 michael@0: /* 0x0208 117 */ add %o1,4,%o1 michael@0: /* 0x020c 125 */ and %g2,%g3,%g2 michael@0: /* 0x0210 128 */ ble,pt %icc,.L900000108 michael@0: /* 0x0214 */ st %g2,[%g1+%o1] michael@0: .L900000111: michael@0: /* 0x0218 122 */ ldx [%sp+2223],%o2 michael@0: /* 0x021c 123 */ and %i2,%o5,%i4 michael@0: /* 0x0220 120 */ and %i3,%g3,%g2 michael@0: /* 0x0224 123 */ sllx %i4,16,%i4 michael@0: /* 0x0228 119 */ ldx [%sp+2231],%i5 michael@0: /* 0x022c 128 */ cmp %o0,%o7 michael@0: /* 0x0230 124 */ srax %i2,16,%i2 michael@0: /* 0x0234 117 */ add %g2,%i4,%g2 michael@0: /* 0x0238 122 */ fdtox %f0,%f4 michael@0: /* 0x023c */ std %f4,[%sp+2223] michael@0: /* 0x0240 117 */ add %g2,%g5,%g5 michael@0: /* 0x0244 123 */ and %o2,%o5,%l0 michael@0: /* 0x0248 124 */ srax %g5,32,%l1 michael@0: /* 0x024c 120 */ and %i5,%g3,%i4 michael@0: /* 0x0250 119 */ fdtox %f2,%f0 michael@0: /* 0x0254 121 */ srax %i3,32,%g2 michael@0: /* 0x0258 119 */ std %f0,[%sp+2231] michael@0: /* 0x025c 124 */ add %i2,%l1,%i2 michael@0: /* 0x0260 123 */ sllx %l0,16,%i3 michael@0: /* 0x0264 124 */ add %g2,%i2,%i2 michael@0: /* 0x0268 */ srax %o2,16,%o2 michael@0: /* 0x026c 117 */ add %o1,4,%g2 michael@0: /* 0x0270 */ add %i4,%i3,%o1 michael@0: /* 0x0274 125 */ and %g5,%g3,%g5 michael@0: /* 0x0278 */ st %g5,[%g1+%g2] michael@0: /* 0x027c 119 */ ldx [%sp+2231],%i3 michael@0: /* 0x0280 117 */ add %o1,%i2,%o1 michael@0: /* 0x0284 */ add %g2,4,%g2 michael@0: /* 0x0288 124 */ srax %o1,32,%i4 michael@0: /* 0x028c 122 */ ldx [%sp+2223],%i2 michael@0: /* 0x0290 125 */ and %o1,%g3,%g5 michael@0: /* 0x0294 121 */ srax %i5,32,%o1 michael@0: /* 0x0298 124 */ add %o2,%i4,%o2 michael@0: /* 0x029c 125 */ st %g5,[%g1+%g2] michael@0: /* 0x02a0 128 */ bg,pn %icc,.L77000127 michael@0: /* 0x02a4 */ add %o1,%o2,%g5 michael@0: /* 0x02a8 */ add %i0,6,%i0 michael@0: /* 0x02ac */ add %i1,6,%i1 michael@0: .L77000134: michael@0: /* 0x02b0 119 */ sra %i1,0,%o2 michael@0: .L900000112: michael@0: /* 0x02b4 119 */ sllx %o2,3,%o3 michael@0: /* 0x02b8 120 */ and %i3,%g3,%o1 michael@0: /* 0x02bc 119 */ ldd [%g4+%o3],%f0 michael@0: /* 0x02c0 122 */ sra %i0,0,%o3 michael@0: /* 0x02c4 123 */ and %i2,%o5,%o2 michael@0: /* 0x02c8 122 */ sllx %o3,3,%o3 michael@0: /* 0x02cc 120 */ add %g5,%o1,%o1 michael@0: /* 0x02d0 119 */ fdtox %f0,%f0 michael@0: /* 0x02d4 */ std %f0,[%sp+2231] michael@0: /* 0x02d8 123 */ sllx %o2,16,%o2 michael@0: /* 0x02dc */ add %o1,%o2,%o2 michael@0: /* 0x02e0 128 */ add %i1,2,%i1 michael@0: /* 0x02e4 122 */ ldd [%g4+%o3],%f0 michael@0: /* 0x02e8 124 */ srax %o2,32,%g2 michael@0: /* 0x02ec 125 */ and %o2,%g3,%o3 michael@0: /* 0x02f0 124 */ srax %i2,16,%o1 michael@0: /* 0x02f4 128 */ add %i0,2,%i0 michael@0: /* 0x02f8 122 */ fdtox %f0,%f0 michael@0: /* 0x02fc */ std %f0,[%sp+2223] michael@0: /* 0x0300 125 */ sra %o0,0,%o2 michael@0: /* 0x0304 */ sllx %o2,2,%o2 michael@0: /* 0x0308 124 */ add %o1,%g2,%g5 michael@0: /* 0x030c 121 */ srax %i3,32,%g2 michael@0: /* 0x0310 128 */ add %o0,1,%o0 michael@0: /* 0x0314 124 */ add %g2,%g5,%g5 michael@0: /* 0x0318 128 */ cmp %o0,%o7 michael@0: /* 0x031c 119 */ ldx [%sp+2231],%o4 michael@0: /* 0x0320 122 */ ldx [%sp+2223],%i2 michael@0: /* 0x0324 125 */ st %o3,[%g1+%o2] michael@0: /* 0x0328 127 */ or %g0,%o4,%i3 michael@0: /* 0x032c 128 */ ble,pt %icc,.L900000112 michael@0: /* 0x0330 */ sra %i1,0,%o2 michael@0: .L77000127: michael@0: michael@0: ! 129 ! } michael@0: ! 130 ! t1+=a&0xffffffff; michael@0: ! 131 ! t=(a>>32); michael@0: ! 132 ! t1+=(b&0xffff)<<16; michael@0: ! 133 ! i32[i]=t1&0xffffffff; michael@0: michael@0: /* 0x0334 133 */ sethi %hi(0xfc00),%g2 michael@0: .L900000113: michael@0: /* 0x0338 133 */ or %g0,-1,%g3 michael@0: /* 0x033c */ add %g2,1023,%g2 michael@0: /* 0x0340 */ srl %g3,0,%g3 michael@0: /* 0x0344 */ and %i2,%g2,%g2 michael@0: /* 0x0348 */ and %i3,%g3,%g4 michael@0: /* 0x034c */ sllx %g2,16,%g2 michael@0: /* 0x0350 */ add %g5,%g4,%g4 michael@0: /* 0x0354 */ sra %o0,0,%g5 michael@0: /* 0x0358 */ add %g4,%g2,%g4 michael@0: /* 0x035c */ sllx %g5,2,%g2 michael@0: /* 0x0360 */ and %g4,%g3,%g3 michael@0: /* 0x0364 */ st %g3,[%g1+%g2] michael@0: /* 0x0368 */ ret ! Result = michael@0: /* 0x036c */ restore %g0,%g0,%g0 michael@0: /* 0x0370 0 */ .type conv_d16_to_i32,2 michael@0: /* 0x0370 */ .size conv_d16_to_i32,(.-conv_d16_to_i32) michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: /* 000000 0 */ .align 8 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .L_const_seg_900000201: michael@0: /* 000000 0 */ .word 1127219200,0 michael@0: /* 0x0008 0 */ .align 8 michael@0: /* 0x0008 */ .skip 24 michael@0: ! michael@0: ! SUBROUTINE conv_i32_to_d32 michael@0: ! michael@0: ! OFFSET SOURCE LINE LABEL INSTRUCTION michael@0: michael@0: .global conv_i32_to_d32 michael@0: conv_i32_to_d32: michael@0: /* 000000 */ or %g0,%o7,%g3 michael@0: michael@0: ! 135 !} michael@0: ! 137 !void conv_i32_to_d32(double *d32, unsigned int *i32, int len) michael@0: ! 138 !{ michael@0: ! 139 !int i; michael@0: ! 141 !#pragma pipeloop(0) michael@0: ! 142 ! for(i=0;i>16); michael@0: michael@0: /* 0x001c 156 */ sethi %hi(.L_const_seg_900000301),%g2 michael@0: /* 0x0020 147 */ or %g0,%i2,%o1 michael@0: /* 0x0024 152 */ sethi %hi(0xfc00),%g3 michael@0: /* 0x0028 156 */ add %g2,%lo(.L_const_seg_900000301),%g2 michael@0: /* 0x002c 152 */ or %g0,%o1,%g4 michael@0: /* 0x0030 156 */ ldx [%o0+%g2],%o5 michael@0: /* 0x0034 152 */ add %g3,1023,%g1 michael@0: /* 0x0038 147 */ or %g0,%i1,%o7 michael@0: /* 0x003c 152 */ or %g0,0,%i2 michael@0: /* 0x0040 */ sub %o1,1,%g5 michael@0: /* 0x0044 */ or %g0,0,%g3 michael@0: /* 0x0048 */ or %g0,1,%g2 michael@0: /* 0x004c 154 */ or %g0,0,%o2 michael@0: /* 0x0050 */ cmp %g4,6 michael@0: /* 0x0054 152 */ bl,pn %icc,.L77000154 michael@0: /* 0x0058 */ ldd [%o5],%f0 michael@0: /* 0x005c */ sub %o1,2,%o3 michael@0: /* 0x0060 */ or %g0,16,%o2 michael@0: /* 0x0064 154 */ ld [%i1],%o4 michael@0: /* 0x0068 156 */ or %g0,3,%g2 michael@0: /* 0x006c */ or %g0,2,%g3 michael@0: /* 0x0070 155 */ fmovs %f0,%f2 michael@0: /* 0x0074 156 */ or %g0,4,%i2 michael@0: /* 0x0078 155 */ and %o4,%g1,%o0 michael@0: /* 0x007c */ st %o0,[%sp+2227] michael@0: /* 0x0080 */ fmovs %f0,%f4 michael@0: /* 0x0084 156 */ srl %o4,16,%i4 michael@0: /* 0x0088 152 */ or %g0,12,%o4 michael@0: /* 0x008c */ or %g0,24,%o0 michael@0: /* 0x0090 155 */ ld [%sp+2227],%f3 michael@0: /* 0x0094 */ fsubd %f2,%f0,%f2 michael@0: /* 0x0098 */ std %f2,[%i0] michael@0: /* 0x009c 156 */ st %i4,[%sp+2223] michael@0: /* 0x00a0 154 */ ld [%o7+4],%o1 michael@0: /* 0x00a4 156 */ fmovs %f0,%f2 michael@0: /* 0x00a8 155 */ and %o1,%g1,%i1 michael@0: /* 0x00ac 156 */ ld [%sp+2223],%f3 michael@0: /* 0x00b0 */ srl %o1,16,%o1 michael@0: /* 0x00b4 */ fsubd %f2,%f0,%f2 michael@0: /* 0x00b8 */ std %f2,[%i0+8] michael@0: /* 0x00bc */ st %o1,[%sp+2223] michael@0: /* 0x00c0 155 */ st %i1,[%sp+2227] michael@0: /* 0x00c4 154 */ ld [%o7+8],%o1 michael@0: /* 0x00c8 156 */ fmovs %f0,%f2 michael@0: /* 0x00cc 155 */ and %o1,%g1,%g4 michael@0: /* 0x00d0 */ ld [%sp+2227],%f5 michael@0: /* 0x00d4 156 */ srl %o1,16,%o1 michael@0: /* 0x00d8 */ ld [%sp+2223],%f3 michael@0: /* 0x00dc */ st %o1,[%sp+2223] michael@0: /* 0x00e0 155 */ fsubd %f4,%f0,%f4 michael@0: /* 0x00e4 */ st %g4,[%sp+2227] michael@0: /* 0x00e8 156 */ fsubd %f2,%f0,%f2 michael@0: /* 0x00ec 154 */ ld [%o7+12],%o1 michael@0: /* 0x00f0 155 */ std %f4,[%i0+16] michael@0: /* 0x00f4 156 */ std %f2,[%i0+24] michael@0: .L900000306: michael@0: /* 0x00f8 155 */ ld [%sp+2227],%f5 michael@0: /* 0x00fc 156 */ add %i2,2,%i2 michael@0: /* 0x0100 */ add %g2,4,%g2 michael@0: /* 0x0104 */ ld [%sp+2223],%f3 michael@0: /* 0x0108 */ cmp %i2,%o3 michael@0: /* 0x010c */ add %g3,4,%g3 michael@0: /* 0x0110 155 */ and %o1,%g1,%g4 michael@0: /* 0x0114 156 */ srl %o1,16,%o1 michael@0: /* 0x0118 155 */ st %g4,[%sp+2227] michael@0: /* 0x011c 156 */ st %o1,[%sp+2223] michael@0: /* 0x0120 152 */ add %o4,4,%o1 michael@0: /* 0x0124 154 */ ld [%o7+%o1],%o4 michael@0: /* 0x0128 156 */ fmovs %f0,%f2 michael@0: /* 0x012c 155 */ fmovs %f0,%f4 michael@0: /* 0x0130 */ fsubd %f4,%f0,%f4 michael@0: /* 0x0134 152 */ add %o2,16,%o2 michael@0: /* 0x0138 156 */ fsubd %f2,%f0,%f2 michael@0: /* 0x013c 155 */ std %f4,[%i0+%o2] michael@0: /* 0x0140 152 */ add %o0,16,%o0 michael@0: /* 0x0144 156 */ std %f2,[%i0+%o0] michael@0: /* 0x0148 155 */ ld [%sp+2227],%f5 michael@0: /* 0x014c 156 */ ld [%sp+2223],%f3 michael@0: /* 0x0150 155 */ and %o4,%g1,%g4 michael@0: /* 0x0154 156 */ srl %o4,16,%o4 michael@0: /* 0x0158 155 */ st %g4,[%sp+2227] michael@0: /* 0x015c 156 */ st %o4,[%sp+2223] michael@0: /* 0x0160 152 */ add %o1,4,%o4 michael@0: /* 0x0164 154 */ ld [%o7+%o4],%o1 michael@0: /* 0x0168 156 */ fmovs %f0,%f2 michael@0: /* 0x016c 155 */ fmovs %f0,%f4 michael@0: /* 0x0170 */ fsubd %f4,%f0,%f4 michael@0: /* 0x0174 152 */ add %o2,16,%o2 michael@0: /* 0x0178 156 */ fsubd %f2,%f0,%f2 michael@0: /* 0x017c 155 */ std %f4,[%i0+%o2] michael@0: /* 0x0180 152 */ add %o0,16,%o0 michael@0: /* 0x0184 156 */ ble,pt %icc,.L900000306 michael@0: /* 0x0188 */ std %f2,[%i0+%o0] michael@0: .L900000309: michael@0: /* 0x018c 155 */ ld [%sp+2227],%f5 michael@0: /* 0x0190 156 */ fmovs %f0,%f2 michael@0: /* 0x0194 */ srl %o1,16,%o3 michael@0: /* 0x0198 */ ld [%sp+2223],%f3 michael@0: /* 0x019c 155 */ and %o1,%g1,%i1 michael@0: /* 0x01a0 152 */ add %o2,16,%g4 michael@0: /* 0x01a4 155 */ fmovs %f0,%f4 michael@0: /* 0x01a8 */ st %i1,[%sp+2227] michael@0: /* 0x01ac 152 */ add %o0,16,%o2 michael@0: /* 0x01b0 156 */ st %o3,[%sp+2223] michael@0: /* 0x01b4 154 */ sra %i2,0,%o3 michael@0: /* 0x01b8 152 */ add %g4,16,%o1 michael@0: /* 0x01bc 155 */ fsubd %f4,%f0,%f4 michael@0: /* 0x01c0 */ std %f4,[%i0+%g4] michael@0: /* 0x01c4 152 */ add %o0,32,%o0 michael@0: /* 0x01c8 156 */ fsubd %f2,%f0,%f2 michael@0: /* 0x01cc */ std %f2,[%i0+%o2] michael@0: /* 0x01d0 */ sllx %o3,2,%o2 michael@0: /* 0x01d4 155 */ ld [%sp+2227],%f5 michael@0: /* 0x01d8 156 */ cmp %i2,%g5 michael@0: /* 0x01dc */ add %g2,6,%g2 michael@0: /* 0x01e0 */ ld [%sp+2223],%f3 michael@0: /* 0x01e4 */ add %g3,6,%g3 michael@0: /* 0x01e8 155 */ fmovs %f0,%f4 michael@0: /* 0x01ec 156 */ fmovs %f0,%f2 michael@0: /* 0x01f0 155 */ fsubd %f4,%f0,%f4 michael@0: /* 0x01f4 */ std %f4,[%i0+%o1] michael@0: /* 0x01f8 156 */ fsubd %f2,%f0,%f0 michael@0: /* 0x01fc */ bg,pn %icc,.L77000150 michael@0: /* 0x0200 */ std %f0,[%i0+%o0] michael@0: .L77000154: michael@0: /* 0x0204 155 */ ldd [%o5],%f0 michael@0: .L900000311: michael@0: /* 0x0208 154 */ ld [%o7+%o2],%o0 michael@0: /* 0x020c 155 */ sra %g3,0,%o1 michael@0: /* 0x0210 */ fmovs %f0,%f2 michael@0: /* 0x0214 */ sllx %o1,3,%o2 michael@0: /* 0x0218 156 */ add %i2,1,%i2 michael@0: /* 0x021c 155 */ and %o0,%g1,%o1 michael@0: /* 0x0220 */ st %o1,[%sp+2227] michael@0: /* 0x0224 156 */ add %g3,2,%g3 michael@0: /* 0x0228 */ srl %o0,16,%o1 michael@0: /* 0x022c */ cmp %i2,%g5 michael@0: /* 0x0230 */ sra %g2,0,%o0 michael@0: /* 0x0234 */ add %g2,2,%g2 michael@0: /* 0x0238 */ sllx %o0,3,%o0 michael@0: /* 0x023c 155 */ ld [%sp+2227],%f3 michael@0: /* 0x0240 154 */ sra %i2,0,%o3 michael@0: /* 0x0244 155 */ fsubd %f2,%f0,%f2 michael@0: /* 0x0248 */ std %f2,[%i0+%o2] michael@0: /* 0x024c */ sllx %o3,2,%o2 michael@0: /* 0x0250 156 */ st %o1,[%sp+2223] michael@0: /* 0x0254 */ fmovs %f0,%f2 michael@0: /* 0x0258 */ ld [%sp+2223],%f3 michael@0: /* 0x025c */ fsubd %f2,%f0,%f0 michael@0: /* 0x0260 */ std %f0,[%i0+%o0] michael@0: /* 0x0264 */ ble,a,pt %icc,.L900000311 michael@0: /* 0x0268 */ ldd [%o5],%f0 michael@0: .L77000150: michael@0: /* 0x026c */ ret ! Result = michael@0: /* 0x0270 */ restore %g0,%g0,%g0 michael@0: /* 0x0274 0 */ .type conv_i32_to_d16,2 michael@0: /* 0x0274 */ .size conv_i32_to_d16,(.-conv_i32_to_d16) michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: /* 000000 0 */ .align 8 michael@0: ! michael@0: ! CONSTANT POOL michael@0: ! michael@0: .L_const_seg_900000401: michael@0: /* 000000 0 */ .word 1127219200,0 michael@0: /* 0x0008 0 */ .align 8 michael@0: /* 0x0008 */ .skip 24 michael@0: ! michael@0: ! SUBROUTINE conv_i32_to_d32_and_d16 michael@0: ! michael@0: ! OFFSET SOURCE LINE LABEL INSTRUCTION michael@0: michael@0: .global conv_i32_to_d32_and_d16 michael@0: conv_i32_to_d32_and_d16: michael@0: /* 000000 */ save %sp,-192,%sp michael@0: .L900000415: michael@0: /* 0x0004 */ call .+8 michael@0: /* 0x0008 */ sethi /*X*/%hi(_GLOBAL_OFFSET_TABLE_-(.L900000415-.)),%g3 michael@0: michael@0: ! 157 ! } michael@0: ! 158 !} michael@0: ! 161 !void conv_i32_to_d32_and_d16(double *d32, double *d16, michael@0: ! 162 ! unsigned int *i32, int len) michael@0: ! 163 !{ michael@0: ! 164 !int i = 0; michael@0: ! 165 !unsigned int a; michael@0: ! 167 !#pragma pipeloop(0) michael@0: ! 168 !#ifdef RF_INLINE_MACROS michael@0: ! 169 ! for(;i>16); michael@0: michael@0: /* 0x0158 180 */ sethi %hi(.L_const_seg_900000401),%g2 michael@0: /* 0x015c */ add %g2,%lo(.L_const_seg_900000401),%g2 michael@0: /* 0x0160 175 */ sethi %hi(0xfc00),%g3 michael@0: /* 0x0164 180 */ ldx [%o3+%g2],%g1 michael@0: /* 0x0168 175 */ sll %i2,1,%i4 michael@0: /* 0x016c */ sub %g5,%i2,%g4 michael@0: /* 0x0170 177 */ sra %i2,0,%o3 michael@0: /* 0x0174 175 */ add %g3,1023,%g3 michael@0: /* 0x0178 178 */ ldd [%g1],%f2 michael@0: /* 0x017c */ sllx %o3,2,%o2 michael@0: /* 0x0180 175 */ add %i4,1,%g2 michael@0: /* 0x0184 177 */ or %g0,%o3,%o1 michael@0: /* 0x0188 */ cmp %g4,6 michael@0: /* 0x018c 175 */ bl,pn %icc,.L77000161 michael@0: /* 0x0190 */ sra %i2,0,%o3 michael@0: /* 0x0194 177 */ or %g0,%o2,%o0 michael@0: /* 0x0198 178 */ ld [%i0+%o2],%f5 michael@0: /* 0x019c 179 */ fmovs %f2,%f8 michael@0: /* 0x01a0 175 */ add %o0,4,%o3 michael@0: /* 0x01a4 177 */ ld [%i0+%o0],%o7 michael@0: /* 0x01a8 180 */ fmovs %f2,%f6 michael@0: /* 0x01ac 178 */ fmovs %f2,%f4 michael@0: /* 0x01b0 */ sllx %o1,3,%o2 michael@0: /* 0x01b4 175 */ add %o3,4,%o5 michael@0: /* 0x01b8 179 */ sra %i4,0,%o0 michael@0: /* 0x01bc 175 */ add %o3,8,%o4 michael@0: /* 0x01c0 178 */ fsubd %f4,%f2,%f4 michael@0: /* 0x01c4 */ std %f4,[%i3+%o2] michael@0: /* 0x01c8 179 */ sllx %o0,3,%i5 michael@0: /* 0x01cc */ and %o7,%g3,%o0 michael@0: /* 0x01d0 */ st %o0,[%sp+2227] michael@0: /* 0x01d4 175 */ add %i5,16,%o1 michael@0: /* 0x01d8 180 */ srl %o7,16,%g4 michael@0: /* 0x01dc */ add %i2,1,%i2 michael@0: /* 0x01e0 */ sra %g2,0,%o0 michael@0: /* 0x01e4 175 */ add %o2,8,%o2 michael@0: /* 0x01e8 179 */ fmovs %f2,%f4 michael@0: /* 0x01ec 180 */ sllx %o0,3,%l0 michael@0: /* 0x01f0 */ add %i4,3,%g2 michael@0: /* 0x01f4 179 */ ld [%sp+2227],%f5 michael@0: /* 0x01f8 175 */ add %l0,16,%o0 michael@0: /* 0x01fc 180 */ add %i4,2,%i4 michael@0: /* 0x0200 175 */ sub %g5,1,%o7 michael@0: /* 0x0204 180 */ add %i2,3,%i2 michael@0: /* 0x0208 179 */ fsubd %f4,%f2,%f4 michael@0: /* 0x020c */ std %f4,[%i1+%i5] michael@0: /* 0x0210 180 */ st %g4,[%sp+2223] michael@0: /* 0x0214 177 */ ld [%i0+%o3],%i5 michael@0: /* 0x0218 180 */ fmovs %f2,%f4 michael@0: /* 0x021c */ srl %i5,16,%g4 michael@0: /* 0x0220 179 */ and %i5,%g3,%i5 michael@0: /* 0x0224 180 */ ld [%sp+2223],%f5 michael@0: /* 0x0228 */ fsubd %f4,%f2,%f4 michael@0: /* 0x022c */ std %f4,[%i1+%l0] michael@0: /* 0x0230 */ st %g4,[%sp+2223] michael@0: /* 0x0234 177 */ ld [%i0+%o5],%g4 michael@0: /* 0x0238 179 */ st %i5,[%sp+2227] michael@0: /* 0x023c 178 */ fmovs %f2,%f4 michael@0: /* 0x0240 180 */ srl %g4,16,%i5 michael@0: /* 0x0244 179 */ and %g4,%g3,%g4 michael@0: /* 0x0248 180 */ ld [%sp+2223],%f7 michael@0: /* 0x024c */ st %i5,[%sp+2223] michael@0: /* 0x0250 178 */ ld [%i0+%o3],%f5 michael@0: /* 0x0254 180 */ fsubd %f6,%f2,%f6 michael@0: /* 0x0258 177 */ ld [%i0+%o4],%o3 michael@0: /* 0x025c 178 */ fsubd %f4,%f2,%f4 michael@0: /* 0x0260 179 */ ld [%sp+2227],%f9 michael@0: /* 0x0264 180 */ ld [%sp+2223],%f1 michael@0: /* 0x0268 179 */ st %g4,[%sp+2227] michael@0: /* 0x026c */ fsubd %f8,%f2,%f8 michael@0: /* 0x0270 */ std %f8,[%i1+%o1] michael@0: /* 0x0274 180 */ std %f6,[%i1+%o0] michael@0: /* 0x0278 178 */ std %f4,[%i3+%o2] michael@0: .L900000411: michael@0: /* 0x027c 179 */ ld [%sp+2227],%f13 michael@0: /* 0x0280 180 */ srl %o3,16,%g4 michael@0: /* 0x0284 */ add %i2,2,%i2 michael@0: /* 0x0288 */ st %g4,[%sp+2223] michael@0: /* 0x028c */ cmp %i2,%o7 michael@0: /* 0x0290 */ add %g2,4,%g2 michael@0: /* 0x0294 178 */ ld [%i0+%o5],%f11 michael@0: /* 0x0298 180 */ add %i4,4,%i4 michael@0: /* 0x029c 175 */ add %o4,4,%o5 michael@0: /* 0x02a0 177 */ ld [%i0+%o5],%g4 michael@0: /* 0x02a4 179 */ and %o3,%g3,%o3 michael@0: /* 0x02a8 */ st %o3,[%sp+2227] michael@0: /* 0x02ac 180 */ fmovs %f2,%f0 michael@0: /* 0x02b0 179 */ fmovs %f2,%f12 michael@0: /* 0x02b4 180 */ fsubd %f0,%f2,%f8 michael@0: /* 0x02b8 179 */ fsubd %f12,%f2,%f4 michael@0: /* 0x02bc 175 */ add %o1,16,%o1 michael@0: /* 0x02c0 180 */ ld [%sp+2223],%f7 michael@0: /* 0x02c4 178 */ fmovs %f2,%f10 michael@0: /* 0x02c8 179 */ std %f4,[%i1+%o1] michael@0: /* 0x02cc 175 */ add %o0,16,%o0 michael@0: /* 0x02d0 178 */ fsubd %f10,%f2,%f4 michael@0: /* 0x02d4 175 */ add %o2,8,%o2 michael@0: /* 0x02d8 180 */ std %f8,[%i1+%o0] michael@0: /* 0x02dc 178 */ std %f4,[%i3+%o2] michael@0: /* 0x02e0 179 */ ld [%sp+2227],%f9 michael@0: /* 0x02e4 180 */ srl %g4,16,%o3 michael@0: /* 0x02e8 */ st %o3,[%sp+2223] michael@0: /* 0x02ec 178 */ ld [%i0+%o4],%f5 michael@0: /* 0x02f0 175 */ add %o4,8,%o4 michael@0: /* 0x02f4 177 */ ld [%i0+%o4],%o3 michael@0: /* 0x02f8 179 */ and %g4,%g3,%g4 michael@0: /* 0x02fc */ st %g4,[%sp+2227] michael@0: /* 0x0300 180 */ fmovs %f2,%f6 michael@0: /* 0x0304 179 */ fmovs %f2,%f8 michael@0: /* 0x0308 180 */ fsubd %f6,%f2,%f6 michael@0: /* 0x030c 179 */ fsubd %f8,%f2,%f8 michael@0: /* 0x0310 175 */ add %o1,16,%o1 michael@0: /* 0x0314 180 */ ld [%sp+2223],%f1 michael@0: /* 0x0318 178 */ fmovs %f2,%f4 michael@0: /* 0x031c 179 */ std %f8,[%i1+%o1] michael@0: /* 0x0320 175 */ add %o0,16,%o0 michael@0: /* 0x0324 178 */ fsubd %f4,%f2,%f4 michael@0: /* 0x0328 175 */ add %o2,8,%o2 michael@0: /* 0x032c 180 */ std %f6,[%i1+%o0] michael@0: /* 0x0330 */ bl,pt %icc,.L900000411 michael@0: /* 0x0334 */ std %f4,[%i3+%o2] michael@0: .L900000414: michael@0: /* 0x0338 180 */ srl %o3,16,%o7 michael@0: /* 0x033c */ st %o7,[%sp+2223] michael@0: /* 0x0340 179 */ fmovs %f2,%f12 michael@0: /* 0x0344 178 */ ld [%i0+%o5],%f11 michael@0: /* 0x0348 180 */ fmovs %f2,%f0 michael@0: /* 0x034c 179 */ and %o3,%g3,%g4 michael@0: /* 0x0350 180 */ fmovs %f2,%f6 michael@0: /* 0x0354 175 */ add %o1,16,%o3 michael@0: /* 0x0358 */ add %o0,16,%o7 michael@0: /* 0x035c 178 */ fmovs %f2,%f10 michael@0: /* 0x0360 175 */ add %o2,8,%o2 michael@0: /* 0x0364 */ add %o1,32,%o5 michael@0: /* 0x0368 179 */ ld [%sp+2227],%f13 michael@0: /* 0x036c 178 */ fmovs %f2,%f4 michael@0: /* 0x0370 175 */ add %o0,32,%o1 michael@0: /* 0x0374 180 */ ld [%sp+2223],%f7 michael@0: /* 0x0378 175 */ add %o2,8,%o0 michael@0: /* 0x037c 180 */ cmp %i2,%g5 michael@0: /* 0x0380 179 */ st %g4,[%sp+2227] michael@0: /* 0x0384 */ fsubd %f12,%f2,%f8 michael@0: /* 0x0388 180 */ add %g2,6,%g2 michael@0: /* 0x038c 179 */ std %f8,[%i1+%o3] michael@0: /* 0x0390 180 */ fsubd %f0,%f2,%f0 michael@0: /* 0x0394 177 */ sra %i2,0,%o3 michael@0: /* 0x0398 180 */ std %f0,[%i1+%o7] michael@0: /* 0x039c 178 */ fsubd %f10,%f2,%f0 michael@0: /* 0x03a0 180 */ add %i4,6,%i4 michael@0: /* 0x03a4 178 */ std %f0,[%i3+%o2] michael@0: /* 0x03a8 */ sllx %o3,2,%o2 michael@0: /* 0x03ac 179 */ ld [%sp+2227],%f9 michael@0: /* 0x03b0 178 */ ld [%i0+%o4],%f5 michael@0: /* 0x03b4 179 */ fmovs %f2,%f8 michael@0: /* 0x03b8 */ fsubd %f8,%f2,%f0 michael@0: /* 0x03bc */ std %f0,[%i1+%o5] michael@0: /* 0x03c0 180 */ fsubd %f6,%f2,%f0 michael@0: /* 0x03c4 */ std %f0,[%i1+%o1] michael@0: /* 0x03c8 178 */ fsubd %f4,%f2,%f0 michael@0: /* 0x03cc 180 */ bge,pn %icc,.L77000164 michael@0: /* 0x03d0 */ std %f0,[%i3+%o0] michael@0: .L77000161: michael@0: /* 0x03d4 178 */ ldd [%g1],%f2 michael@0: .L900000416: michael@0: /* 0x03d8 178 */ ld [%i0+%o2],%f5 michael@0: /* 0x03dc 179 */ sra %i4,0,%o0 michael@0: /* 0x03e0 180 */ add %i2,1,%i2 michael@0: /* 0x03e4 177 */ ld [%i0+%o2],%o1 michael@0: /* 0x03e8 178 */ sllx %o3,3,%o3 michael@0: /* 0x03ec 180 */ add %i4,2,%i4 michael@0: /* 0x03f0 178 */ fmovs %f2,%f4 michael@0: /* 0x03f4 179 */ sllx %o0,3,%o4 michael@0: /* 0x03f8 180 */ cmp %i2,%g5 michael@0: /* 0x03fc 179 */ and %o1,%g3,%o0 michael@0: /* 0x0400 178 */ fsubd %f4,%f2,%f0 michael@0: /* 0x0404 */ std %f0,[%i3+%o3] michael@0: /* 0x0408 180 */ srl %o1,16,%o1 michael@0: /* 0x040c 179 */ st %o0,[%sp+2227] michael@0: /* 0x0410 180 */ sra %g2,0,%o0 michael@0: /* 0x0414 */ add %g2,2,%g2 michael@0: /* 0x0418 177 */ sra %i2,0,%o3 michael@0: /* 0x041c 180 */ sllx %o0,3,%o0 michael@0: /* 0x0420 179 */ fmovs %f2,%f4 michael@0: /* 0x0424 */ sllx %o3,2,%o2 michael@0: /* 0x0428 */ ld [%sp+2227],%f5 michael@0: /* 0x042c */ fsubd %f4,%f2,%f0 michael@0: /* 0x0430 */ std %f0,[%i1+%o4] michael@0: /* 0x0434 180 */ st %o1,[%sp+2223] michael@0: /* 0x0438 */ fmovs %f2,%f4 michael@0: /* 0x043c */ ld [%sp+2223],%f5 michael@0: /* 0x0440 */ fsubd %f4,%f2,%f0 michael@0: /* 0x0444 */ std %f0,[%i1+%o0] michael@0: /* 0x0448 */ bl,a,pt %icc,.L900000416 michael@0: /* 0x044c */ ldd [%g1],%f2 michael@0: .L77000164: michael@0: /* 0x0450 */ ret ! Result = michael@0: /* 0x0454 */ restore %g0,%g0,%g0 michael@0: /* 0x0458 0 */ .type conv_i32_to_d32_and_d16,2 michael@0: /* 0x0458 */ .size conv_i32_to_d32_and_d16,(.-conv_i32_to_d32_and_d16) michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: /* 000000 0 */ .align 8 michael@0: ! michael@0: ! SUBROUTINE adjust_montf_result michael@0: ! michael@0: ! OFFSET SOURCE LINE LABEL INSTRUCTION michael@0: michael@0: .global adjust_montf_result michael@0: adjust_montf_result: michael@0: /* 000000 */ save %sp,-176,%sp michael@0: /* 0x0004 */ or %g0,%i2,%o1 michael@0: /* 0x0008 */ or %g0,%i0,%i2 michael@0: michael@0: ! 181 ! } michael@0: ! 182 !} michael@0: ! 185 !void adjust_montf_result(unsigned int *i32, unsigned int *nint, int len) michael@0: ! 186 !{ michael@0: ! 187 !long long acc; michael@0: ! 188 !int i; michael@0: ! 190 ! if(i32[len]>0) i=-1; michael@0: michael@0: /* 0x000c 190 */ sra %o1,0,%g2 michael@0: /* 0x0010 */ or %g0,-1,%o2 michael@0: /* 0x0014 */ sllx %g2,2,%g2 michael@0: /* 0x0018 */ ld [%i2+%g2],%g2 michael@0: /* 0x001c */ cmp %g2,0 michael@0: /* 0x0020 */ bleu,pn %icc,.L77000175 michael@0: /* 0x0024 */ or %g0,%i1,%i0 michael@0: /* 0x0028 */ ba .L900000511 michael@0: /* 0x002c */ cmp %o2,0 michael@0: .L77000175: michael@0: michael@0: ! 191 ! else michael@0: ! 192 ! { michael@0: ! 193 ! for(i=len-1; i>=0; i--) michael@0: michael@0: /* 0x0030 193 */ sub %o1,1,%o2 michael@0: /* 0x0034 */ cmp %o2,0 michael@0: /* 0x0038 */ bl,pn %icc,.L77000182 michael@0: /* 0x003c */ sra %o2,0,%g2 michael@0: .L900000510: michael@0: michael@0: ! 194 ! { michael@0: ! 195 ! if(i32[i]!=nint[i]) break; michael@0: michael@0: /* 0x0040 195 */ sllx %g2,2,%g2 michael@0: /* 0x0044 */ sub %o2,1,%o0 michael@0: /* 0x0048 */ ld [%i1+%g2],%g3 michael@0: /* 0x004c */ ld [%i2+%g2],%g2 michael@0: /* 0x0050 */ cmp %g2,%g3 michael@0: /* 0x0054 */ bne,pn %icc,.L77000182 michael@0: /* 0x0058 */ nop michael@0: /* 0x005c 0 */ or %g0,%o0,%o2 michael@0: /* 0x0060 195 */ cmp %o0,0 michael@0: /* 0x0064 */ bge,pt %icc,.L900000510 michael@0: /* 0x0068 */ sra %o2,0,%g2 michael@0: .L77000182: michael@0: michael@0: ! 196 ! } michael@0: ! 197 ! } michael@0: ! 198 ! if((i<0)||(i32[i]>nint[i])) michael@0: michael@0: /* 0x006c 198 */ cmp %o2,0 michael@0: .L900000511: michael@0: /* 0x0070 198 */ bl,pn %icc,.L77000198 michael@0: /* 0x0074 */ sra %o2,0,%g2 michael@0: /* 0x0078 */ sllx %g2,2,%g2 michael@0: /* 0x007c */ ld [%i1+%g2],%g3 michael@0: /* 0x0080 */ ld [%i2+%g2],%g2 michael@0: /* 0x0084 */ cmp %g2,%g3 michael@0: /* 0x0088 */ bleu,pt %icc,.L77000191 michael@0: /* 0x008c */ nop michael@0: .L77000198: michael@0: michael@0: ! 199 ! { michael@0: ! 200 ! acc=0; michael@0: ! 201 ! for(i=0;i>32; michael@0: michael@0: /* 0x00c8 205 */ or %g0,5,%i1 michael@0: /* 0x00cc 203 */ ld [%i0],%o2 michael@0: /* 0x00d0 201 */ or %g0,8,%o5 michael@0: /* 0x00d4 */ or %g0,12,%o4 michael@0: /* 0x00d8 203 */ ld [%i0+4],%o3 michael@0: /* 0x00dc 201 */ or %g0,16,%g1 michael@0: /* 0x00e0 203 */ ld [%i2+4],%o0 michael@0: /* 0x00e4 201 */ sub %o1,%o2,%o1 michael@0: /* 0x00e8 203 */ ld [%i0+8],%i3 michael@0: /* 0x00ec 204 */ and %o1,%g2,%g5 michael@0: /* 0x00f0 */ st %g5,[%i2] michael@0: /* 0x00f4 205 */ srax %o1,32,%g5 michael@0: /* 0x00f8 201 */ sub %o0,%o3,%o0 michael@0: /* 0x00fc 203 */ ld [%i0+12],%o2 michael@0: /* 0x0100 201 */ add %o0,%g5,%o0 michael@0: /* 0x0104 204 */ and %o0,%g2,%g5 michael@0: /* 0x0108 */ st %g5,[%i2+4] michael@0: /* 0x010c 205 */ srax %o0,32,%o0 michael@0: /* 0x0110 203 */ ld [%i2+8],%o1 michael@0: /* 0x0114 */ ld [%i2+12],%o3 michael@0: /* 0x0118 201 */ sub %o1,%i3,%o1 michael@0: .L900000505: michael@0: /* 0x011c */ add %g1,4,%g3 michael@0: /* 0x0120 203 */ ld [%g1+%i2],%g5 michael@0: /* 0x0124 201 */ add %o1,%o0,%o0 michael@0: /* 0x0128 203 */ ld [%i0+%g1],%i3 michael@0: /* 0x012c 201 */ sub %o3,%o2,%o1 michael@0: /* 0x0130 204 */ and %o0,%g2,%o2 michael@0: /* 0x0134 */ st %o2,[%o5+%i2] michael@0: /* 0x0138 205 */ srax %o0,32,%o2 michael@0: /* 0x013c */ add %i1,4,%i1 michael@0: /* 0x0140 201 */ add %g1,8,%o5 michael@0: /* 0x0144 203 */ ld [%g3+%i2],%o0 michael@0: /* 0x0148 201 */ add %o1,%o2,%o1 michael@0: /* 0x014c 203 */ ld [%i0+%g3],%o3 michael@0: /* 0x0150 201 */ sub %g5,%i3,%o2 michael@0: /* 0x0154 204 */ and %o1,%g2,%g5 michael@0: /* 0x0158 */ st %g5,[%o4+%i2] michael@0: /* 0x015c 205 */ srax %o1,32,%g5 michael@0: /* 0x0160 */ cmp %i1,%o7 michael@0: /* 0x0164 201 */ add %g1,12,%o4 michael@0: /* 0x0168 203 */ ld [%o5+%i2],%o1 michael@0: /* 0x016c 201 */ add %o2,%g5,%o2 michael@0: /* 0x0170 203 */ ld [%i0+%o5],%i3 michael@0: /* 0x0174 201 */ sub %o0,%o3,%o0 michael@0: /* 0x0178 204 */ and %o2,%g2,%o3 michael@0: /* 0x017c */ st %o3,[%g1+%i2] michael@0: /* 0x0180 205 */ srax %o2,32,%g5 michael@0: /* 0x0184 203 */ ld [%o4+%i2],%o3 michael@0: /* 0x0188 201 */ add %g1,16,%g1 michael@0: /* 0x018c */ add %o0,%g5,%o0 michael@0: /* 0x0190 203 */ ld [%i0+%o4],%o2 michael@0: /* 0x0194 201 */ sub %o1,%i3,%o1 michael@0: /* 0x0198 204 */ and %o0,%g2,%g5 michael@0: /* 0x019c */ st %g5,[%g3+%i2] michael@0: /* 0x01a0 205 */ ble,pt %icc,.L900000505 michael@0: /* 0x01a4 */ srax %o0,32,%o0 michael@0: .L900000508: michael@0: /* 0x01a8 */ add %o1,%o0,%g3 michael@0: /* 0x01ac */ sub %o3,%o2,%o1 michael@0: /* 0x01b0 203 */ ld [%g1+%i2],%o0 michael@0: /* 0x01b4 */ ld [%i0+%g1],%o2 michael@0: /* 0x01b8 205 */ srax %g3,32,%o7 michael@0: /* 0x01bc 204 */ and %g3,%g2,%o3 michael@0: /* 0x01c0 201 */ add %o1,%o7,%o1 michael@0: /* 0x01c4 204 */ st %o3,[%o5+%i2] michael@0: /* 0x01c8 205 */ cmp %i1,%g4 michael@0: /* 0x01cc 201 */ sub %o0,%o2,%o0 michael@0: /* 0x01d0 204 */ and %o1,%g2,%o2 michael@0: /* 0x01d4 */ st %o2,[%o4+%i2] michael@0: /* 0x01d8 205 */ srax %o1,32,%o1 michael@0: /* 0x01dc 203 */ sra %i1,0,%o2 michael@0: /* 0x01e0 201 */ add %o0,%o1,%o0 michael@0: /* 0x01e4 205 */ srax %o0,32,%g5 michael@0: /* 0x01e8 204 */ and %o0,%g2,%o1 michael@0: /* 0x01ec */ st %o1,[%g1+%i2] michael@0: /* 0x01f0 205 */ bg,pn %icc,.L77000191 michael@0: /* 0x01f4 */ sllx %o2,2,%o1 michael@0: .L77000199: michael@0: /* 0x01f8 0 */ or %g0,%o1,%g1 michael@0: .L900000509: michael@0: /* 0x01fc 203 */ ld [%o1+%i2],%o0 michael@0: /* 0x0200 205 */ add %i1,1,%i1 michael@0: /* 0x0204 203 */ ld [%i0+%o1],%o1 michael@0: /* 0x0208 */ sra %i1,0,%o2 michael@0: /* 0x020c 205 */ cmp %i1,%g4 michael@0: /* 0x0210 203 */ add %g5,%o0,%o0 michael@0: /* 0x0214 */ sub %o0,%o1,%o0 michael@0: /* 0x0218 205 */ srax %o0,32,%g5 michael@0: /* 0x021c 204 */ and %o0,%g2,%o1 michael@0: /* 0x0220 */ st %o1,[%g1+%i2] michael@0: /* 0x0224 */ sllx %o2,2,%o1 michael@0: /* 0x0228 205 */ ble,pt %icc,.L900000509 michael@0: /* 0x022c */ or %g0,%o1,%g1 michael@0: .L77000191: michael@0: /* 0x0230 */ ret ! Result = michael@0: /* 0x0234 */ restore %g0,%g0,%g0 michael@0: /* 0x0238 0 */ .type adjust_montf_result,2 michael@0: /* 0x0238 */ .size adjust_montf_result,(.-adjust_montf_result) michael@0: michael@0: .section ".text",#alloc,#execinstr michael@0: /* 000000 0 */ .align 8 michael@0: /* 000000 */ .skip 24 michael@0: ! michael@0: ! SUBROUTINE mont_mulf_noconv michael@0: ! michael@0: ! OFFSET SOURCE LINE LABEL INSTRUCTION michael@0: michael@0: .global mont_mulf_noconv michael@0: mont_mulf_noconv: michael@0: /* 000000 */ save %sp,-224,%sp michael@0: .L900000643: michael@0: /* 0x0004 */ call .+8 michael@0: /* 0x0008 */ sethi /*X*/%hi(_GLOBAL_OFFSET_TABLE_-(.L900000643-.)),%g5 michael@0: /* 0x000c */ ldx [%fp+2223],%l0 michael@0: michael@0: ! 206 ! } michael@0: ! 207 ! } michael@0: ! 208 !} michael@0: ! 213 !/* michael@0: ! 214 !** the lengths of the input arrays should be at least the following: michael@0: ! 215 !** result[nlen+1], dm1[nlen], dm2[2*nlen+1], dt[4*nlen+2], dn[nlen], nint[nlen] michael@0: ! 216 !** all of them should be different from one another michael@0: ! 217 !** michael@0: ! 218 !*/ michael@0: ! 219 !void mont_mulf_noconv(unsigned int *result, michael@0: ! 220 ! double *dm1, double *dm2, double *dt, michael@0: ! 221 ! double *dn, unsigned int *nint, michael@0: ! 222 ! int nlen, double dn0) michael@0: ! 223 !{ michael@0: ! 224 ! int i, j, jj; michael@0: ! 225 ! int tmp; michael@0: ! 226 ! double digit, m2j, nextm2j, a, b; michael@0: ! 227 ! double *dptmp, *pdm1, *pdm2, *pdn, *pdtj, pdn_0, pdm1_0; michael@0: ! 229 ! pdm1=&(dm1[0]); michael@0: ! 230 ! pdm2=&(dm2[0]); michael@0: ! 231 ! pdn=&(dn[0]); michael@0: ! 232 ! pdm2[2*nlen]=Zero; michael@0: michael@0: /* 0x0010 232 */ sethi %hi(Zero),%g2 michael@0: /* 0x0014 223 */ fmovd %f14,%f30 michael@0: /* 0x0018 */ add %g5,/*X*/%lo(_GLOBAL_OFFSET_TABLE_-(.L900000643-.)),%g5 michael@0: /* 0x001c 232 */ add %g2,%lo(Zero),%g2 michael@0: /* 0x0020 */ sll %l0,1,%o3 michael@0: /* 0x0024 223 */ add %g5,%o7,%o4 michael@0: /* 0x0028 232 */ sra %o3,0,%g5 michael@0: /* 0x002c */ ldx [%o4+%g2],%o7 michael@0: michael@0: ! 234 ! if (nlen!=16) michael@0: ! 235 ! { michael@0: ! 236 ! for(i=0;i<4*nlen+2;i++) dt[i]=Zero; michael@0: ! 238 ! a=dt[0]=pdm1[0]*pdm2[0]; michael@0: ! 239 ! digit=mod(lower32(a,Zero)*dn0,TwoToMinus16,TwoTo16); michael@0: michael@0: /* 0x0030 239 */ sethi %hi(TwoToMinus16),%g3 michael@0: /* 0x0034 */ sethi %hi(TwoTo16),%g4 michael@0: /* 0x0038 */ add %g3,%lo(TwoToMinus16),%g2 michael@0: /* 0x003c 232 */ ldd [%o7],%f0 michael@0: /* 0x0040 239 */ add %g4,%lo(TwoTo16),%g3 michael@0: /* 0x0044 223 */ or %g0,%i4,%o0 michael@0: /* 0x0048 232 */ sllx %g5,3,%g4 michael@0: /* 0x004c 239 */ ldx [%o4+%g2],%o5 michael@0: /* 0x0050 223 */ or %g0,%i5,%l3 michael@0: /* 0x0054 */ or %g0,%i0,%l2 michael@0: /* 0x0058 239 */ ldx [%o4+%g3],%o4 michael@0: /* 0x005c 234 */ cmp %l0,16 michael@0: /* 0x0060 232 */ std %f0,[%i2+%g4] michael@0: /* 0x0064 234 */ be,pn %icc,.L77000279 michael@0: /* 0x0068 */ or %g0,%i3,%l4 michael@0: /* 0x006c 236 */ sll %l0,2,%g2 michael@0: /* 0x0070 223 */ or %g0,%o0,%i5 michael@0: /* 0x0074 236 */ add %g2,2,%o0 michael@0: /* 0x0078 223 */ or %g0,%i1,%i4 michael@0: /* 0x007c 236 */ cmp %o0,0 michael@0: /* 0x0080 223 */ or %g0,%i2,%l1 michael@0: /* 0x0084 236 */ ble,a,pt %icc,.L900000657 michael@0: /* 0x0088 */ ldd [%i1],%f6 michael@0: michael@0: ! 241 ! pdtj=&(dt[0]); michael@0: ! 242 ! for(j=jj=0;j<2*nlen;j++,jj++,pdtj++) michael@0: ! 243 ! { michael@0: ! 244 ! m2j=pdm2[j]; michael@0: ! 245 ! a=pdtj[0]+pdn[0]*digit; michael@0: ! 246 ! b=pdtj[1]+pdm1[0]*pdm2[j+1]+a*TwoToMinus16; michael@0: ! 247 ! pdtj[1]=b; michael@0: ! 249 !#pragma pipeloop(0) michael@0: ! 250 ! for(i=1;i