From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17542 invoked by alias); 8 May 2003 17:17:11 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 17535 invoked from network); 8 May 2003 17:17:10 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 8 May 2003 17:17:10 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id KAA16202; Thu, 8 May 2003 10:17:06 -0700 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma016160; Thu, 8 May 03 10:16:55 -0700 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id h48HGva22788; Thu, 8 May 2003 10:16:57 -0700 (PDT) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id KAA11249; Thu, 8 May 2003 10:16:57 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16058.37129.53035.140393@casey.transmeta.com> Date: Thu, 08 May 2003 17:17:00 -0000 To: Dave Brolley Cc: cgen@sources.redhat.com Subject: [patch][rfa] Add ltu,leu,gtu,geu support for unsigned modes In-Reply-To: <3EB80E66.70402@redhat.com> References: <3EB80E66.70402@redhat.com> X-SW-Source: 2003-q2/txt/msg00036.txt.bz2 Dave Brolley writes: > Hi, > > The attached patch adds support for the unsigned modes (UQI, UHI, USI, > UDI, UINT) for the cgen rtl ops ltu, leu, gtu and geu. These calls can > be generated by code like > > (if (ltu (zext UDI op1) (zext UDI op2 ))(set op3 op1 )) > > ok to commit? Well .... The first indication that you're barking up the wrong tree is that cgen-ops.h generally doesn't have Umode support (e.g. ADDUSI). There's a reason. It's excessive and unnecessary and I don't want to unnecessarily propagate them. GCC doesn't have Umodes. I added Umodes mostly as an escape hatch, but a controlled one. If this patch goes in and the general direction it takes cgen-ops.h in is allowed to proceed, I think that's a bad thing. Do you get the desired result if you replace the above with (if (ltu (zext DI op1) (zext DI op2 ))(set op3 op1 )) ? Note this: from doc/rtl.texi: @item UQI,UHI,USI,UDI Unsigned versions of QI,HI,SI,DI. These modes do not appear in semantic RTL. Instead, the RTL function specifies the signedness of its operands where necessary. ??? I'm not entirely sure these unsigned modes are needed. They are useful in removing any ambiguity in how to sign extend constants which has been a source of problems in GCC. ??? Some existing ports use these modes.