[power-gnu-discuss] On Power : GCC2 optimises better than GCC4??

Mark Mitchell mark at codesourcery.com
Sun Dec 27 20:38:42 UTC 2009


Mark Colby wrote:

> Output under 2.9.5 (powerpc-eabi-gcc-2-9-5 -O3 -S gcc-test.cpp -o
> gcc-test-295.s):
> 
>   lis 3,0x8034
>   blr
> 
> What am I missing? Many thanks if you can shed any light on this.

I don't think you're missing anything, unless "lis" isn't available on
all Power Architecture CPUs.  (I'm not an expert on the architecture, so
I'm not sure.)  If using the appropriate -mcpu option for your CPU
doesn't change the output, then you've probably found a case in which
the compiler has indeed gotten worse.

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the power-gnu-discuss mailing list