This is the mail archive of the gcc@gcc.gnu.org mailing list for the EGCS project.


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

PowerPC gcc 2.8.1 generate wrong code while compiling linux 2.2.9


Title: PowerPC gcc 2.8.1 generate wrong code while compiling linux 2.2.9

I found the problem while compiling linux 2.2.9 on PowerPC. The file fs/ext2/balloc.c:

        gdp->bg_free_blocks_count = cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) - 1);

Is miscompiled whith gcc 2.8.1, and I always get: gdp>bg_free_blocks_count=-1.
I tried the compiler used by RedHat for PowerPC (a prereleased of egcs 1.0.2), and this new
compiler give the right result. Linux use some asm functions in cpu_to_le16 and le16_to_cpu,
these functions combinated seem to give a bad result.

If you know the most reliable version of gcc to compile linux on PowerPC, and how to make
a cross compiler of GCC-2.9.5 for powerpc on an intel box let me know.

Thanks


LERDA Patrick


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