.section ".text",#alloc,#execinstr,#progbits .file "operator04.C" .section ".rodata",#alloc,#progbits ! ! CONSTANT POOL ! .LI194: .type .LI194,#object .ascii "\t\000" .size .LI194,2 .global __1cMPrintMatrix36FnHMatrix3__v_ .section ".bss",#alloc,#write,#nobits .align 4 .LI195: .skip 36 .type .LI195,#object .size .LI195,36 .global __1c2p6FrnHMatrix3_1_1_ .global main .global __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_ .section ".text",#alloc,#execinstr,#progbits /* 000000 0 */ .align 32 ! FILE operator04.C ! 1 !#include ! 3 !class Matrix3 ! 4 !{ ! 5 !public: ! 6 ! float A[3][3]; ! 7 !}; ! 9 !void PrintMatrix3(Matrix3 M) ! 10 !{ ! ! SUBROUTINE __1cMPrintMatrix36FnHMatrix3__v_ ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global __1cMPrintMatrix36FnHMatrix3__v_ __1cMPrintMatrix36FnHMatrix3__v_: /* 000000 10 */ save %sp,-96,%sp ! 11 ! int i, j; ! 13 ! for (i = 0; i < 3; i=i+1) ! 14 ! { ! 15 ! for (j = 0; j < 3; j=j+1) ! 16 ! cout << M.A[i][j] << "\t"; ! 17 ! cout << endl; /* 0x0004 17 */ sethi %hi(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%i4 /* 0x0008 0 */ sethi %hi(__1cDstdEcout_),%i2 /* 0x000c 16 */ sethi %hi(.LI194),%i3 /* 0x0010 17 */ add %i4,%lo(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%i1 /* 0x0014 0 */ add %i2,%lo(__1cDstdEcout_),%i4 /* 0x0018 16 */ add %i3,%lo(.LI194),%l7 /* 0x001c 13 */ or %g0,0,%i5 /* 0x0020 15 */ or %g0,0,%l5 ! Registers live out of __1cMPrintMatrix36FnHMatrix3__v_: ! o0 sp l5 l7 i0 i1 i4 i5 fp i7 gsr ! ! predecessor blocks : .L77000086 __1cMPrintMatrix36FnHMatrix3__v_ .L900000109: /* 0x0024 16 */ ld [%i0],%o1 /* 0x0028 15 */ or %g0,%i0,%l6 ! Registers live out of .L900000109: ! o0 o1 sp l5 l6 l7 i0 i1 i4 i5 fp i7 gsr ! ! predecessor blocks : .L900000109 .L900000110 .L900000110: /* 0x002c 16 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6Mf_r1_ ! params = %o0 %o1 ! Result = %o0 /* 0x0030 */ or %g0,%i4,%o0 /* 0x0034 */ call __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_ ! params = %o0 %o1 ! Result = /* 0x0038 */ or %g0,%l7,%o1 /* 0x003c */ add %l5,1,%l5 /* 0x0040 */ add %l6,4,%l6 /* 0x0044 */ cmp %l5,2 /* 0x0048 */ ble,a,pt %icc,.L900000110 /* 0x004c */ ld [%l6],%o1 ! Registers live out of .L900000110: ! o0 o1 sp l5 l6 l7 i0 i1 i4 i5 fp i7 gsr ! ! predecessor blocks : .L900000110 .L77000086: /* 0x0050 17 */ or %g0,%i4,%o0 /* 0x0054 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ ! params = %o0 %o1 ! Result = /* 0x0058 */ or %g0,%i1,%o1 /* 0x005c */ add %i5,1,%i5 /* 0x0060 */ add %i0,12,%i0 /* 0x0064 */ cmp %i5,2 /* 0x0068 */ ble,pt %icc,.L900000109 /* 0x006c 15 */ or %g0,0,%l5 ! Registers live out of .L77000086: ! o0 sp l5 l7 i0 i1 i4 i5 fp i7 gsr ! ! predecessor blocks : .L77000086 .L77000088: /* 0x0070 17 */ ret ! Result = /* 0x0074 */ restore %g0,%g0,%g0 /* 0x0078 0 */ .type __1cMPrintMatrix36FnHMatrix3__v_,2 /* 0x0078 0 */ .size __1cMPrintMatrix36FnHMatrix3__v_,(.-__1cMPrintMatrix36FnHMatrix3__v_) .section ".rodata",#alloc,#progbits .section ".bss",#alloc,#write,#nobits .section ".text",#alloc,#execinstr,#progbits /* 000000 0 */ .align 32 ! 18 ! } ! 19 !} ! 21 !Matrix3 & operator*(Matrix3 & M1, Matrix3 & M2) ! 22 !{ ! ! SUBROUTINE __1c2p6FrnHMatrix3_1_1_ ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global __1c2p6FrnHMatrix3_1_1_ __1c2p6FrnHMatrix3_1_1_: /* 000000 0 */ sethi %hi(.LI195),%o4 ! 23 ! static Matrix3 r; ! 25 ! int i, j, k; ! 27 ! for (i = 0; i < 3; i=i+1) ! 28 ! for (j = 0; j < 3; j=j+1) ! 29 ! r.A[i][j] = 0; ! 31 ! for (i = 0; i < 3; i=i+1) ! 32 ! for (j = 0; j < 3; j=j+1) ! 33 ! for (k = 0; k < 3; k=k+1) ! 34 ! r.A[i][j] = r.A[i][j] + M1.A[i][k]*M2.A[k][j]; /* 0x0004 34 */ add %o0,36,%o2 /* 0x0008 29 */ st %g0,[%o4+%lo(.LI195)] /* 0x000c 0 */ add %o4,%lo(.LI195),%g2 /* 0x0010 29 */ st %g0,[%g2+32] /* 0x0014 34 */ or %g0,%g2,%o0 /* 0x0018 29 */ st %g0,[%g2+4] /* 0x001c */ st %g0,[%g2+8] /* 0x0020 */ st %g0,[%g2+12] /* 0x0024 */ st %g0,[%g2+16] /* 0x0028 */ st %g0,[%g2+20] /* 0x002c */ st %g0,[%g2+24] /* 0x0030 */ st %g0,[%g2+28] /* 0x0034 34 */ ld [%o1],%f4 /* 0x0038 */ ld [%o2-36],%f0 /* 0x003c 33 */ ld [%o4+%lo(.LI195)],%f2 /* 0x0040 */ ld [%g2+4],%f3 /* 0x0044 34 */ fmuls %f0,%f4,%f0 /* 0x0048 */ fadds %f2,%f0,%f16 /* 0x004c 33 */ ld [%g2+8],%f4 /* 0x0050 */ ld [%g2+12],%f5 /* 0x0054 */ ld [%g2+16],%f6 /* 0x0058 */ ld [%g2+20],%f7 /* 0x005c 34 */ st %f16,[%o4+%lo(.LI195)] /* 0x0060 */ ld [%o2-32],%f10 /* 0x0064 */ ld [%o1+12],%f12 /* 0x0068 33 */ ld [%g2+24],%f8 /* 0x006c */ ld [%g2+28],%f9 /* 0x0070 34 */ fmuls %f10,%f12,%f14 /* 0x0074 33 */ ld [%g2+32],%f10 /* 0x0078 34 */ fadds %f16,%f14,%f24 /* 0x007c */ st %f24,[%o4+%lo(.LI195)] /* 0x0080 */ ld [%o2-28],%f18 /* 0x0084 */ ld [%o1+24],%f20 /* 0x0088 */ fmuls %f18,%f20,%f22 /* 0x008c */ fadds %f24,%f22,%f26 /* 0x0090 */ st %f26,[%o4+%lo(.LI195)] /* 0x0094 */ ld [%o2-36],%f28 /* 0x0098 */ ld [%o1+4],%f30 /* 0x009c */ fmuls %f28,%f30,%f1 /* 0x00a0 */ fadds %f3,%f1,%f17 /* 0x00a4 */ st %f17,[%g2+4] /* 0x00a8 */ ld [%o2-32],%f11 /* 0x00ac */ ld [%o1+16],%f13 /* 0x00b0 */ fmuls %f11,%f13,%f15 /* 0x00b4 */ fadds %f17,%f15,%f25 /* 0x00b8 */ st %f25,[%g2+4] /* 0x00bc */ ld [%o2-28],%f19 /* 0x00c0 */ ld [%o1+28],%f21 /* 0x00c4 */ fmuls %f19,%f21,%f23 /* 0x00c8 */ fadds %f25,%f23,%f27 /* 0x00cc */ st %f27,[%g2+4] /* 0x00d0 */ ld [%o2-36],%f29 /* 0x00d4 */ ld [%o1+8],%f31 /* 0x00d8 */ fmuls %f29,%f31,%f0 /* 0x00dc */ fadds %f4,%f0,%f2 /* 0x00e0 */ st %f2,[%g2+8] /* 0x00e4 */ ld [%o2-32],%f12 /* 0x00e8 */ ld [%o1+20],%f14 /* 0x00ec */ fmuls %f12,%f14,%f16 /* 0x00f0 */ fadds %f2,%f16,%f24 /* 0x00f4 */ st %f24,[%g2+8] /* 0x00f8 */ ld [%o2-28],%f18 /* 0x00fc */ ld [%o1+32],%f20 /* 0x0100 */ fmuls %f18,%f20,%f22 /* 0x0104 */ fadds %f24,%f22,%f26 /* 0x0108 */ st %f26,[%g2+8] /* 0x010c */ ld [%o2-24],%f28 /* 0x0110 */ ld [%o1],%f30 /* 0x0114 */ fmuls %f28,%f30,%f1 /* 0x0118 */ fadds %f5,%f1,%f15 /* 0x011c */ st %f15,[%g2+12] /* 0x0120 */ ld [%o2-20],%f3 /* 0x0124 */ ld [%o1+12],%f11 /* 0x0128 */ fmuls %f3,%f11,%f13 /* 0x012c */ fadds %f15,%f13,%f23 /* 0x0130 */ st %f23,[%g2+12] /* 0x0134 */ ld [%o2-16],%f17 /* 0x0138 */ ld [%o1+24],%f19 /* 0x013c */ fmuls %f17,%f19,%f21 /* 0x0140 */ fadds %f23,%f21,%f25 /* 0x0144 */ st %f25,[%g2+12] /* 0x0148 */ ld [%o2-24],%f27 /* 0x014c */ ld [%o1+4],%f29 /* 0x0150 */ fmuls %f27,%f29,%f31 /* 0x0154 */ fadds %f6,%f31,%f5 /* 0x0158 */ st %f5,[%g2+16] /* 0x015c */ ld [%o2-20],%f0 /* 0x0160 */ ld [%o1+16],%f4 /* 0x0164 */ fmuls %f0,%f4,%f12 /* 0x0168 */ fadds %f5,%f12,%f2 /* 0x016c */ st %f2,[%g2+16] /* 0x0170 */ ld [%o2-16],%f6 /* 0x0174 */ ld [%o1+28],%f14 /* 0x0178 */ fmuls %f6,%f14,%f16 /* 0x017c */ fadds %f2,%f16,%f18 /* 0x0180 */ st %f18,[%g2+16] /* 0x0184 */ ld [%o2-24],%f20 /* 0x0188 */ ld [%o1+8],%f22 /* 0x018c */ fmuls %f20,%f22,%f24 /* 0x0190 */ fadds %f7,%f24,%f30 /* 0x0194 */ st %f30,[%g2+20] /* 0x0198 */ ld [%o2-20],%f7 /* 0x019c */ ld [%o1+20],%f26 /* 0x01a0 */ fmuls %f7,%f26,%f28 /* 0x01a4 */ fadds %f30,%f28,%f13 /* 0x01a8 */ st %f13,[%g2+20] /* 0x01ac */ ld [%o2-16],%f3 /* 0x01b0 */ ld [%o1+32],%f1 /* 0x01b4 */ fmuls %f3,%f1,%f11 /* 0x01b8 */ fadds %f13,%f11,%f15 /* 0x01bc */ st %f15,[%g2+20] /* 0x01c0 */ ld [%o2-12],%f17 /* 0x01c4 */ ld [%o1],%f19 /* 0x01c8 */ fmuls %f17,%f19,%f21 /* 0x01cc */ fadds %f8,%f21,%f27 /* 0x01d0 */ st %f27,[%g2+24] /* 0x01d4 */ ld [%o2-8],%f8 /* 0x01d8 */ ld [%o1+12],%f23 /* 0x01dc */ fmuls %f8,%f23,%f25 /* 0x01e0 */ fadds %f27,%f25,%f4 /* 0x01e4 */ st %f4,[%g2+24] /* 0x01e8 */ ld [%o2-4],%f29 /* 0x01ec */ ld [%o1+24],%f31 /* 0x01f0 */ fmuls %f29,%f31,%f0 /* 0x01f4 */ fadds %f4,%f0,%f12 /* 0x01f8 */ st %f12,[%g2+24] /* 0x01fc */ ld [%o2-12],%f5 /* 0x0200 */ ld [%o1+4],%f6 /* 0x0204 */ fmuls %f5,%f6,%f14 /* 0x0208 */ fadds %f9,%f14,%f2 /* 0x020c */ st %f2,[%g2+28] /* 0x0210 */ ld [%o2-8],%f9 /* 0x0214 */ ld [%o1+16],%f16 /* 0x0218 */ fmuls %f9,%f16,%f18 /* 0x021c */ fadds %f2,%f18,%f7 /* 0x0220 */ st %f7,[%g2+28] /* 0x0224 */ ld [%o2-4],%f20 /* 0x0228 */ ld [%o1+28],%f22 /* 0x022c */ fmuls %f20,%f22,%f24 /* 0x0230 */ fadds %f7,%f24,%f26 /* 0x0234 */ st %f26,[%g2+28] /* 0x0238 */ ld [%o2-12],%f28 /* 0x023c */ ld [%o1+8],%f30 /* 0x0240 */ fmuls %f28,%f30,%f3 /* 0x0244 */ fadds %f10,%f3,%f13 /* 0x0248 */ st %f13,[%g2+32] /* 0x024c */ ld [%o2-8],%f10 /* 0x0250 */ ld [%o1+20],%f1 /* 0x0254 */ fmuls %f10,%f1,%f11 /* 0x0258 */ fadds %f13,%f11,%f21 /* 0x025c */ st %f21,[%g2+32] /* 0x0260 */ ld [%o2-4],%f15 /* 0x0264 */ ld [%o1+32],%f17 /* 0x0268 */ fmuls %f15,%f17,%f19 /* 0x026c */ fadds %f21,%f19,%f8 /* 0x0270 */ retl ! Result = %o0 /* 0x0274 */ st %f8,[%g2+32] /* 0x0278 0 */ .type __1c2p6FrnHMatrix3_1_1_,2 /* 0x0278 0 */ .size __1c2p6FrnHMatrix3_1_1_,(.-__1c2p6FrnHMatrix3_1_1_) .section ".rodata",#alloc,#progbits .section ".bss",#alloc,#write,#nobits .section ".text",#alloc,#execinstr,#progbits /* 000000 0 */ .align 32 ! 36 ! return r; ! 37 !} ! 39 !int main(int argc, char *argv[]) ! 40 !{ ! ! SUBROUTINE main ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global main main: /* 000000 40 */ save %sp,-504,%sp ! 41 ! int i, j; ! 42 ! Matrix3 M1, M2, M3; ! 44 ! for (i = 0; i < 3; i=i+1) ! 45 ! for (j = 0; j < 3; j=j+1) /* 0x0004 45 */ or %g0,2,%i0 ! 46 ! M1.A[i][j] = i + j; /* 0x0008 46 */ st %i0,[%sp+160] /* 0x000c 45 */ or %g0,1,%i4 /* 0x0010 46 */ st %i4,[%sp+192] /* 0x0014 45 */ or %g0,3,%l7 /* 0x0018 */ or %g0,4,%l0 /* 0x001c 46 */ st %g0,[%sp+224] ! 47 ! PrintMatrix3(M1); cout << endl; /* 0x0020 47 */ add %fp,-36,%l1 /* 0x0024 */ add %fp,-68,%l2 /* 0x0028 46 */ st %l7,[%sp+128] /* 0x002c 47 */ or %g0,0,%l3 /* 0x0030 */ add %fp,-72,%i5 /* 0x0034 46 */ ld [%sp+160],%f0 /* 0x0038 47 */ or %g0,32,%o4 /* 0x003c 46 */ ld [%sp+192],%f4 /* 0x0040 */ st %l0,[%sp+96] /* 0x0044 */ ld [%sp+224],%f2 /* 0x0048 */ fitod %f0,%f32 /* 0x004c */ ld [%sp+128],%f6 /* 0x0050 */ fitod %f4,%f34 /* 0x0054 */ fitod %f2,%f36 /* 0x0058 */ fitod %f6,%f38 /* 0x005c */ fdtos %f32,%f16 /* 0x0060 */ st %f16,[%fp-28] /* 0x0064 */ ld [%sp+96],%f10 /* 0x0068 */ fdtos %f34,%f18 /* 0x006c */ st %f18,[%fp-32] /* 0x0070 */ fdtos %f36,%f20 /* 0x0074 */ st %f20,[%fp-36] /* 0x0078 */ fdtos %f38,%f22 /* 0x007c */ fitod %f10,%f44 /* 0x0080 */ st %f22,[%fp-16] /* 0x0084 */ st %f16,[%fp-20] /* 0x0088 */ st %f18,[%fp-24] /* 0x008c */ fdtos %f44,%f28 /* 0x0090 */ st %f28,[%fp-4] /* 0x0094 */ st %f22,[%fp-8] /* 0x0098 */ st %f16,[%fp-12] ! Registers live out of main: ! o0 o4 sp l1 l2 i5 fp i7 gsr ! ! predecessor blocks : main .L900000320 .L900000320: /* 0x009c 47 */ ld [%l1+%o4],%o5 /* 0x00a0 */ subcc %o4,4,%o4 /* 0x00a4 */ bge,pt %icc,.L900000320 /* 0x00a8 */ st %o5,[%l2+%o4] ! Registers live out of .L900000320: ! o0 o4 sp l1 l2 i5 fp i7 gsr ! ! predecessor blocks : .L900000320 .L77000150: /* 0x00ac 47 */ or %g0,0,%l2 ! Registers live out of .L77000150: ! o0 sp l2 i5 fp i7 gsr ! ! predecessor blocks : .L77000150 .L77000152 .L900000323: /* 0x00b0 47 */ sethi %hi(__1cDstdEcout_),%i0 /* 0x00b4 */ or %g0,%i5,%l1 ! Registers live out of .L900000323: ! o0 sp l1 l2 i0 i5 fp i7 gsr ! ! predecessor blocks : .L900000323 .L900000324 .L900000324: /* 0x00b8 47 */ add %i0,%lo(__1cDstdEcout_),%l0 /* 0x00bc */ ld [%l1],%o1 /* 0x00c0 */ add %l2,1,%l2 /* 0x00c4 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6Mf_r1_ ! params = %o0 %o1 ! Result = %o0 /* 0x00c8 */ or %g0,%l0,%o0 /* 0x00cc */ sethi %hi(.LI194),%o7 /* 0x00d0 */ add %l1,4,%l1 /* 0x00d4 */ add %o7,%lo(.LI194),%i4 /* 0x00d8 */ call __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_ ! params = %o0 %o1 ! Result = /* 0x00dc */ or %g0,%i4,%o1 /* 0x00e0 */ cmp %l2,2 /* 0x00e4 */ ble,pt %icc,.L900000324 /* 0x00e8 */ sethi %hi(__1cDstdEcout_),%i0 ! Registers live out of .L900000324: ! o0 o1 sp l0 l1 l2 i0 i4 i5 fp i7 gsr ! ! predecessor blocks : .L900000324 .L77000152: /* 0x00ec 47 */ sethi %hi(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%l4 /* 0x00f0 */ or %g0,%l0,%o0 /* 0x00f4 */ add %l4,%lo(__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_),%l7 /* 0x00f8 */ add %l3,1,%l3 /* 0x00fc */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ ! params = %o0 %o1 ! Result = /* 0x0100 */ or %g0,%l7,%o1 /* 0x0104 */ add %i5,12,%i5 /* 0x0108 */ cmp %l3,2 /* 0x010c */ ble,pt %icc,.L900000323 /* 0x0110 */ or %g0,0,%l2 ! Registers live out of .L77000152: ! o0 o1 sp l0 l2 l7 i4 i5 fp i7 gsr ! ! predecessor blocks : .L77000152 .L77000156: /* 0x0114 47 */ or %g0,%l0,%o0 /* 0x0118 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ ! params = %o0 %o1 ! Result = /* 0x011c */ or %g0,%l7,%o1 ! 49 ! for (i = 0; i < 3; i=i+1) ! 50 ! for (j = 0; j < 3; j=j+1) ! 51 ! M2.A[i][j] = i + j + 1; /* 0x0120 51 */ ld [%sp+128],%f4 /* 0x0124 50 */ or %g0,5,%g2 ! 52 ! PrintMatrix3(M2); cout << endl; /* 0x0128 52 */ add %fp,-108,%i2 /* 0x012c 51 */ ld [%sp+160],%f30 /* 0x0130 52 */ add %fp,-140,%i5 /* 0x0134 */ or %g0,0,%l5 /* 0x0138 51 */ st %g2,[%sp+256] /* 0x013c 52 */ add %fp,-144,%i3 /* 0x0140 */ or %g0,32,%l6 /* 0x0144 51 */ ld [%sp+192],%f2 /* 0x0148 */ fitod %f4,%f62 /* 0x014c */ ld [%sp+96],%f8 /* 0x0150 */ fitod %f30,%f60 /* 0x0154 */ fitod %f2,%f58 /* 0x0158 */ fitod %f8,%f56 /* 0x015c */ ld [%sp+256],%f19 /* 0x0160 */ fdtos %f62,%f1 /* 0x0164 */ st %f1,[%fp-100] /* 0x0168 */ fdtos %f60,%f15 /* 0x016c */ st %f15,[%fp-104] /* 0x0170 */ fdtos %f58,%f25 /* 0x0174 */ st %f25,[%fp-108] /* 0x0178 */ fitod %f19,%f32 /* 0x017c */ fdtos %f56,%f16 /* 0x0180 */ st %f16,[%fp-88] /* 0x0184 */ fdtos %f62,%f27 /* 0x0188 */ st %f27,[%fp-92] /* 0x018c */ st %f15,[%fp-96] /* 0x0190 */ fdtos %f32,%f29 /* 0x0194 */ st %f29,[%fp-76] /* 0x0198 */ st %f16,[%fp-80] /* 0x019c */ st %f27,[%fp-84] ! Registers live out of .L77000156: ! o0 sp l0 l5 l6 l7 i2 i3 i4 i5 fp i7 gsr ! ! predecessor blocks : .L77000156 .L900000319 .L900000319: /* 0x01a0 52 */ ld [%i2+%l6],%i1 /* 0x01a4 */ subcc %l6,4,%l6 /* 0x01a8 */ bge,pt %icc,.L900000319 /* 0x01ac */ st %i1,[%i5+%l6] ! Registers live out of .L900000319: ! o0 sp l0 l5 l6 l7 i2 i3 i4 i5 fp i7 gsr ! ! predecessor blocks : .L900000319 .L77000158: /* 0x01b0 52 */ or %g0,0,%l3 ! Registers live out of .L77000158: ! o0 sp l0 l5 l7 i3 i4 fp i7 gsr ! ! predecessor blocks : .L77000158 .L77000160 .L900000321: /* 0x01b4 52 */ ld [%i3],%o1 /* 0x01b8 */ or %g0,%i3,%i0 ! Registers live out of .L900000321: ! o0 o1 sp l0 l5 l7 i0 i3 i4 fp i7 gsr ! ! predecessor blocks : .L900000321 .L900000322 .L900000322: /* 0x01bc 52 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6Mf_r1_ ! params = %o0 %o1 ! Result = %o0 /* 0x01c0 */ or %g0,%l0,%o0 /* 0x01c4 */ call __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_ ! params = %o0 %o1 ! Result = /* 0x01c8 */ or %g0,%i4,%o1 /* 0x01cc */ add %l3,1,%l3 /* 0x01d0 */ add %i0,4,%i0 /* 0x01d4 */ cmp %l3,2 /* 0x01d8 */ ble,a,pt %icc,.L900000322 /* 0x01dc */ ld [%i0],%o1 ! Registers live out of .L900000322: ! o0 o1 sp l0 l5 l7 i0 i3 i4 fp i7 gsr ! ! predecessor blocks : .L900000322 .L77000160: /* 0x01e0 52 */ or %g0,%l0,%o0 /* 0x01e4 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ ! params = %o0 %o1 ! Result = /* 0x01e8 */ or %g0,%l7,%o1 /* 0x01ec */ add %l5,1,%l5 /* 0x01f0 */ add %i3,12,%i3 /* 0x01f4 */ cmp %l5,2 /* 0x01f8 */ ble,pt %icc,.L900000321 /* 0x01fc */ or %g0,0,%l3 ! Registers live out of .L77000160: ! o0 o1 sp l0 l5 l7 i3 i4 fp i7 gsr ! ! predecessor blocks : .L77000160 .L77000164: /* 0x0200 52 */ or %g0,%l0,%o0 ! 54 ! for (i = 0; i < 100000000; i=i+1) ! 55 ! { M1.A[0][0] = i; ! 56 ! M3 = M1 * M2; /* 0x0204 56 */ or %g0,0,%i0 /* 0x0208 52 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___2l6MpFr1_2_2_ ! params = %o0 %o1 ! Result = /* 0x020c */ or %g0,%l7,%o1 /* 0x0210 56 */ ld [%fp-108],%f3 /* 0x0214 54 */ sethi %hi(0x5f5e000),%o3 /* 0x0218 */ sethi %hi(.LI195),%g2 /* 0x021c 56 */ st %g0,[%g2+%lo(.LI195)] /* 0x0220 54 */ add %o3,255,%o2 /* 0x0224 */ add %g2,%lo(.LI195),%i5 /* 0x0228 55 */ st %o2,[%sp+260] /* 0x022c 56 */ st %g0,[%i5+8] /* 0x0230 55 */ ld [%sp+260],%f5 /* 0x0234 56 */ ld [%fp-100],%f13 /* 0x0238 */ st %g0,[%i5+4] /* 0x023c */ st %g0,[%i5+12] /* 0x0240 55 */ fitod %f5,%f50 /* 0x0244 56 */ st %g0,[%i5+16] /* 0x0248 */ st %g0,[%i5+20] /* 0x024c */ st %g0,[%i5+24] /* 0x0250 */ st %g0,[%i5+28] /* 0x0254 55 */ fdtos %f50,%f7 /* 0x0258 */ st %f7,[%fp-36] /* 0x025c 56 */ ld [%fp-12],%f21 /* 0x0260 */ st %g0,[%i5+32] /* 0x0264 */ ld [%fp-24],%f11 /* 0x0268 */ fmuls %f7,%f3,%f27 /* 0x026c */ ld [%fp-104],%f19 /* 0x0270 */ fmuls %f7,%f13,%f23 /* 0x0274 */ ld [%g2+%lo(.LI195)],%f29 /* 0x0278 */ fmuls %f21,%f13,%f12 /* 0x027c */ ld [%fp-96],%f16 /* 0x0280 */ fmuls %f11,%f13,%f20 /* 0x0284 */ ld [%fp-32],%f31 /* 0x0288 */ fmuls %f7,%f19,%f2 /* 0x028c */ ld [%i5+8],%f25 /* 0x0290 */ fadds %f29,%f27,%f14 /* 0x0294 */ fmuls %f11,%f3,%f10 /* 0x0298 */ ld [%fp-88],%f13 /* 0x029c */ fmuls %f11,%f19,%f26 /* 0x02a0 */ ld [%fp-92],%f17 /* 0x02a4 */ fmuls %f21,%f3,%f15 /* 0x02a8 */ ld [%fp-8],%f3 /* 0x02ac */ fadds %f25,%f23,%f22 /* 0x02b0 */ fmuls %f31,%f16,%f7 /* 0x02b4 */ ld [%fp-20],%f6 /* 0x02b8 */ fmuls %f31,%f13,%f4 /* 0x02bc */ ld [%i5+4],%f8 /* 0x02c0 */ fmuls %f21,%f19,%f18 /* 0x02c4 */ fmuls %f31,%f17,%f19 /* 0x02c8 */ fmuls %f6,%f13,%f9 /* 0x02cc */ fadds %f8,%f2,%f25 /* 0x02d0 */ ld [%fp-16],%f8 /* 0x02d4 */ fmuls %f6,%f16,%f29 /* 0x02d8 */ fadds %f22,%f4,%f21 /* 0x02dc */ ld [%fp-84],%f22 /* 0x02e0 */ fmuls %f6,%f17,%f31 /* 0x02e4 */ fmuls %f3,%f16,%f6 /* 0x02e8 */ ld [%fp-80],%f16 /* 0x02ec */ ld [%i5+20],%f0 /* 0x02f0 */ ld [%i5+12],%f24 /* 0x02f4 */ ld [%i5+16],%f28 /* 0x02f8 */ ld [%i5+24],%f1 /* 0x02fc */ fadds %f0,%f20,%f27 /* 0x0300 */ fmuls %f3,%f13,%f0 /* 0x0304 */ ld [%i5+28],%f23 /* 0x0308 */ fadds %f24,%f10,%f5 /* 0x030c */ ld [%fp-28],%f24 /* 0x0310 */ fadds %f28,%f26,%f20 /* 0x0314 */ fmuls %f3,%f17,%f28 /* 0x0318 */ ld [%fp-4],%f17 /* 0x031c */ fadds %f14,%f7,%f13 /* 0x0320 */ fmuls %f8,%f16,%f3 /* 0x0324 */ ld [%fp-76],%f14 /* 0x0328 */ fadds %f1,%f15,%f26 /* 0x032c */ fadds %f23,%f18,%f2 /* 0x0330 */ fmuls %f24,%f22,%f23 /* 0x0334 */ fadds %f12,%f0,%f11 /* 0x0338 */ fmuls %f24,%f16,%f1 /* 0x033c */ fadds %f5,%f29,%f18 /* 0x0340 */ fmuls %f24,%f14,%f4 /* 0x0344 */ fadds %f20,%f31,%f10 /* 0x0348 */ fmuls %f8,%f22,%f31 /* 0x034c */ fadds %f26,%f6,%f7 /* 0x0350 */ fmuls %f17,%f14,%f24 /* 0x0354 */ fadds %f27,%f9,%f9 /* 0x0358 */ fmuls %f8,%f14,%f27 /* 0x035c */ fadds %f25,%f19,%f15 /* 0x0360 */ fmuls %f17,%f22,%f26 /* 0x0364 */ fadds %f2,%f28,%f12 /* 0x0368 */ fmuls %f17,%f16,%f5 /* 0x036c */ fadds %f21,%f4,%f30 /* 0x0370 */ st %f30,[%i5+8] /* 0x0374 */ fadds %f13,%f23,%f19 /* 0x0378 */ st %f19,[%g2+%lo(.LI195)] /* 0x037c */ fadds %f15,%f1,%f25 /* 0x0380 */ st %f25,[%i5+4] /* 0x0384 */ fadds %f9,%f27,%f29 /* 0x0388 */ st %f29,[%i5+20] /* 0x038c */ fadds %f18,%f31,%f20 /* 0x0390 */ st %f20,[%i5+12] /* 0x0394 */ fadds %f10,%f3,%f0 /* 0x0398 */ st %f0,[%i5+16] /* 0x039c */ fadds %f11,%f24,%f6 /* 0x03a0 */ st %f6,[%i5+32] /* 0x03a4 */ fadds %f7,%f26,%f28 /* 0x03a8 */ st %f28,[%i5+24] /* 0x03ac */ fadds %f12,%f5,%f21 /* 0x03b0 */ st %f21,[%i5+28] /* 0x03b4 */ ret ! Result = %i0 /* 0x03b8 */ restore %g0,%g0,%g0 /* 0x03bc 0 */ .type main,2 /* 0x03bc 0 */ .size main,(.-main) /* 0x03bc 0 */ .global __fsr_init_value /* 0x03bc */ __fsr_init_value=1 .section ".rodata",#alloc,#progbits .section ".bss",#alloc,#write,#nobits .section ".text",#alloc,#execinstr,#progbits .section ".rodata",#alloc,#progbits .section ".bss",#alloc,#write,#nobits .section ".text%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_" .section ".group%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_" .section ".text",#alloc,#execinstr,#progbits .section ".rodata",#alloc,#progbits .section ".bss",#alloc,#write,#nobits .section ".text%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_",#alloc,#execinstr /* 000000 0 */ .align 32 ! FILE /development/WS9.0/SUNWspro/prod/include/CC/Cstd/./ostream ! 1 !// -*- C++ -*- ! 2 !#ifndef __STD_OSTREAM__ ! 3 !#define __STD_OSTREAM__ ! 5 !/*************************************************************************** ! 6 ! * ! 7 ! * ostream - Declarations for the Standard Library ostream classes ! 8 ! * ! 9 ! *************************************************************************** ! 10 ! * ! 11 ! * Copyright (c) 1994-1999 Rogue Wave Software, Inc. All Rights Reserved. ! 12 ! * ! 13 ! * This computer software is owned by Rogue Wave Software, Inc. and is ! 14 ! * protected by U.S. copyright laws and other laws and by international ! 15 ! * treaties. This computer software is furnished by Rogue Wave Software, ! 16 ! * Inc. pursuant to a written license agreement and may be used, copied, ! 17 ! * transmitted, and stored only in accordance with the terms of such ! 18 ! * license and with the inclusion of the above copyright notice. This ! 19 ! * computer software or any other copies thereof may not be provided or ! 20 ! * otherwise made available to any other person. ! 21 ! * ! 22 ! * U.S. Government Restricted Rights. This computer software is provided ! 23 ! * with Restricted Rights. Use, duplication, or disclosure by the ! 24 ! * Government is subject to restrictions as set forth in subparagraph (c) ! 25 ! * (1) (ii) of The Rights in Technical Data and Computer Software clause ! 26 ! * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the ! 27 ! * Commercial Computer Software – Restricted Rights at 48 CFR 52.227-19, ! 28 ! * as applicable. Manufacturer is Rogue Wave Software, Inc., 5500 ! 29 ! * Flatiron Parkway, Boulder, Colorado 80301 USA. ! 30 ! * ! 31 ! **************************************************************************/ ! 33 !#ifndef __STD_RWCOMPILER_H__ ! 34 !#include ! 35 !#endif ! 37 !#ifdef _RW_STD_IOSTREAM ! 39 !#include ! 40 !#include ! 42 !#pragma disable_warn ! 44 !#ifndef _RWSTD_NO_NAMESPACE ! 45 !namespace std { ! 46 !#endif ! 48 ! extern ostream _RWSTDExport cout; ! 49 ! extern ostream _RWSTDExport cerr; ! 51 !#ifndef _RWSTD_NO_WIDE_CHAR ! 52 ! extern wostream _RWSTDExport wcout; ! 53 ! extern wostream _RWSTDExport wcerr; ! 54 !#endif ! 56 !template ! 57 !inline bool __rw_is_out(basic_ostream* s); ! 58 !inline bool __rw_is_out(basic_ostream >* s); ! 59 !#ifndef _RWSTD_NO_WIDE_CHAR ! 60 !inline bool __rw_is_out(basic_ostream >* s); ! 61 !#endif ! 62 !template ! 63 !inline bool __rw_is_err(basic_ostream* s); ! 64 !inline bool __rw_is_err(basic_ostream >* s); ! 65 !#ifndef _RWSTD_NO_WIDE_CHAR ! 66 !inline bool __rw_is_err(basic_ostream >* s); ! 67 !#endif ! 69 ! /* ! 70 ! * Class basic_ostream ! 71 ! */ ! 72 ! ! 73 ! template ! 74 ! class _RWSTDExportTemplate basic_ostream : virtual public basic_iosts> ! 75 ! { ! 77 ! public: ! 78 ! // ! 79 ! // Types: ! 80 ! // ! 81 ! typedef charT char_type; ! 82 ! typedef _TYPENAME traits::int_type int_type; ! 83 ! typedef _TYPENAME traits::pos_type pos_type; ! 84 ! typedef _TYPENAME traits::off_type off_type; ! 85 ! typedef traits traits_type; ! 86 ! ! 87 ! typedef basic_ostream ostream_type; ! 88 ! typedef basic_ios ios_type; ! 90 ! _EXPLICIT basic_ostream(basic_streambuf *sb); ! 91 ! _EXPLICIT basic_ostream(EmptyCtor) : basic_ios(1) {} ! 92 ! virtual ~basic_ostream(); ! 94 ! class sentry { ! 95 ! public: ! 96 ! inline _EXPLICIT ! 97 ! sentry(basic_ostream& stream) ! 98 ! : __stream(stream) ! 99 ! { ! 100 ! ! 101 ! streambuf_type* sb = stream.rdbuf(); ! 102 ! if ( sb ) { ! 103 ! stream.rdbuf()->buffer_mutex_.acquire(); ! 104 ! } ! 105 ! try { ! 106 ! ostream_type* ost = stream.tie(); ! 107 ! if (ost && ost->rdbuf() != sb) ! 108 ! ost->flush(); ! 110 ! if ( stream.is_synch() ) ! 111 ! { ! 112 ! if ( __rw_is_out(&stream) ) ! 113 ! { ! 114 ! fflush(stdout); ! 115 ! } ! 116 ! if ( __rw_is_err(&stream) ) ! 117 ! { ! 118 ! fflush(stderr); ! 119 ! } ! 120 ! } ! 122 ! if ( stream.rdbuf() ) ! 123 ! { ! 124 ! if ( stream.rdbuf()->which_open_mode( ) & ios_base::app ) ! 125 ! stream.rdbuf()->pubseekoff(0,ios_base::end,ios_base::out); ! 126 ! } ! 128 ! if ( ! (ok_ = stream.good()) ) ! 129 ! stream.setstate(ios_base::badbit); ! 131 !#if defined (_RWSTD_MULTI_THREAD) && !defined (_RWSTD_NO_EXCEPTIONS) ! 132 ! } catch(...) ! 133 ! { ! 134 ! if ( __stream.rdbuf() ) ! 135 ! #ifdef _USE_RWSTDGuard_IN_SENTRY ! 136 ! delete __guard; ! 137 ! #else ! 138 ! __stream.rdbuf()->buffer_mutex_.release(); ! 139 ! #endif ! 140 ! throw; ! 141 ! } ! 142 !#endif // _RWSTD_MULTI_THREAD etc. ! 144 ! } ! 146 ! ~sentry() { ! 147 ! if( __stream.flags() & ios_base::unitbuf) ! 148 ! { ! 149 ! if ( __stream.rdbuf()->pubsync() == -1 ) ! 150 ! __stream.setstate(ios_base::badbit); ! 151 ! } ! 153 ! if ( __stream.is_synch() ) ! 154 ! { ! 156 ! if ( __rw_is_out(&__stream) || __rw_is_err(&__stream) ) ! 157 ! { ! 158 ! if ( __stream.rdbuf()->pubsync() == -1 ) ! 159 ! __stream.setstate(ios_base::badbit); ! 160 ! } ! 161 ! } ! 163 !#ifdef _RWSTD_MULTI_THREAD ! 164 ! if ( __stream.rdbuf() ) { ! 165 ! #ifdef _USE_RWSTDGuard_IN_SENTRY ! 166 ! delete __guard; ! 167 ! #else ! 168 ! __stream.rdbuf()->buffer_mutex_.release(); ! 169 ! #endif ! 170 ! } ! 171 !#endif // _RWSTD_MULTI_THREAD ! 172 ! } ! 173 ! operator bool () const { return ok_; } ! 175 ! private: ! 176 ! sentry(const sentry&); // not defined ! 177 ! sentry& operator=(const sentry&); // not defined ! 178 ! basic_ostream& __stream; ! 179 ! bool ok_; ! 180 !#ifdef _RWSTD_MULTI_THREAD ! 181 ! #ifdef _USE_RWSTDGuard_IN_SENTRY ! 182 ! _RWSTDGuard* __guard; ! 183 ! #else ! 184 ! _RWSTDGuard* __guard_not_used; ! 185 ! #endif ! 186 !#endif ! 187 ! }; ! 189 ! ostream_type& operator<<(ostream_type& (*pf)(ostream_type&)); ! 190 ! ostream_type& operator<<(ios_base& (*pf)(ios_base&)); ! 191 ! ostream_type& operator<<(ios_type& (*pf)(ios_type&)); ! 193 !#ifndef _RWSTD_NO_BOOL ! 194 ! ostream_type& operator<<(bool n); ! 195 !#endif ! 196 ! ostream_type& operator<<(short n); ! 197 ! ostream_type& operator<<(unsigned short n); ! 198 ! ostream_type& operator<<(int n); ! 199 ! ostream_type& operator<<(unsigned int n); ! 200 ! ostream_type& operator<<(long n); ! 201 ! ostream_type& operator<<(unsigned long n); ! 202 ! ostream_type& operator<<(float f); ! 203 ! ostream_type& operator<<(double f); ! 204 ! ostream_type& operator<<(long double f); ! 205 !#ifdef _RWSTD_LONG_LONG ! 206 ! ostream_type& operator<<(unsigned _RWSTD_LONG_LONG n); ! 207 ! ostream_type& operator<<(_RWSTD_LONG_LONG n); ! 208 !#endif ! 209 ! ostream_type& operator<<(const void *p); ! 210 ! ! 211 ! ostream_type& operator<<(basic_streambuf& sb) ! 212 ! { ! 213 ! ios_base::iostate err = 0; ! 215 !#ifndef _RWSTD_NO_EXCEPTIONS ! 216 ! try { ! 217 !#endif ! 218 ! if ( !(sb.which_open_mode() & ios_base::in) ) ! 219 ! err = ios_base::failbit; ! 220 ! else ! 221 ! { ! 222 ! _TYPENAME basic_ostream::sentry opfx(*this); ! 224 ! if(opfx) ! 225 ! { ! 226 ! if ( traits::eq_int_type(sb.sgetc(),traits::eof())) ! 227 ! err = ios_base::failbit; ! 228 ! else { ! 229 ! int_type c; ! 230 ! while( !traits::eq_int_type( (c = sb.sbumpc()),traits::eof()) ) ! 231 ! { ! 232 ! if( traits::eq_int_type(this->rdbuf()->sputc(c),traits::eof()) ) ! 233 ! { ! 234 ! err = ios_base::failbit; ! 235 ! break; ! 236 ! } ! 237 ! } ! 238 ! } ! 239 ! } ! 240 ! } ! 242 !#ifndef _RWSTD_NO_EXCEPTIONS ! 243 ! } ! 244 !#endif ! 246 !#ifndef _RWSTD_NO_EXCEPTIONS ! 247 ! catch(...) ! 248 ! { ! 249 ! bool flag = false; ! 250 ! try { ! 251 ! this->setstate(ios_base::badbit); ! 252 ! } ! 253 ! catch( ios_base::failure ) { flag= true; } ! 254 ! if ( flag ) throw; ! 255 ! } ! 256 !#endif ! 257 ! if ( err ) this->setstate(err); ! 258 ! return *this; ! 259 ! } ! 261 ! ostream_type& operator<<(basic_streambuf *sb) ! 262 ! { ! 263 ! ios_base::iostate err = 0; ! 265 !#ifndef _RWSTD_NO_EXCEPTIONS ! 266 ! try { ! 267 !#endif ! 268 ! if (sb) ! 269 ! { ! 270 ! if ( !(sb->which_open_mode() & ios_base::in) ) ! 271 ! err = ios_base::failbit; ! 272 ! else ! 273 ! { ! 274 ! _TYPENAME basic_ostream::sentry opfx(*this); ! 276 ! if(opfx) ! 277 ! { ! 278 ! if ( traits::eq_int_type(sb->sgetc(),traits::eof())) ! 279 ! err = ios_base::failbit; ! 280 ! else { ! 281 ! int_type c; ! 282 ! while( !traits::eq_int_type( (c = sb->sbumpc()),traits::eof())) ! 283 ! { ! 284 ! if( traits::eq_int_type(this->rdbuf()->sputc(c),traits::eof())) ! 285 ! { ! 286 ! err = ios_base::failbit; ! 287 ! break; ! 288 ! } ! 289 ! } ! 290 ! } ! 291 ! } ! 292 ! } ! 293 ! } ! 294 ! else ! 295 ! err = ios_base::badbit; ! 297 !#ifndef _RWSTD_NO_EXCEPTIONS ! 298 ! } ! 299 !#endif ! 301 !#ifndef _RWSTD_NO_EXCEPTIONS ! 302 ! catch(...) ! 303 ! { ! 304 ! bool flag = false; ! 305 ! try { ! 306 ! this->setstate(ios_base::badbit); ! 307 ! } ! 308 ! catch( ios_base::failure ) { flag= true; } ! 309 ! if ( flag ) throw; ! 310 ! } ! 311 !#endif ! 312 ! if ( err ) this->setstate(err); ! 313 ! return *this; ! 314 ! } ! 316 ! ostream_type& put(char_type c); ! 317 ! ostream_type& write(const char_type *s, streamsize n); ! 318 ! ostream_type& flush(); ! 320 ! ostream_type& seekp(pos_type pos) ! 321 ! { ! 322 !#ifdef _RWSTD_MULTI_THREAD ! 323 ! if ( this->rdbuf() ) { ! 324 !# ifndef __TURBOC__ ! 325 ! _RWSTDGuard guard(this->rdbuf()->buffer_mutex_); ! 326 !# else ! 327 ! STDGUARD(this->rdbuf()->buffer_mutex_); ! 328 !# endif // __TURBOC__ ! 329 !#endif // _RWSTD_MULTI_THREAD ! 331 ! if ( this->fail() ) return *this; ! 333 ! this->rdbuf()->pubseekpos(pos, ios_base::out); ! 334 !#ifdef _RWSTD_MULTI_THREAD ! 335 ! } ! 336 !#endif // _RWSTD_MULTI_THREAD ! 338 ! return *this; ! 339 ! } ! 341 ! ostream_type& seekp(off_type , ios_base::seekdir ); ! 342 ! pos_type tellp(); ! 343 ! ! 344 !#ifdef _RWSTD_MULTI_THREAD ! 345 ! _RWSTDGuard *ostream_sentry_guard; ! 346 !#endif ! 347 ! protected: ! 348 ! basic_ostream(); ! 349 !#ifdef _RWSTD_PROTECTED_OSTREAM_COPY_CONSTRUCTOR ! 350 ! basic_ostream(const basic_ostream&); ! 351 !#endif ! 352 ! }; ! 356 ! inline bool __rw_is_out(basic_ostream >* s) ! 357 ! { return (void*)s == (void*)&cout; } ! 358 !#ifndef _RWSTD_NO_WIDE_CHAR ! 359 ! inline bool __rw_is_out(basic_ostream >* s) ! 360 ! { return (void*)s == (void*)&wcout; } ! 361 !#endif ! 363 ! inline bool __rw_is_err(basic_ostream >* s) ! 364 ! { return (void*)s == (void*)&cerr; } ! 365 !#ifndef _RWSTD_NO_WIDE_CHAR ! 366 ! inline bool __rw_is_err(basic_ostream >* s) ! 367 ! { return (void*)s == (void*)&wcerr; } ! 368 !#endif ! 370 ! template ! 371 ! inline bool __rw_is_out(basic_ostream* s) ! 372 ! { return false; } ! 374 ! template ! 375 ! inline bool __rw_is_err(basic_ostream* s) ! 376 ! { return false; } ! 379 ! // ! 380 ! // Class ostream_iterator ! 381 ! // ! 383 !#ifndef _MSC_VER ! 384 ! template ! 385 !#else ! 386 ! template > ! 387 !#endif ! 388 ! class _RWSTDExportTemplate ostream_iterator ! 389 ! : public iterator ! 390 ! { ! 391 ! protected: ! 393 ! basic_ostream* __stream; ! 394 ! const charT* __str; ! 396 ! public: ! 397 ! // ! 398 ! //Types: ! 399 ! // ! 400 ! typedef T value_type; ! 401 ! typedef charT char_type; ! 402 ! typedef traits traits_type; ! 403 ! typedef basic_ostream ostream_type; ! 405 ! ostream_iterator (basic_ostream& s) ! 406 ! : __stream(&s),__str(0) ! 407 ! { ; } ! 408 ! ostream_iterator (basic_ostream& s,const charT* c) ! 409 ! : __stream(&s), __str((charT *)c) ! 410 ! { ; } ! 411 ! ostream_iterator ( const ostream_iterator& x ) ! 412 ! : __stream(x.__stream) , __str(x.__str) ! 413 ! { ; } ! 414 ! ostream_iterator& operator= (const T& value) ! 415 ! { ! 416 ! *__stream << (T)value; ! 417 ! if (__str) *__stream << __str; ! 418 ! return *this; ! 419 ! } ! 420 ! ostream_iterator& operator* () { return *this; } ! 421 ! ostream_iterator& operator++ () { return *this; } ! 422 ! ostream_iterator& operator++ (int) { return *this; } ! 423 ! }; ! 426 !#ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES ! 427 ! typedef basic_ostream ostream; ! 428 !#else ! 429 ! typedef basic_ostream > ostream; ! 430 !#endif ! 431 ! ! 432 !#ifndef _RWSTD_NO_WIDE_CHAR ! 433 !#ifndef _RWSTD_NO_COMPLEX_DEFAULT_TEMPLATES ! 434 ! typedef basic_ostream wostream; ! 435 !#else ! 436 ! typedef basic_ostream > wostream; ! 437 !#endif ! 438 !#endif ! 440 ! // charT and charT* insertors ! 442 ! template ! 443 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamharT, traits>&, ! 444 ! charT ); ! 446 !#ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 448 ! template ! 449 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamharT, traits>&, ! 450 ! char ); ! 452 !#ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC ! 453 ! template ! 454 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 455 ! char ); ! 456 !#else ! 457 ! ostream& _RWSTDExport operator<< ( ostream&, char ); ! 458 !#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC ! 459 !#endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 462 ! template ! 463 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamharT, traits>&, ! 464 ! const charT* ); ! 466 !#ifndef _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 468 ! template ! 469 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamharT, traits>&, ! 470 ! const char* ); ! 472 !#ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC ! 473 ! template ! 474 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 475 ! const char* ); ! 476 !#else ! 477 ! ostream& _RWSTDExport operator<< ( ostream&, const char* ); ! 478 !#endif // _RWSTD_NO_FUNC_PARTIAL_SPEC ! 479 !#endif // _RWSTD_NO_OVERLOAD_OF_TEMPLATE_FUNCTION ! 481 ! /* ! 482 ! * signed and unsigned insertors ! 483 ! */ ! 484 ! ! 485 !#ifndef _RWSTD_NO_SIGNED_CHAR_IN_STREAMS ! 486 ! template ! 487 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 488 ! unsigned char ); ! 490 ! template ! 491 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 492 ! signed char ); ! 494 ! template ! 495 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 496 ! const unsigned c ! 496 >har* ); ! 498 ! template ! 499 ! basic_ostream& _RWSTDExportTemplate operator<< ( basic_ostreamar, traits>&, ! 500 ! const signed cha ! 500 >r* ); ! 501 !#endif // _RWSTD_NO_SIGNED_CHAR_IN_STREAMS ! 503 ! /* ! 504 ! * String insertor ! 505 ! */ ! 506 ! template ! 507 ! inline basic_ostream& ! 508 ! operator<< (basic_ostream& os, ! 509 ! const basic_string& s) ! 510 ! { ! 511 ! ios_base::iostate err = 0; ! 513 !#ifndef _RWSTD_NO_EXCEPTIONS ! 514 ! try { ! 515 !#endif ! 516 ! ! 517 ! _TYPENAME basic_ostream::sentry opfx(os); ! 518 ! if (opfx) ! 519 ! { ! 520 ! int dlen = (int)s.length(); ! 521 ! int pad = (int)os.width() - dlen; ! 523 ! // place right padding ! 524 ! if( !(os.flags() & ios_base::adjustfield) || os.flags() & ios_base::right ) ! 525 ! { ! 526 ! while(--pad >= 0) ! 527 ! { ! 528 ! if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) { ! 529 ! err = ios_base::badbit; ! 530 ! break; ! 531 ! } ! 532 ! } ! 533 ! } ! 534 ! ! 535 ! // output internal padding ! 536 ! if(os.good() && (os.flags() & ios_base::internal)) ! 537 ! { ! 538 ! while(--pad >= 0) ! 539 ! { ! 540 ! if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) ! 541 ! { ! 542 ! err = ios_base::badbit; ! 543 ! break; ! 544 ! } ! 545 ! } ! 546 ! } ! 548 ! if(os.good() && dlen) { ! 549 ! if(os.rdbuf() && (os.rdbuf()->sputn(s.c_str(), dlen) != dlen)) ! 550 ! err = ios_base::badbit; ! 551 ! } ! 553 ! // output left padding. ! 554 ! if(os.good() && (os.flags() & ios_base::left)) ! 555 ! { ! 556 ! while(--pad >= 0) ! 557 ! { ! 558 ! if( traits::eq_int_type(os.rdbuf()->sputc(os.fill()),traits::eof())) ! 559 ! { ! 560 ! err = ios_base::badbit; ! 561 ! break; ! 562 ! } ! 563 ! } ! 564 ! } ! 566 ! os.width(0); ! 567 ! } ! 569 !#ifndef _RWSTD_NO_EXCEPTIONS ! 570 ! } ! 571 !#endif ! 573 !#ifndef _RWSTD_NO_EXCEPTIONS ! 574 ! catch(...) ! 575 ! { ! 576 ! bool flag = false; ! 577 ! try { ! 578 ! os.setstate(ios_base::badbit); ! 579 ! } ! 580 ! catch( ios_base::failure ) { flag= true; } ! 581 ! if ( flag ) throw; ! 582 ! } ! 583 !#endif ! 585 ! if ( err ) os.setstate(err); ! 587 ! return os; ! 588 ! } ! 592 ! extern ostream _RWSTDExport cout; ! 593 ! extern ostream _RWSTDExport cerr; ! 594 ! extern ostream _RWSTDExport clog; ! 596 ! /* ! 597 ! * declare a couple of standard manipulators ! 598 ! * global functions ! 599 ! */ ! 600 ! ! 601 ! template ! 602 ! inline basic_ostream& ! 603 ! endl(basic_ostream& os) ! 604 ! { ! ! SUBROUTINE __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_ ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_ __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_: /* 000000 604 */ save %sp,-96,%sp ! 605 ! os.put( charT('\n') ); /* 0x0004 605 */ or %g0,10,%o1 /* 0x0008 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Dput6Mc_r1_ ! params = %o0 %o1 ! Result = /* 0x000c */ or %g0,%i0,%o0 ! 606 ! os.flush(); /* 0x0010 606 */ call __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Fflush6M_r1_ ! params = %o0 ! Result = /* 0x0014 */ or %g0,%i0,%o0 ! 607 ! return os; /* 0x0018 607 */ ret ! Result = %i0 /* 0x001c */ restore %g0,%g0,%g0 /* 0x0020 0 */ .type __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,2 /* 0x0020 0 */ .size __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,(.-__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_) .section ".group%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_" /* 0x0020 0 */ .group __1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_,".text%__1cDstdEendl4Ccn0ALchar_traits4Cc___6Frn0ANbasic_ostream3CTACTB___4_",#comdat ! Begin Disassembling Debug Info .xstabs ".stab.index","V=9.0;DBG_GEN=4.14.28;dm;cd;backend;ptf;ptx;ptk;s;;O;R=5.6<>;A=2",60,0,0,0 .xstabs ".stab.index","/home/cheung/teaching/web/561/Syllabus/3-C/Progs/; /development/WS9.0/SUNWspro/prod/bin/CC -S -fast -xs operator04.C -Qoption ccfe -prefix -Qoption ccfe \\$XAIYJjqB8MJCWoH.",52,0,0,0 .xstabs ".stab.index","main",42,0,0,0 ! End Disassembling Debug Info ! Begin Disassembling Ident .ident "@(#)feature_tests.h\t1.18\t99/07/26 SMI" ! (/tmp/ccfe.18336.1.s:2) .ident "@(#)isa_defs.h\t1.20\t99/05/04 SMI" ! (/tmp/ccfe.18336.1.s:3) .ident "@(#)stddef.h\t1.16\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:4) .ident "@(#)stddef_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:5) .ident "@(#)stdarg.h\t1.45\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:6) .ident "@(#)stdarg_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:7) .ident "@(#)va_list.h\t1.13\t01/02/08 SMI" ! (/tmp/ccfe.18336.1.s:8) .ident "@(#)string.h\t1.24\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:9) .ident "@(#)string_iso.h\t1.2\t99/11/09 SMI" ! (/tmp/ccfe.18336.1.s:10) .ident "@(#)ctype.h\t1.33\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:11) .ident "@(#)ctype_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:12) .ident "@(#)wchar.h\t1.35\t01/10/17 SMI" ! (/tmp/ccfe.18336.1.s:13) .ident "@(#)wchar_iso.h\t1.2\t99/11/10 SMI" ! (/tmp/ccfe.18336.1.s:14) .ident "@(#)stdio_tag.h\t1.3\t98/04/20 SMI" ! (/tmp/ccfe.18336.1.s:15) .ident "@(#)wchar_impl.h\t1.3\t99/07/26 SMI" ! (/tmp/ccfe.18336.1.s:16) .ident "@(#)time_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:17) .ident "@(#)wctype.h\t1.18\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:18) .ident "@(#)wctype_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:19) .ident "@(#)stdlib.h\t1.48\t00/04/13 SMI" ! (/tmp/ccfe.18336.1.s:20) .ident "@(#)stdlib_iso.h\t1.3\t01/03/09 SMI" ! (/tmp/ccfe.18336.1.s:21) .ident "@(#)limits.h\t1.53\t03/08/07 SMI" ! (/tmp/ccfe.18336.1.s:22) .ident "@(#)limits_iso.h\t1.1\t99/08/09 SMI" ! (/tmp/ccfe.18336.1.s:23) .ident "@(#)int_limits.h\t1.6\t99/08/06 SMI" ! (/tmp/ccfe.18336.1.s:24) .ident "@(#)synch.h\t1.52\t01/11/10 SMI" ! (/tmp/ccfe.18336.1.s:25) .ident "@(#)machlock.h\t1.22\t01/10/31 SMI" ! (/tmp/ccfe.18336.1.s:26) .ident "@(#)types.h\t1.75\t04/01/06 SMI" ! (/tmp/ccfe.18336.1.s:27) .ident "@(#)machtypes.h\t1.13\t99/05/04 SMI" ! (/tmp/ccfe.18336.1.s:28) .ident "@(#)int_types.h\t1.6\t97/08/20 SMI" ! (/tmp/ccfe.18336.1.s:29) .ident "@(#)select.h\t1.17\t01/08/15 SMI" ! (/tmp/ccfe.18336.1.s:30) .ident "@(#)time.h\t2.71\t03/08/07 SMI" ! (/tmp/ccfe.18336.1.s:31) .ident "@(#)time.h\t1.39\t99/08/10 SMI" ! (/tmp/ccfe.18336.1.s:32) .ident "@(#)time_impl.h\t1.7\t01/09/06 SMI" ! (/tmp/ccfe.18336.1.s:33) .ident "@(#)privregs.h\t1.5\t99/06/05 SMI" ! (/tmp/ccfe.18336.1.s:34) .ident "@(#)psr.h\t1.3\t96/09/12 SMI" ! (/tmp/ccfe.18336.1.s:35) .ident "@(#)fsr.h\t1.3\t97/02/11 SMI" ! (/tmp/ccfe.18336.1.s:36) .ident "@(#)synch.h\t1.39\t01/06/12 SMI" ! (/tmp/ccfe.18336.1.s:37) .ident "@(#)thread.h\t1.47\t98/08/14 SMI" ! (/tmp/ccfe.18336.1.s:38) .ident "@(#)signal.h\t1.56\t01/05/28 SMI" ! (/tmp/ccfe.18336.1.s:39) .ident "@(#)signal_iso.h\t1.2\t01/04/05 SMI" ! (/tmp/ccfe.18336.1.s:40) .ident "@(#)unistd.h\t1.39\t01/07/29 SMI" ! (/tmp/ccfe.18336.1.s:41) .ident "@(#)siginfo.h\t1.55\t01/04/05 SMI" ! (/tmp/ccfe.18336.1.s:42) .ident "@(#)machsig.h\t1.15\t99/08/15 SMI" ! (/tmp/ccfe.18336.1.s:43) .ident "@(#)stdio.h\t1.79\t01/04/16 SMI" ! (/tmp/ccfe.18336.1.s:44) .ident "@(#)stdio_iso.h\t1.2\t99/10/25 SMI" ! (/tmp/ccfe.18336.1.s:45) .ident "@(#)stdio_impl.h\t1.13\t01/11/16 SMI" ! (/tmp/ccfe.18336.1.s:46) .ident "@(#)math.h\t2.11\t00/09/07 SMI" ! (/tmp/ccfe.18336.1.s:47) .ident "@(#)math_iso.h\t1.3\t03/04/08 SMI" ! (/tmp/ccfe.18336.1.s:48) .ident "@(#)float.h\t1.18\t99/05/04 SMI" ! (/tmp/ccfe.18336.1.s:49) ! End Disassembling Ident