optimization, powerpc style
kevin diggs
diggskevin38@gmail.com
Tue Feb 15 21:38:00 GMT 2011
Hi,
On Fri, Feb 11, 2011 at 11:15 AM, kevin diggs <diggskevin38@gmail.com> wrote:
>
> In both the 4.2.4 and 4.3.5 versions of mesh, the mesh_start() routine
> has a lengthy list of register assignments near the start of the
> routine:
>
> .L241:
> lis 9,.LANCHOR0@ha # tmp459,
> lis 11,.LC47@ha # tmp461,
> la 23,.LANCHOR0@l(9) # tmp460,, tmp459
> lis 9,.LC48@ha # tmp463,
> la 19,.LC47@l(11) # tmp462,, tmp461
> la 18,.LC48@l(9) # tmp464,, tmp463
> lis 11,.LC16@ha # tmp465,
> lis 9,.LC50@ha # tmp467,
> la 17,.LC16@l(11) # tmp466,, tmp465
> la 22,.LC50@l(9) # tmp468,, tmp467
> lis 11,.LC51@ha # tmp469,
> lis 9,.LC57@ha # tmp471,
> la 21,.LC51@l(11) # tmp470,, tmp469
> la 20,.LC57@l(9) # tmp472,, tmp471
> lis 11,.LC58@ha # tmp473,
> lis 9,.LC59@ha # tmp475,
> la 16,.LC58@l(11) # tmp474,, tmp473
> la 15,.LC59@l(9) # tmp476,, tmp475
> lis 11,.LC60@ha # tmp477,
> lis 9,.LC53@ha # tmp480,
> la 14,.LC60@l(11) # tmp478,, tmp477
> la 24,.LC53@l(9) # tmp482,, tmp480
>
> Later, when one of these is used you'll see:
>
> mr 3,19 #, tmp462
> mr 4,31 #, cmd
> mr 6,28 #, id
> bl printk #
>
> for .LC47, which is "<4>mesh_start: %p ser=%lu tgt=%d cmd="
>
> These all end up in:
>
> .section .rodata.str1.4,"aMS",@progbits,1
>
> and will have addresses close to each other, right? I don't understand
> why they can't do something like:
>
> lis 15,.LANCHOR0@ha
> la 15,.LANCHOR0@l(15)
>
> and then do something like:
>
> la 3,<some offset>(15)
>
> when each string is used. What am I missing?
>
> The above register loads also result in:
>
> stmw 14,8(1) #,
> and
> lmw 14,8(1) #,
>
> for 4.3.5. A smaller set is saved in 4.1.2
>
> stmw 25,20(1) #,
> and
> lmw 25,20(1) #,
>
> Won't this lead to unneeded memory traffic and/or cache churning?
>
> kevin
>
> P.S.: For all those who send email from their Blackberry's and iphones:
>
> Sent from my 33 MHz 386 using Firefox 2!
>
Is this something I could have caused by screwing up the build of the
4.3.5 compiler?
Thanks!
kevin
P.S.: NOT sent from my 33 MHz 386 (currently off - but I may play
Atarisoft Pacman later today) nor Firefox2
More information about the Gcc-help
mailing list