This is the mail archive of the gcc-bugs@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]

[Bug middle-end/37135] [4.3/4.4 Regression] code size increase for bit-fields assignment



------- Comment #2 from etienne_lorrain at yahoo dot fr  2008-08-17 19:31 -------
 It is not related to bitfields, this also show the problem:
struct color { unsigned char red, green, blue, transparent; } cur_color;
static const struct color mycolor = { 200, 10, 30, 0 };
void fct(void)
{
    cur_color = mycolor;
}
 with gcc-4.3.1 cur_color is initialised with 4 "movb" (so address is encoded 4
times)
 and with gcc-4.2 with a 32 bits constant and a single "movl".

 It seems to be the old problem of gcc not having a "write combining" pass
(converting consecutive byte/word writes into single double word writes), and
the "fix" of defining an intermediate variable is no more working.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37135


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