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 in mips instruction format?


Hi,
    I have made a cross compiler for mipsel-linux, it runs well except that when I compile some programs with the option -O2 some strange instuctions appear.The following is the detail:
    If I choose -O1 instead of -O2,it is normal,the format of the lwl instuction are:
 lwl $2,24($2)
 but when I use -O2,the format changed into:
 lwl $2,$LC59+3
 or 
 lwl $5,gr_palette+3($3)
 These formats cann't be recognized by the assembler, giving the error message"Error: illegal operands `lwl'"
In detail:
My configure file is:
src/gcc-3.2/configure --target=mipsel-linux \
--host=i686-pc-linux-gnu \
         --enable-softfloat \
--enable-languages=c,c++ \
         --with-headers=/usr/local/mipsel-linux/include

For the first wrong format,my command line is:
mipsel-linux-gcc -I /src/linux-2.4.18/include/asm/gcc -D__KERNEL__ -I/src/linux-2.4.18/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -DCONFIG_CPU_MIPS32 -DDEBUG -mips2 -Wa,-mfixhua7,--trap -pipe -c -o ide-pci.o ide-pci.c 
This leads to the format of "lwl $2,$LC59+3"
,the source file is linux-2.4.18/drivers/ide/ide-pci.c;
under this condition ,if I use the option "-fno-gcse",the problem is solved.

For the second wrong format,
the source file is microwin-0.89/src/engine/devdraw.c,the command line is:
mipsel-linux-gcc -c   -DMWPIXEL_FORMAT=MWPF_PALETTE -DHAVE_FILEIO -DHAVE_JPEG_SU
PPORT=1 -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DLINUX=1
 -DUNIX=1 -O -DINVERT4BPP=1 -DTPHELIO=1 -fpic  -I. -I/usr/local/mipsel-linux/sys
-include -I/usr/local/mipsel-linux/include -I/src/microwin-0.89/src/include
But if I use the option -fno-strength-reduce,the problem is solved.

I don't know whether it is a bug.If it isn't,would you like to give me some advice?Thanks for your help!

                                       Yours,
                                    Cui Huimin


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