From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1946 invoked by alias); 16 Feb 2006 03:34:09 -0000 Received: (qmail 1938 invoked by uid 22791); 16 Feb 2006 03:34:08 -0000 X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 16 Feb 2006 03:34:08 +0000 Received: (qmail 36303 invoked by uid 20157); 16 Feb 2006 03:34:05 -0000 Date: Thu, 16 Feb 2006 03:34:00 -0000 From: Hans-Peter Nilsson To: DJ Delorie cc: tnt@246tNt.com, gcc@gcc.gnu.org Subject: Re: Design a microcontroller for gcc In-Reply-To: <200602160321.k1G3LHVm032715@greed.delorie.com> Message-ID: References: <43F2666E.70703@246tNt.com> <43F3C6F8.7080007@246tNt.com> <200602160321.k1G3LHVm032715@greed.delorie.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00278.txt.bz2 On Wed, 15 Feb 2006, DJ Delorie wrote: > > BTW, carry-out from shifts is very rarely used in compiled code.) > Unless you've expanded SI shifts into a pair of HI shifts. > > > Besides what DJ said about performance (both pros and cons > > there), the problem is as I said with port complexity, because > > of the way you have to handle condition codes in gcc. > > Unless you tell gcc that the condition codes are hard register? No "unless" here. You either have a clobber or a set in a parallel with the main feature, and you lose out on all the single_set-directed optimizations if you put in a "set" early. > That's what m32c does; it has separate cmp/jmp and most opcodes set > flags, so I just set an attribute that says which flags are set by > each insn. Then, I can add a reorg pass to delete the cmps if the > previous insn that set the flags happened to set them right. A machine dependent reorg pass isn't something I'd recommend given that there are other possibilities. FWIW, I use peephole2s and condition code modes in CRIS w.i.p. Works ok, except for all the things that doesn't like insns with parallels that I have to weed out to get performance on par with the cc0 representation. brgds, H-P