Bump! Would still be interested in an explanation if somebody has one :-P Regards, Marshall On Mon, Jul 6, 2009 at 11:25 AM, Marshall B. Rogers <mbr@xxxxx> wrote: > > Hi, > > I am in the process of rewriting some old code from ~1998 that was > originally built with GCC (don't know the exact version number). The > goal of the rewrite was to produce faster and more compact code, which > has been an easy task so far considering how well GCC's optimization > ability has progressed since then. Unexpectedly, my new program was > larger than the original, and it turns out that this was due to 32-bit > floating point constants being thrown into '.rodata', loaded from > there, and then stored at their target. So, > lui v0,0x809c > lwc1 $f0,8192(v0) > swc1 $f0,424(s0) > Was being generated, whereas the original 1998 code had this: > lui at,0x3f00 > mtc1 at,$f4 > swc1 $f4,424(s0) > It's also important to note that the above could be simplified down to: > lui at,0x3f00 > sw at,424(s0) > > Is there a switch that controls this behavior? If not, when did GCC > stop behaving this (1998) way, and why? Potential 4-byte instruction > overhead and 4-byte data overhead seems like a big waste to me! > > Regards, > Marshall