From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29401 invoked by alias); 23 Sep 2009 13:02:04 -0000 Received: (qmail 29242 invoked by uid 22791); 23 Sep 2009 13:02:04 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-bw0-f225.google.com (HELO mail-bw0-f225.google.com) (209.85.218.225) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Sep 2009 13:01:58 +0000 Received: by bwz25 with SMTP id 25so506697bwz.8 for ; Wed, 23 Sep 2009 06:01:55 -0700 (PDT) Received: by 10.86.220.1 with SMTP id s1mr1998555fgg.50.1253710915259; Wed, 23 Sep 2009 06:01:55 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 4sm255118fgg.13.2009.09.23.06.01.54 (version=SSLv3 cipher=RC4-MD5); Wed, 23 Sep 2009 06:01:54 -0700 (PDT) Message-ID: <4ABA1F9F.5050402@gmail.com> Date: Wed, 23 Sep 2009 13:02:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: daniel tian CC: gcc@gcc.gnu.org, Ian Lance Taylor , peng.zheng@mavrixtech.com Subject: Re: DImode operations References: <121fadb80909230410x71ca0e0co65202ab901266846@mail.gmail.com> In-Reply-To: <121fadb80909230410x71ca0e0co65202ab901266846@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00466.txt.bz2 daniel tian wrote: > Hi: > > Do I have to write the DImode operations on my *.md target description file? Yes. movMM must be implemented for all types that you want the compiler to be able to handle at all; it's the only way it knows to move them around. (Technically, it's supposed to be able to treat DImode as BLKmode and break it down by pieces, but this code hasn't always been reliable and is definitely less efficient than implementing a proper movdi pattern in your backend.) > My target is a RISC32 chip. There is no 64bit operations. And now I > don't wanna any 64bit operations in my C programs. > So do I have to finish the DImode operations? I think you really should. Take a look at how other ports handle it; generally they use a define_expand for movdi, which emits the move as two separate SI-mode move insns. (Note in particular how they have to take care what order to emit the two word moves in, as it's possible for the register pairs used in input and output operations to overlap.) If you insisted, you could probably just hack the *di* routines out of the libgcc makefile and get through to the end of the build, but I really wouldn't recommend it, since "long long" is a standard C99 type. It's not a great deal of work to add the expander pattern and code that you'll need. cheers, DaveK