.section ".text",#alloc,#execinstr,#progbits .file "pi.c" .section ".bss",#alloc,#write,#nobits Bbss.bss: .section ".data",#alloc,#write,#progbits Ddata.data: .section ".rodata",#alloc,#progbits ! ! CONSTANT POOL ! Drodata.rodata: .section ".rodata1",#alloc,#progbits .align 4 ! ! CONSTANT POOL ! .L102: .ascii "After %d iterations sum = %.8f\n\000" .section ".text",#alloc,#execinstr,#progbits /* 000000 0 */ .align 8 ! ! CONSTANT POOL ! ___const_seg_900000103: /* 000000 0 */ .word 1072693248,0 ! 1.0 /* 0x0008 */ .word 1099421572,0 ! 50,000,000 /* 0x0010 */ .word 1073741824,0 ! 2.0 /* 0x0018 */ .word 1074790400,0 /* 0x0020 */ .word -1074790400,0 /* 0x0028 0 */ .type ___const_seg_900000103,1 /* 0x0028 0 */ .size ___const_seg_900000103,(.-___const_seg_900000103) /* 0x0028 0 */ .align 32 ! FILE pi.c ! 1 !#include <stdio.h> ! 3 !int ! 4 !main(int argv, char **argc) ! 5 !{ ! ! SUBROUTINE main ! ! OFFSET SOURCE LINE LABEL INSTRUCTION .global main main: /* 000000 5 */ save %sp,-112,%sp ! 6 ! double i; ! 7 ! double sum = 0; // Line 7 /* 0x0004 7 */ fzero %f30 /* 0x0008 0 */ sethi %hi(___const_seg_900000103+24),%i5 ! 9 ! for(i=1; i<50000000;) // Line 9 /* 0x000c 9 */ ldd [%i5+%lo(___const_seg_900000103+24)],%f20 /* 0x0010 0 */ add %i5,%lo(___const_seg_900000103+24),%i1 /* 0x0014 9 */ ldd [%i1-24],%f16 ! 1.0 /* 0x0018 */ ldd [%i1-8],%f18 ! 2.0 /* 0x001c */ ldd [%i1-16],%f22 ! 50,000,000 /* 0x0020 12 */ ldd [%i1-24],%f24 ! 1.0 ! 10 ! { ! 11 ! sum = sum + 4.0 / i; i += 2; // Line 11 /* 0x0024 11 */ faddd %f16,%f18,%f10 ! Registers live out of main: ! o1 sp i0 i1 fp i7 gsr ! f10 f11 f16 f17 f18 f19 f20 f21 f22 f23 f24 f25 f30 f31 ! 12 ! sum = sum - 4.0 / i; i += 2; // Line 12 ! predecessor blocks : main .L900000108 .L900000108: /* 0x0028 12 */ fmuld %f10,%f16,%f6 ! i * (i-2) /* 0x002c */ fmuld %f30,%f16,%f4 /* 0x0030 */ fmuld %f20,%f16,%f12 /* 0x0034 */ faddd %f10,%f18,%f16 /* 0x0038 */ fdivd %f24,%f6,%f28 ! f24 = 1.0 /* 0x003c */ faddd %f4,%f20,%f8 /* 0x0040 9 */ fcmped %fcc0,%f16,%f22 /* 0x0044 12 */ fmuld %f8,%f10,%f14 /* 0x0048 */ fsubd %f14,%f12,%f26 /* 0x004c */ fmuld %f28,%f26,%f30 /* 0x0050 9 */ fbl,a,pt %fcc0,.L900000108 /* 0x0054 11 */ faddd %f16,%f18,%f10 ! Registers live out of .L900000108: ! o1 sp i0 i1 fp i7 gsr ! f10 f11 f16 f17 f18 f19 f20 f21 f22 f23 f24 f25 f30 f31 ! 13 ! } ! 15 ! printf("After %d iterations sum = %.8f\n", (int)(i-1)/2, sum); // Line 15 ! predecessor blocks : .L900000108 .L77000023: /* 0x0058 15 */ ldd [%i1+8],%f2 /* 0x005c */ std %f30,[%sp+96] /* 0x0060 */ sethi %hi(.L102),%i5 /* 0x0064 */ add %i5,%lo(.L102),%o0 /* 0x0068 */ faddd %f16,%f2,%f2 /* 0x006c */ fdtoi %f2,%f0 /* 0x0070 */ st %f0,[%sp+104] /* 0x0074 */ add %sp,0,%sp /* 0x0078 */ add %sp,0,%sp /* 0x007c */ add %sp,0,%sp /* 0x0080 */ ldx [%sp+96],%o7 /* 0x0084 */ add %sp,0,%sp /* 0x0088 */ add %sp,0,%sp /* 0x008c */ add %sp,0,%sp /* 0x0090 */ add %sp,0,%sp /* 0x0094 */ ld [%sp+104],%i3 /* 0x0098 */ srl %o7,0,%o3 /* 0x009c */ srlx %o7,32,%o2 /* 0x00a0 */ srl %i3,31,%i4 /* 0x00a4 */ add %i3,%i4,%i2 /* 0x00a8 */ call printf ! params = %o0 %o1 %o2 %o3 ! Result = /* 0x00ac */ sra %i2,1,%o1 ! 17 ! return 0; /* 0x00b0 17 */ ret ! Result = %i0 /* 0x00b4 */ restore %g0,0,%o0 /* 0x00b8 0 */ .type main,2 /* 0x00b8 0 */ .size main,(.-main) /* 0x00b8 0 */ .global __fsr_init_value /* 0x00b8 */ __fsr_init_value=1 ! Begin Disassembling Debug Info ! Begin sdCreateSection : .debug_info ! Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0 ! Section Data Blocks: ! reloc[0]: knd=2, off=6, siz=4, lab1=.debug_abbrev, lab2=, loff=0 ! reloc[1]: knd=2, off=163, siz=4, lab1=.debug_line, lab2=, loff=0 .section ".debug_info" .byte 0x00,0x00,0x00,0xa4,0x00,0x02 .uaword %section_symbol(".debug_abbrev") .byte 0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00 .byte 0x00,0x04,0x70,0x69,0x2e,0x63,0x00,0x0c .byte 0x2f,0x68,0x6f,0x6d,0x65,0x2f,0x66,0x61 .byte 0x63,0x75,0x6c,0x74,0x79,0x2f,0x6b,0x6f .byte 0x70,0x70,0x65,0x6c,0x2f,0x74,0x65,0x61 .byte 0x63,0x68,0x2f,0x63,0x61,0x63,0x6f,0x6d .byte 0x2f,0x6f,0x70,0x74,0x00,0x20,0x2f,0x6f .byte 0x70,0x74,0x2f,0x53,0x55,0x4e,0x57,0x73 .byte 0x70,0x72,0x6f,0x2f,0x70,0x72,0x6f,0x64 .byte 0x2f,0x62,0x69,0x6e,0x2f,0x63,0x63,0x20 .byte 0x2d,0x53,0x20,0x2d,0x66,0x61,0x73,0x74 .byte 0x20,0x20,0x70,0x69,0x2e,0x63,0x00,0x58 .byte 0x61,0x3b,0x4f,0x3b,0x52,0x3d,0x53,0x75 .byte 0x6e,0x20,0x43,0x20,0x35,0x2e,0x38,0x20 .byte 0x32,0x30,0x30,0x35,0x2f,0x31,0x30,0x2f .byte 0x31,0x33,0x3b,0x62,0x61,0x63,0x6b,0x65 .byte 0x6e,0x64,0x3b,0x72,0x61,0x77,0x3b,0x63 .byte 0x64,0x3b,0x00,0x44,0x42,0x47,0x5f,0x47 .byte 0x45,0x4e,0x20,0x35,0x2e,0x30,0x2e,0x38 .byte 0x00 .uaword %section_symbol(".debug_line") .byte 0x00 ! End sdCreateSection ! Begin sdCreateSection : .debug_line ! Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0 ! Section Data Blocks: .section ".debug_line" .byte 0x00,0x00,0x00,0x43,0x00,0x02,0x00,0x00 .byte 0x00,0x3d,0x04,0x00,0xff,0x04,0x0a,0x00 .byte 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x01 .byte 0x2f,0x68,0x6f,0x6d,0x65,0x2f,0x66,0x61 .byte 0x63,0x75,0x6c,0x74,0x79,0x2f,0x6b,0x6f .byte 0x70,0x70,0x65,0x6c,0x2f,0x74,0x65,0x61 .byte 0x63,0x68,0x2f,0x63,0x61,0x63,0x6f,0x6d .byte 0x2f,0x6f,0x70,0x74,0x00,0x00,0x70,0x69 .byte 0x2e,0x63,0x00,0x01,0x00,0x00,0x00 ! End sdCreateSection ! Begin sdCreateSection : .debug_abbrev ! Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0 ! Section Data Blocks: .section ".debug_abbrev" .byte 0x01,0x11,0x00,0x11,0x01,0x12,0x01,0x03 .byte 0x08,0x13,0x0b,0x1b,0x08,0x85,0x44,0x08 .byte 0x87,0x44,0x08,0x25,0x08,0x10,0x06,0x00 .byte 0x00,0x00 ! End sdCreateSection ! End Disassembling Debug Info ! Begin Disassembling Ident .ident "cg: Sun Compiler Common 11 2005/10/13" ! (NO SOURCE LINE) .ident "@(#)stdio.h\t1.84\t04/09/28 SMI" ! (/tmp/acompAAA.677.8xaOub:8) .ident "@(#)feature_tests.h\t1.25\t07/02/02 SMI" ! (/tmp/acompAAA.677.8xaOub:9) .ident "@(#)ccompile.h\t1.2\t04/11/08 SMI" ! (/tmp/acompAAA.677.8xaOub:10) .ident "@(#)isa_defs.h\t1.28\t07/02/01 SMI" ! (/tmp/acompAAA.677.8xaOub:11) .ident "@(#)stdio_iso.h\t1.8\t05/08/16 SMI" ! (/tmp/acompAAA.677.8xaOub:12) .ident "@(#)va_list.h\t1.15\t04/11/19 SMI" ! (/tmp/acompAAA.677.8xaOub:13) .ident "@(#)stdio_tag.h\t1.4\t04/09/28 SMI" ! (/tmp/acompAAA.677.8xaOub:14) .ident "@(#)stdio_impl.h\t1.15\t07/03/05 SMI" ! (/tmp/acompAAA.677.8xaOub:15) .ident "@(#)stdio_c99.h\t1.2\t04/03/29 SMI" ! (/tmp/acompAAA.677.8xaOub:16) .ident "acomp: Sun C 5.8 2005/10/13" ! (/tmp/acompAAA.677.8xaOub:21) .ident "iropt: Sun Compiler Common 11 2005/10/13" ! (/tmp/acompAAA.677.8xaOub:22) .ident "cg: Sun Compiler Common 11 2005/10/13" ! (NO SOURCE LINE) ! End Disassembling Ident