! ! This Source Code Form is subject to the terms of the Mozilla Public ! License, v. 2.0. If a copy of the MPL was not distributed with this ! file, You can obtain one at http://mozilla.org/MPL/2.0/. .section ".text",#alloc,#execinstr .file "montmulf.c" .section ".rodata",#alloc .global TwoTo16 .align 8 ! ! CONSTANT POOL ! .global TwoTo16 TwoTo16: .word 1089470464 .word 0 .type TwoTo16,#object .size TwoTo16,8 .global TwoToMinus16 ! ! CONSTANT POOL ! .global TwoToMinus16 TwoToMinus16: .word 1055916032 .word 0 .type TwoToMinus16,#object .size TwoToMinus16,8 .global Zero ! ! CONSTANT POOL ! .global Zero Zero: .word 0 .word 0 .type Zero,#object .size Zero,8 .global TwoTo32 ! ! CONSTANT POOL ! .global TwoTo32 TwoTo32: .word 1106247680 .word 0 .type TwoTo32,#object .size TwoTo32,8 .global TwoToMinus32 ! ! CONSTANT POOL ! .global TwoToMinus32 TwoToMinus32: .word 1039138816 .word 0 .type TwoToMinus32,#object .size TwoToMinus32,8 .section ".text",#alloc,#execinstr /* 000000 0 */ .align 4 ! ! SUBROUTINE conv_d16_to_i32 ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global conv_d16_to_i32 conv_d16_to_i32: /* 000000 */ save %sp,-128,%sp ! FILE montmulf.c ! 36 !#define RF_INLINE_MACROS ! 38 !static const double TwoTo16=65536.0; ! 39 !static const double TwoToMinus16=1.0/65536.0; ! 40 !static const double Zero=0.0; ! 41 !static const double TwoTo32=65536.0*65536.0; ! 42 !static const double TwoToMinus32=1.0/(65536.0*65536.0); ! 44 !#ifdef RF_INLINE_MACROS ! 46 !double upper32(double); ! 47 !double lower32(double, double); ! 48 !double mod(double, double, double); ! 50 !void i16_to_d16_and_d32x4(const double * /*1/(2^16)*/, ! 51 ! const double * /* 2^16*/, ! 52 ! const double * /* 0 */, ! 53 ! double * /*result16*/, ! 54 ! double * /* result32 */, ! 55 ! float * /*source - should be unsigned int* ! 56 ! converted to float* */); ! 58 !#else ! 60 !static double upper32(double x) ! 61 !{ ! 62 ! return floor(x*TwoToMinus32); ! 63 !} ! 65 !static double lower32(double x, double y) ! 66 !{ ! 67 ! return x-TwoTo32*floor(x*TwoToMinus32); ! 68 !} ! 70 !static double mod(double x, double oneoverm, double m) ! 71 !{ ! 72 ! return x-m*floor(x*oneoverm); ! 73 !} ! 75 !#endif ! 78 !static void cleanup(double *dt, int from, int tlen) ! 79 !{ ! 80 ! int i; ! 81 ! double tmp,tmp1,x,x1; ! 83 ! tmp=tmp1=Zero; ! 84 ! /* original code ** ! 85 ! for(i=2*from;i<2*tlen-2;i++) ! 86 ! { ! 87 ! x=dt[i]; ! 88 ! dt[i]=lower32(x,Zero)+tmp1; ! 89 ! tmp1=tmp; ! 90 ! tmp=upper32(x); ! 91 ! } ! 92 ! dt[tlen-2]+=tmp1; ! 93 ! dt[tlen-1]+=tmp; ! 94 ! **end original code ***/ ! 95 ! /* new code ***/ ! 96 ! for(i=2*from;i<2*tlen;i+=2) ! 97 ! { ! 98 ! x=dt[i]; ! 99 ! x1=dt[i+1]; ! 100 ! dt[i]=lower32(x,Zero)+tmp; ! 101 ! dt[i+1]=lower32(x1,Zero)+tmp1; ! 102 ! tmp=upper32(x); ! 103 ! tmp1=upper32(x1); ! 104 ! } ! 105 ! /** end new code **/ ! 106 !} ! 109 !void conv_d16_to_i32(unsigned int *i32, double *d16, long long *tmp, int ilen) ! 110 !{ ! 111 !int i; ! 112 !long long t, t1, a, b, c, d; ! 114 ! t1=0; ! 115 ! a=(long long)d16[0]; /* 0x0004 115 */ ldd [%i1],%f0 /* 0x0008 110 */ or %g0,%i1,%o0 ! 116 ! b=(long long)d16[1]; ! 117 ! for(i=0; i>32); ! 122 ! d=(long long)d16[2*i+3]; ! 123 ! t1+=(b&0xffff)<<16; ! 124 ! t+=(b>>16)+(t1>>32); ! 125 ! i32[i]=t1&0xffffffff; ! 126 ! t1=t; ! 127 ! a=c; ! 128 ! b=d; /* 0x0070 128 */ add %o0,16,%g2 /* 0x0074 123 */ and %g1,%o1,%o0 /* 0x0078 */ sllx %o0,16,%g3 /* 0x007c 120 */ and %g4,%o3,%o0 /* 0x0080 117 */ add %o0,%g3,%o4 /* 0x0084 119 */ fdtox %f0,%f0 /* 0x0088 */ std %f0,[%sp+104] /* 0x008c 125 */ and %o4,%o3,%g5 /* 0x0090 122 */ ldd [%g2+8],%f2 /* 0x0094 128 */ add %o5,4,%o5 /* 0x0098 124 */ srax %o4,32,%o4 /* 0x009c */ stx %o4,[%sp+112] /* 0x00a0 122 */ fdtox %f2,%f0 /* 0x00a4 */ std %f0,[%sp+96] /* 0x00a8 124 */ srax %g1,16,%o0 /* 0x00ac */ ldx [%sp+112],%o7 /* 0x00b0 121 */ srax %g4,32,%o4 /* 0x00b4 124 */ add %o0,%o7,%g4 /* 0x00b8 128 */ or %g0,1,%o7 /* 0x00bc 119 */ ldx [%sp+104],%g3 /* 0x00c0 124 */ add %o4,%g4,%o4 /* 0x00c4 122 */ ldx [%sp+96],%g1 /* 0x00c8 125 */ st %g5,[%o5-4] /* 0x00cc 127 */ or %g0,%g3,%g4 .L900000112: /* 0x00d0 119 */ ldd [%g2+16],%f0 /* 0x00d4 128 */ add %o7,1,%o7 /* 0x00d8 */ add %o5,4,%o5 /* 0x00dc */ cmp %o7,%o2 /* 0x00e0 */ add %g2,16,%g2 /* 0x00e4 119 */ fdtox %f0,%f0 /* 0x00e8 */ std %f0,[%sp+104] /* 0x00ec 122 */ ldd [%g2+8],%f0 /* 0x00f0 */ fdtox %f0,%f0 /* 0x00f4 */ std %f0,[%sp+96] /* 0x00f8 123 */ and %g1,%o1,%g3 /* 0x00fc */ sllx %g3,16,%g5 /* 0x0100 120 */ and %g4,%o3,%g3 /* 0x0104 117 */ add %g3,%g5,%g3 /* 0x0108 124 */ srax %g1,16,%g1 /* 0x010c 117 */ add %g3,%o4,%g3 /* 0x0110 124 */ srax %g3,32,%o4 /* 0x0114 */ stx %o4,[%sp+112] /* 0x0118 119 */ ldx [%sp+104],%g5 /* 0x011c 121 */ srax %g4,32,%o4 /* 0x0120 124 */ ldx [%sp+112],%g4 /* 0x0124 */ add %g1,%g4,%g4 /* 0x0128 122 */ ldx [%sp+96],%g1 /* 0x012c 124 */ add %o4,%g4,%o4 /* 0x0130 125 */ and %g3,%o3,%g3 /* 0x0134 127 */ or %g0,%g5,%g4 /* 0x0138 128 */ ble,pt %icc,.L900000112 /* 0x013c */ st %g3,[%o5-4] .L900000115: /* 0x0140 128 */ ba .L900000117 /* 0x0144 */ sethi %hi(0xfc00),%g2 .L77000134: /* 0x0148 119 */ ldd [%g2+16],%f0 .L900000116: /* 0x014c 120 */ and %g4,%o3,%o0 /* 0x0150 123 */ and %g1,%o1,%g3 /* 0x0154 119 */ fdtox %f0,%f0 /* 0x0158 120 */ add %o4,%o0,%o0 /* 0x015c 119 */ std %f0,[%sp+104] /* 0x0160 128 */ add %o7,1,%o7 /* 0x0164 123 */ sllx %g3,16,%o4 /* 0x0168 122 */ ldd [%g2+24],%f2 /* 0x016c 128 */ add %g2,16,%g2 /* 0x0170 123 */ add %o0,%o4,%o0 /* 0x0174 128 */ cmp %o7,%o2 /* 0x0178 125 */ and %o0,%o3,%g3 /* 0x017c 122 */ fdtox %f2,%f0 /* 0x0180 */ std %f0,[%sp+96] /* 0x0184 124 */ srax %o0,32,%o0 /* 0x0188 */ stx %o0,[%sp+112] /* 0x018c 121 */ srax %g4,32,%o4 /* 0x0190 122 */ ldx [%sp+96],%o0 /* 0x0194 124 */ srax %g1,16,%g5 /* 0x0198 */ ldx [%sp+112],%g4 /* 0x019c 119 */ ldx [%sp+104],%g1 /* 0x01a0 125 */ st %g3,[%o5] /* 0x01a4 124 */ add %g5,%g4,%g4 /* 0x01a8 128 */ add %o5,4,%o5 /* 0x01ac 124 */ add %o4,%g4,%o4 /* 0x01b0 127 */ or %g0,%g1,%g4 /* 0x01b4 128 */ or %g0,%o0,%g1 /* 0x01b8 */ ble,a,pt %icc,.L900000116 /* 0x01bc */ ldd [%g2+16],%f0 .L77000127: ! 129 ! } ! 130 ! t1+=a&0xffffffff; ! 131 ! t=(a>>32); ! 132 ! t1+=(b&0xffff)<<16; ! 133 ! i32[i]=t1&0xffffffff; /* 0x01c0 133 */ sethi %hi(0xfc00),%g2 .L900000117: /* 0x01c4 133 */ or %g0,-1,%g3 /* 0x01c8 */ add %g2,1023,%g2 /* 0x01cc */ srl %g3,0,%g3 /* 0x01d0 */ and %g1,%g2,%g2 /* 0x01d4 */ and %g4,%g3,%g4 /* 0x01d8 */ sllx %g2,16,%g2 /* 0x01dc */ add %o4,%g4,%g4 /* 0x01e0 */ add %g4,%g2,%g2 /* 0x01e4 */ sll %o7,2,%g4 /* 0x01e8 */ and %g2,%g3,%g2 /* 0x01ec */ st %g2,[%i0+%g4] /* 0x01f0 */ ret ! Result = /* 0x01f4 */ restore %g0,%g0,%g0 /* 0x01f8 0 */ .type conv_d16_to_i32,2 /* 0x01f8 */ .size conv_d16_to_i32,(.-conv_d16_to_i32) .section ".text",#alloc,#execinstr /* 000000 0 */ .align 8 ! ! CONSTANT POOL ! .L_const_seg_900000201: /* 000000 0 */ .word 1127219200,0 /* 0x0008 0 */ .align 4 /* 0x0008 */ .skip 16 ! ! SUBROUTINE conv_i32_to_d32 ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global conv_i32_to_d32 conv_i32_to_d32: /* 000000 */ or %g0,%o7,%g2 ! 135 !} ! 137 !void conv_i32_to_d32(double *d32, unsigned int *i32, int len) ! 138 !{ ! 139 !int i; ! 141 !#pragma pipeloop(0) ! 142 ! for(i=0;i>16); /* 0x0008 156 */ sethi %hi(.L_const_seg_900000301),%g2 .L900000310: /* 0x000c */ call .+8 /* 0x0010 */ sethi /*X*/%hi(_GLOBAL_OFFSET_TABLE_-(.L900000310-.)),%g3 /* 0x0014 152 */ cmp %o0,0 /* 0x0018 147 */ add %g3,/*X*/%lo(_GLOBAL_OFFSET_TABLE_-(.L900000310-.)),%g3 /* 0x001c 152 */ ble,pt %icc,.L77000150 /* 0x0020 */ add %g3,%o7,%o2 /* 0x0024 */ sub %i2,1,%o5 /* 0x0028 156 */ add %g2,%lo(.L_const_seg_900000301),%o1 /* 0x002c 152 */ sethi %hi(0xfc00),%o0 /* 0x0030 */ ld [%o2+%o1],%o3 /* 0x0034 */ add %o5,1,%g2 /* 0x0038 */ or %g0,0,%g1 /* 0x003c */ cmp %g2,3 /* 0x0040 */ or %g0,%i1,%o7 /* 0x0044 */ add %o0,1023,%o4 /* 0x0048 */ or %g0,%i0,%g3 /* 0x004c */ bl,pn %icc,.L77000154 /* 0x0050 */ add %o7,4,%o0 /* 0x0054 155 */ ldd [%o3],%f0 /* 0x0058 156 */ or %g0,1,%g1 /* 0x005c 154 */ ld [%o0-4],%o1 /* 0x0060 0 */ or %g0,%o0,%o7 /* 0x0064 155 */ and %o1,%o4,%o0 .L900000306: /* 0x0068 155 */ st %o0,[%sp+96] /* 0x006c 156 */ add %g1,1,%g1 /* 0x0070 */ add %g3,16,%g3 /* 0x0074 */ cmp %g1,%o5 /* 0x0078 */ add %o7,4,%o7 /* 0x007c 155 */ ld [%sp+96],%f3 /* 0x0080 */ fmovs %f0,%f2 /* 0x0084 */ fsubd %f2,%f0,%f2 /* 0x0088 156 */ srl %o1,16,%o0 /* 0x008c 155 */ std %f2,[%g3-16] /* 0x0090 156 */ st %o0,[%sp+92] /* 0x0094 */ ld [%sp+92],%f3 /* 0x0098 154 */ ld [%o7-4],%o1 /* 0x009c 156 */ fmovs %f0,%f2 /* 0x00a0 */ fsubd %f2,%f0,%f2 /* 0x00a4 155 */ and %o1,%o4,%o0 /* 0x00a8 156 */ ble,pt %icc,.L900000306 /* 0x00ac */ std %f2,[%g3-8] .L900000309: /* 0x00b0 155 */ st %o0,[%sp+96] /* 0x00b4 */ fmovs %f0,%f2 /* 0x00b8 156 */ add %g3,16,%g3 /* 0x00bc */ srl %o1,16,%o0 /* 0x00c0 155 */ ld [%sp+96],%f3 /* 0x00c4 */ fsubd %f2,%f0,%f2 /* 0x00c8 */ std %f2,[%g3-16] /* 0x00cc 156 */ st %o0,[%sp+92] /* 0x00d0 */ fmovs %f0,%f2 /* 0x00d4 */ ld [%sp+92],%f3 /* 0x00d8 */ fsubd %f2,%f0,%f0 /* 0x00dc */ std %f0,[%g3-8] /* 0x00e0 */ ret ! Result = /* 0x00e4 */ restore %g0,%g0,%g0 .L77000154: /* 0x00e8 154 */ ld [%o7],%o0 .L900000311: /* 0x00ec 155 */ and %o0,%o4,%o1 /* 0x00f0 */ st %o1,[%sp+96] /* 0x00f4 156 */ add %g1,1,%g1 /* 0x00f8 155 */ ldd [%o3],%f0 /* 0x00fc 156 */ srl %o0,16,%o0 /* 0x0100 */ add %o7,4,%o7 /* 0x0104 */ cmp %g1,%o5 /* 0x0108 155 */ fmovs %f0,%f2 /* 0x010c */ ld [%sp+96],%f3 /* 0x0110 */ fsubd %f2,%f0,%f2 /* 0x0114 */ std %f2,[%g3] /* 0x0118 156 */ st %o0,[%sp+92] /* 0x011c */ fmovs %f0,%f2 /* 0x0120 */ ld [%sp+92],%f3 /* 0x0124 */ fsubd %f2,%f0,%f0 /* 0x0128 */ std %f0,[%g3+8] /* 0x012c */ add %g3,16,%g3 /* 0x0130 */ ble,a,pt %icc,.L900000311 /* 0x0134 */ ld [%o7],%o0 .L77000150: /* 0x0138 */ ret ! Result = /* 0x013c */ restore %g0,%g0,%g0 /* 0x0140 0 */ .type conv_i32_to_d16,2 /* 0x0140 */ .size conv_i32_to_d16,(.-conv_i32_to_d16) .section ".text",#alloc,#execinstr /* 000000 0 */ .align 8 ! ! CONSTANT POOL ! .L_const_seg_900000401: /* 000000 0 */ .word 1127219200,0 /* 0x0008 0 */ .align 4 /* 0x0008 */ .skip 16 ! ! SUBROUTINE conv_i32_to_d32_and_d16 ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global conv_i32_to_d32_and_d16 conv_i32_to_d32_and_d16: /* 000000 */ save %sp,-120,%sp .L900000415: /* 0x0004 */ call .+8 /* 0x0008 */ sethi /*X*/%hi(_GLOBAL_OFFSET_TABLE_-(.L900000415-.)),%g4 ! 157 ! } ! 158 !} ! 161 !void conv_i32_to_d32_and_d16(double *d32, double *d16, ! 162 ! unsigned int *i32, int len) ! 163 !{ ! 164 !int i = 0; ! 165 !unsigned int a; ! 167 !#pragma pipeloop(0) ! 168 !#ifdef RF_INLINE_MACROS ! 169 ! for(;i>16); /* 0x0158 180 */ sethi %hi(.L_const_seg_900000401),%g2 /* 0x015c */ add %g2,%lo(.L_const_seg_900000401),%o1 /* 0x0160 175 */ sethi %hi(0xfc00),%o0 /* 0x0164 */ ld [%o4+%o1],%o2 /* 0x0168 */ sll %g5,2,%o3 /* 0x016c */ sub %i3,%g5,%g3 /* 0x0170 */ sll %g5,3,%g2 /* 0x0174 */ add %o0,1023,%o4 /* 0x0178 178 */ ldd [%o2],%f0 /* 0x017c */ add %i2,%o3,%o0 /* 0x0180 175 */ cmp %g3,3 /* 0x0184 */ add %i4,%g2,%o3 /* 0x0188 */ sub %i3,1,%o1 /* 0x018c */ sll %g5,4,%g4 /* 0x0190 */ bl,pn %icc,.L77000161 /* 0x0194 */ add %i1,%g4,%o5 /* 0x0198 178 */ ld [%o0],%f3 /* 0x019c 180 */ add %o3,8,%o3 /* 0x01a0 177 */ ld [%o0],%o7 /* 0x01a4 180 */ add %o5,16,%o5 /* 0x01a8 */ add %g5,1,%g5 /* 0x01ac 178 */ fmovs %f0,%f2 /* 0x01b0 180 */ add %o0,4,%o0 /* 0x01b4 179 */ and %o7,%o4,%g1 /* 0x01b8 178 */ fsubd %f2,%f0,%f2 /* 0x01bc */ std %f2,[%o3-8] /* 0x01c0 180 */ srl %o7,16,%o7 /* 0x01c4 179 */ st %g1,[%sp+96] /* 0x01c8 */ fmovs %f0,%f2 /* 0x01cc */ ld [%sp+96],%f3 /* 0x01d0 */ fsubd %f2,%f0,%f2 /* 0x01d4 */ std %f2,[%o5-16] /* 0x01d8 180 */ st %o7,[%sp+92] /* 0x01dc */ fmovs %f0,%f2 /* 0x01e0 */ ld [%sp+92],%f3 /* 0x01e4 */ fsubd %f2,%f0,%f2 /* 0x01e8 */ std %f2,[%o5-8] .L900000411: /* 0x01ec 178 */ ld [%o0],%f3 /* 0x01f0 180 */ add %g5,2,%g5 /* 0x01f4 */ add %o5,32,%o5 /* 0x01f8 177 */ ld [%o0],%o7 /* 0x01fc 180 */ cmp %g5,%o1 /* 0x0200 */ add %o3,16,%o3 /* 0x0204 178 */ fmovs %f0,%f2 /* 0x0208 */ fsubd %f2,%f0,%f2 /* 0x020c */ std %f2,[%o3-16] /* 0x0210 179 */ and %o7,%o4,%g1 /* 0x0214 */ st %g1,[%sp+96] /* 0x0218 */ ld [%sp+96],%f3 /* 0x021c */ fmovs %f0,%f2 /* 0x0220 */ fsubd %f2,%f0,%f2 /* 0x0224 180 */ srl %o7,16,%o7 /* 0x0228 179 */ std %f2,[%o5-32] /* 0x022c 180 */ st %o7,[%sp+92] /* 0x0230 */ ld [%sp+92],%f3 /* 0x0234 */ fmovs %f0,%f2 /* 0x0238 */ fsubd %f2,%f0,%f2 /* 0x023c */ std %f2,[%o5-24] /* 0x0240 */ add %o0,4,%o0 /* 0x0244 178 */ ld [%o0],%f3 /* 0x0248 177 */ ld [%o0],%o7 /* 0x024c 178 */ fmovs %f0,%f2 /* 0x0250 */ fsubd %f2,%f0,%f2 /* 0x0254 */ std %f2,[%o3-8] /* 0x0258 179 */ and %o7,%o4,%g1 /* 0x025c */ st %g1,[%sp+96] /* 0x0260 */ ld [%sp+96],%f3 /* 0x0264 */ fmovs %f0,%f2 /* 0x0268 */ fsubd %f2,%f0,%f2 /* 0x026c 180 */ srl %o7,16,%o7 /* 0x0270 179 */ std %f2,[%o5-16] /* 0x0274 180 */ st %o7,[%sp+92] /* 0x0278 */ ld [%sp+92],%f3 /* 0x027c */ fmovs %f0,%f2 /* 0x0280 */ fsubd %f2,%f0,%f2 /* 0x0284 */ std %f2,[%o5-8] /* 0x0288 */ bl,pt %icc,.L900000411 /* 0x028c */ add %o0,4,%o0 .L900000414: /* 0x0290 180 */ cmp %g5,%i3 /* 0x0294 */ bge,pn %icc,.L77000164 /* 0x0298 */ nop .L77000161: /* 0x029c 178 */ ld [%o0],%f3 .L900000416: /* 0x02a0 178 */ ldd [%o2],%f0 /* 0x02a4 180 */ add %g5,1,%g5 /* 0x02a8 177 */ ld [%o0],%o1 /* 0x02ac 180 */ add %o0,4,%o0 /* 0x02b0 */ cmp %g5,%i3 /* 0x02b4 178 */ fmovs %f0,%f2 /* 0x02b8 179 */ and %o1,%o4,%o7 /* 0x02bc 178 */ fsubd %f2,%f0,%f2 /* 0x02c0 */ std %f2,[%o3] /* 0x02c4 180 */ srl %o1,16,%o1 /* 0x02c8 179 */ st %o7,[%sp+96] /* 0x02cc 180 */ add %o3,8,%o3 /* 0x02d0 179 */ fmovs %f0,%f2 /* 0x02d4 */ ld [%sp+96],%f3 /* 0x02d8 */ fsubd %f2,%f0,%f2 /* 0x02dc */ std %f2,[%o5] /* 0x02e0 180 */ st %o1,[%sp+92] /* 0x02e4 */ fmovs %f0,%f2 /* 0x02e8 */ ld [%sp+92],%f3 /* 0x02ec */ fsubd %f2,%f0,%f0 /* 0x02f0 */ std %f0,[%o5+8] /* 0x02f4 */ add %o5,16,%o5 /* 0x02f8 */ bl,a,pt %icc,.L900000416 /* 0x02fc */ ld [%o0],%f3 .L77000164: /* 0x0300 */ ret ! Result = /* 0x0304 */ restore %g0,%g0,%g0 /* 0x0308 0 */ .type conv_i32_to_d32_and_d16,2 /* 0x0308 */ .size conv_i32_to_d32_and_d16,(.-conv_i32_to_d32_and_d16) .section ".text",#alloc,#execinstr /* 000000 0 */ .align 4 ! ! SUBROUTINE adjust_montf_result ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global adjust_montf_result adjust_montf_result: /* 000000 */ or %g0,%o2,%g5 ! 181 ! } ! 182 !} ! 185 !void adjust_montf_result(unsigned int *i32, unsigned int *nint, int len) ! 186 !{ ! 187 !long long acc; ! 188 !int i; ! 190 ! if(i32[len]>0) i=-1; /* 0x0004 190 */ or %g0,-1,%g4 /* 0x0008 */ sll %o2,2,%g1 /* 0x000c */ ld [%o0+%g1],%g1 /* 0x0010 */ cmp %g1,0 /* 0x0014 */ bleu,pn %icc,.L77000175 /* 0x0018 */ or %g0,%o1,%o3 /* 0x001c */ ba .L900000511 /* 0x0020 */ cmp %g4,0 .L77000175: ! 191 ! else ! 192 ! { ! 193 ! for(i=len-1; i>=0; i--) /* 0x0024 193 */ sub %o2,1,%g4 /* 0x0028 */ sll %g4,2,%g1 /* 0x002c */ cmp %g4,0 /* 0x0030 */ bl,pt %icc,.L900000511 /* 0x0034 */ cmp %g4,0 /* 0x0038 */ add %o1,%g1,%g2 ! 194 ! { ! 195 ! if(i32[i]!=nint[i]) break; /* 0x003c 195 */ ld [%g2],%o5 /* 0x0040 193 */ add %o0,%g1,%g3 .L900000510: /* 0x0044 195 */ ld [%g3],%o2 /* 0x0048 */ sub %g4,1,%g1 /* 0x004c */ sub %g2,4,%g2 /* 0x0050 */ sub %g3,4,%g3 /* 0x0054 */ cmp %o2,%o5 /* 0x0058 */ bne,pn %icc,.L77000182 /* 0x005c */ nop /* 0x0060 0 */ or %g0,%g1,%g4 /* 0x0064 195 */ cmp %g1,0 /* 0x0068 */ bge,a,pt %icc,.L900000510 /* 0x006c */ ld [%g2],%o5 .L77000182: ! 196 ! } ! 197 ! } ! 198 ! if((i<0)||(i32[i]>nint[i])) /* 0x0070 198 */ cmp %g4,0 .L900000511: /* 0x0074 198 */ bl,pn %icc,.L77000198 /* 0x0078 */ sll %g4,2,%g2 /* 0x007c */ ld [%o1+%g2],%g1 /* 0x0080 */ ld [%o0+%g2],%g2 /* 0x0084 */ cmp %g2,%g1 /* 0x0088 */ bleu,pt %icc,.L77000191 /* 0x008c */ nop .L77000198: ! 199 ! { ! 200 ! acc=0; ! 201 ! for(i=0;i>32; /* 0x00dc 205 */ or %g0,2,%o5 /* 0x00e0 201 */ sub %o2,%o1,%o2 /* 0x00e4 */ or %g0,%o2,%g5 /* 0x00e8 204 */ and %o2,%g3,%o2 /* 0x00ec */ st %o2,[%o0] /* 0x00f0 205 */ srax %g5,32,%g5 .L900000505: /* 0x00f4 203 */ ld [%o3],%o2 /* 0x00f8 205 */ add %o5,1,%o5 /* 0x00fc */ add %o3,4,%o3 /* 0x0100 */ cmp %o5,%g4 /* 0x0104 */ add %o4,4,%o4 /* 0x0108 201 */ sub %g1,%o2,%g1 /* 0x010c */ add %g1,%g5,%g5 /* 0x0110 204 */ and %g5,%g3,%o2 /* 0x0114 203 */ ld [%o4-4],%g1 /* 0x0118 204 */ st %o2,[%o4-8] /* 0x011c 205 */ ble,pt %icc,.L900000505 /* 0x0120 */ srax %g5,32,%g5 .L900000508: /* 0x0124 203 */ ld [%o3],%g2 /* 0x0128 201 */ sub %g1,%g2,%g1 /* 0x012c */ add %g1,%g5,%g1 /* 0x0130 204 */ and %g1,%g3,%g2 /* 0x0134 */ retl ! Result = /* 0x0138 */ st %g2,[%o4-4] .L77000199: /* 0x013c 203 */ ld [%o4],%g1 .L900000509: /* 0x0140 203 */ ld [%o3],%g2 /* 0x0144 */ add %g5,%g1,%g1 /* 0x0148 205 */ add %o5,1,%o5 /* 0x014c */ add %o3,4,%o3 /* 0x0150 */ cmp %o5,%g4 /* 0x0154 203 */ sub %g1,%g2,%g1 /* 0x0158 204 */ and %g1,%g3,%g2 /* 0x015c */ st %g2,[%o4] /* 0x0160 205 */ add %o4,4,%o4 /* 0x0164 */ srax %g1,32,%g5 /* 0x0168 */ ble,a,pt %icc,.L900000509 /* 0x016c */ ld [%o4],%g1 .L77000191: /* 0x0170 */ retl ! Result = /* 0x0174 */ nop /* 0x0178 0 */ .type adjust_montf_result,2 /* 0x0178 */ .size adjust_montf_result,(.-adjust_montf_result) .section ".text",#alloc,#execinstr /* 000000 0 */ .align 4 /* 000000 */ .skip 16 ! ! SUBROUTINE mont_mulf_noconv ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global mont_mulf_noconv mont_mulf_noconv: /* 000000 */ save %sp,-144,%sp .L900000646: /* 0x0004 */ call .+8 /* 0x0008 */ sethi /*X*/%hi(_GLOBAL_OFFSET_TABLE_-(.L900000646-.)),%g5 ! 206 ! } ! 207 ! } ! 208 !} ! 213 !/* ! 214 !** the lengths of the input arrays should be at least the following: ! 215 !** result[nlen+1], dm1[nlen], dm2[2*nlen+1], dt[4*nlen+2], dn[nlen], nint[nlen] ! 216 !** all of them should be different from one another ! 217 !** ! 218 !*/ ! 219 !void mont_mulf_noconv(unsigned int *result, ! 220 ! double *dm1, double *dm2, double *dt, ! 221 ! double *dn, unsigned int *nint, ! 222 ! int nlen, double dn0) ! 223 !{ ! 224 ! int i, j, jj; ! 225 ! int tmp; ! 226 ! double digit, m2j, nextm2j, a, b; ! 227 ! double *dptmp, *pdm1, *pdm2, *pdn, *pdtj, pdn_0, pdm1_0; ! 229 ! pdm1=&(dm1[0]); ! 230 ! pdm2=&(dm2[0]); ! 231 ! pdn=&(dn[0]); ! 232 ! pdm2[2*nlen]=Zero; /* 0x000c 232 */ ld [%fp+92],%o1 /* 0x0010 */ sethi %hi(Zero),%g2 /* 0x0014 223 */ ldd [%fp+96],%f2 /* 0x0018 */ add %g5,/*X*/%lo(_GLOBAL_OFFSET_TABLE_-(.L900000646-.)),%g5 /* 0x001c 232 */ add %g2,%lo(Zero),%g2 /* 0x0020 223 */ st %i0,[%fp+68] /* 0x0024 */ add %g5,%o7,%o3 ! 234 ! if (nlen!=16) ! 235 ! { ! 236 ! for(i=0;i<4*nlen+2;i++) dt[i]=Zero; ! 238 ! a=dt[0]=pdm1[0]*pdm2[0]; ! 239 ! digit=mod(lower32(a,Zero)*dn0,TwoToMinus16,TwoTo16); /* 0x0028 239 */ sethi %hi(TwoToMinus16),%g3 /* 0x002c 232 */ ld [%o3+%g2],%l0 /* 0x0030 239 */ sethi %hi(TwoTo16),%g4 /* 0x0034 223 */ or %g0,%i2,%o2 /* 0x0038 */ fmovd %f2,%f16 /* 0x003c */ st %i5,[%fp+88] /* 0x0040 239 */ add %g3,%lo(TwoToMinus16),%g2 /* 0x0044 223 */ or %g0,%i1,%i2 /* 0x0048 232 */ ldd [%l0],%f0 /* 0x004c 239 */ add %g4,%lo(TwoTo16),%g3 /* 0x0050 223 */ or %g0,%i3,%o0 /* 0x0054 232 */ sll %o1,4,%g4 /* 0x0058 239 */ ld [%o3+%g2],%g5 /* 0x005c 223 */ or %g0,%i3,%i1 /* 0x0060 239 */ ld [%o3+%g3],%g1 /* 0x0064 232 */ or %g0,%o1,%i0 /* 0x0068 */ or %g0,%o2,%i3 /* 0x006c 234 */ cmp %o1,16 /* 0x0070 */ be,pn %icc,.L77000279 /* 0x0074 */ std %f0,[%o2+%g4] /* 0x0078 236 */ sll %o1,2,%g2 /* 0x007c */ or %g0,%o0,%o3 /* 0x0080 232 */ sll %o1,1,%o1 /* 0x0084 236 */ add %g2,2,%o2 /* 0x0088 */ cmp %o2,0 /* 0x008c */ ble,a,pt %icc,.L900000660 /* 0x0090 */ ldd [%i2],%f0 ! 241 ! pdtj=&(dt[0]); ! 242 ! for(j=jj=0;j<2*nlen;j++,jj++,pdtj++) ! 243 ! { ! 244 ! m2j=pdm2[j]; ! 245 ! a=pdtj[0]+pdn[0]*digit; ! 246 ! b=pdtj[1]+pdm1[0]*pdm2[j+1]+a*TwoToMinus16; ! 247 ! pdtj[1]=b; ! 249 !#pragma pipeloop(0) ! 250 ! for(i=1;i