This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Comments in assember output


> > >That's the way that gcc works.  The optimizers rearrange the functions
> > >and output them in dependency order.  "-fno-unit-at-a-time" might
> > >help.
> > 
> > Even if I don't use optimization?
>
>Yes, we always output stuff in dep order.
>
> > But it didn't help either, still big blocks of code. With
> > -fverbose-asm I see the switch on and off, but the rest of the
> > output is exactly the same.
>
>Don't know why this is.

I think it's because of some static initializing code. Here's a snippet
(Last code line in cpp is on 161):

 159:N:/Indel-PPC/Tests/gccext3/applicat/src/CTaskTemplateClass.cpp **** 
 160:N:/Indel-PPC/Tests/gccext3/applicat/src/CTaskTemplateClass.cpp ****        // end _TASK_CLASS_NAME_::Action
 161:N:/Indel-PPC/Tests/gccext3/applicat/src/CTaskTemplateClass.cpp **** }
 153                            .loc 3 161 0
 154 0000 9421FFD8              stwu 1,-40(1)    #,,
 155                    .LCFI8:
 156 0004 7C0802A6              mflr 0   #,
 157                    .LCFI9:
 158 0008 93E10024              stw 31,36(1)     #,
 159                    .LCFI10:
 160 000c 9001002C              stw 0,44(1)      #,
 161                    .LCFI11:
 162 0010 7C3F0B78              mr 31,1  #,
 163                    .LCFI12:
 164 0014 907F0018              stw 3,24(31)     # __initialize_p, __initialize_p
 165 0018 909F001C              stw 4,28(31)     # __priority, __priority
...(snip)...
 175                            .loc 3 65 0
 176 003c 3D200000              lis 9,.LC7@ha    # tmp125,
 177 0040 38090064              la 0,.LC7@l(9)   # tmp124,, tmp125
 178 0044 90010008              stw 0,8(1)       #, tmp124
 179 0048 3D200000              lis 9,.LC7@ha    # tmp127,

Various initializing code is put together and starts with the biggest line
number. So it's placed at the end of the source file lines and everything
after that must come later. Don't know...

bye  Fabi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]