From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11147 invoked by alias); 28 Sep 2009 09:39:25 -0000 Received: (qmail 11119 invoked by uid 22791); 28 Sep 2009 09:39:21 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,MIME_CHARSET_FARAWAY,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f185.google.com (HELO mail-pz0-f185.google.com) (209.85.222.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Sep 2009 09:39:16 +0000 Received: by pzk15 with SMTP id 15so2193979pzk.9 for ; Mon, 28 Sep 2009 02:39:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.4.40 with SMTP id 40mr234557wfd.127.1254130754728; Mon, 28 Sep 2009 02:39:14 -0700 (PDT) In-Reply-To: <4ABB8B58.1070904@gmail.com> References: <121fadb80909230410x71ca0e0co65202ab901266846@mail.gmail.com> <4ABA1F9F.5050402@gmail.com> <121fadb80909240005l3e6b5311s5740258ac411a999@mail.gmail.com> <121fadb80909240201q2d6c104eveeacf95787387b8e@mail.gmail.com> <4ABB8B58.1070904@gmail.com> Date: Mon, 28 Sep 2009 10:50:00 -0000 Message-ID: <121fadb80909280239n4c3419afic2baaea3b9a3cd66@mail.gmail.com> Subject: Re: DImode operations From: daniel tian To: Dave Korn Cc: gcc@gcc.gnu.org, Ian Lance Taylor , peng.zheng@mavrixtech.com Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00558.txt.bz2 H=A3=E9Dave: I add the DI, SF, DFpattern. But when build the libgcc2.c, it still cause errors. =A1=A1=A1=A1The error information=A3=BA ../../../rice-gcc-4.3.0/libgcc/../gcc/libgcc2.c: In function '__muldi3': ../../../rice-gcc-4.3.0/libgcc/../gcc/libgcc2.c:557: internal compiler error: in emit_move_insn, at expr.c:3379 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[2]: *** [_muldi3.o] Error 1 make[2]: Leaving directory `/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc/rice-elf/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc' make: *** [all] Error 2 the assert: gcc_assert (mode !=3D BLKmode && (GET_MODE (y) =3D=3D mode || GET_MODE (y) =3D=3D VOIDmode)); in function emit_move_insn cause the error. Because the machine mode in rtx x, y are different. X is SImode, while y is DImode. And I hacked the CRX archtechiture, after deleting all patterns about DI, SF, DF, it can still build successful. So I think the error is not caused by the DI pattern. function __muldi3: #ifdef L_muldi3 DWtype __muldi3 (DWtype u, DWtype v) { //<----------------------------this is the line 557, which error info shows. const DWunion uu =3D {.ll =3D u}; const DWunion vv =3D {.ll =3D v}; DWunion w =3D {.ll =3D __umulsidi3 (uu.s.low, vv.s.low)}; w.s.high +=3D ((UWtype) uu.s.low * (UWtype) vv.s.high + (UWtype) uu.s.high * (UWtype) vv.s.low); return w.ll; } #endif Does this mean error occur in argument passing? I just wanna the gcc build successful first. Then make the define_insn/pattern DI/SF/DF right. Can somebody give me some advice? thanks. And another question. If I wanna debug the gcc when build the file libgcc2.c, the command line the build.log is like this: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -O2 -g -g -O2 -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../../../rice-gcc-4.3.0/libgcc -I../../../rice-gcc-4.3.0/libgcc/. -I../../../rice-gcc-4.3.0/libgcc/../gcc -I../../../rice-gcc-4.3.0/libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../rice-gcc-4.3.0/libgcc/../gcc/libgcc2.c this is huge. but cc1 does not run in this command. I open the xgcc in gdb, it is different from cc1. but run: run -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -O2 -g -g -O2 -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../../../rice-gcc-4.3.0/libgcc -I../../../rice-gcc-4.3.0/libgcc/. -I../../../rice-gcc-4.3.0/libgcc/../gcc -I../../../rice-gcc-4.3.0/libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 ../../../rice-gcc-4.3.0/libgcc/../gcc/libgcc2.c it can be build and the former error shows again. But I just don't know how to make a break point in emit_move_isn, expr.c. Because the expr.c file doesn't appear in the xgcc file. (I debug it with insight.) So anybody also meet the same problem? and how to slove it. Thank you very much. daniel