setting up stack frame, regression (gcc 4.1.0) ?

2006-12-04 Thread Kimmo Fredriksson
Hi, Consider this (simplified) test case: int bar (int a) { int b; memcpy (&b, &a, sizeof (int)); return b; } gcc 3.4.3 compiles this to (-O3 -fomit-frame-pointer) bar: movl4(%esp), %eax ret But gcc 4.1.0 (and gcc 4.0.0 as well) generates: bar:

Re: Legitimacy of replacing divide-by-power-of-2 with right shifts.

2006-04-20 Thread Kimmo Fredriksson
On Thu, 20 Apr 2006, Dave Korn wrote: Hello, gcc-hackers! This is somewhat chopped-down from the original code it began life as, but it serves to illustrate the point. unsigned int PhyFrameConfig (unsigned int channelPrf, unsigned int bpp, unsigned int bufferSize) { unsigned int prfShif