On Sun, May 13, 2012 at 10:45 AM, Eric Botcazou <ebotca...@adacore.com> wrote: > Hi, > > this patch has been in our tree for a while and helps in Ada where you can do > block assignments to structures at will. I've attached a C testcase. The > unpatch compiler generates for it on PowerPC at -O2: > > foo: > lis 10,s@ha > li 8,27 > la 9,s@l(10) > stb 8,s@l(10) > li 10,108 > stb 10,1(9) > li 10,-79 > stb 10,2(9) > li 10,-58 > stb 10,3(9) > blr > .size foo, .-foo > .comm s,4,1 > > because it isn't able to put back together the individual initializations. > > The patched compiler generates instead: > > foo: > lis 9,.LANCHOR0@ha > lis 10,s@ha > lwz 9,.LANCHOR0@l(9) > stw 9,s@l(10) > blr > .size foo, .-foo > .comm s,4,1 > > .section .rodata > .set .LANCHOR0,. + 0 > .LC0: > .byte 27 > .byte 108 > .byte 177 > .byte 198 > > > Bootstrapped/regtested on i586-suse-linux, OK for mainline?
Ok. Thanks, Richard. > > 2012-05-13 Eric Botcazou <ebotca...@adacore.com> > > * gimplify.c (gimplify_init_constructor): Do a block move for very > small objects as well. > > > -- > Eric Botcazou