From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14313 invoked by alias); 17 Jun 2009 14:24:25 -0000 Received: (qmail 14289 invoked by uid 22791); 17 Jun 2009 14:24:23 -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 smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 14:24:15 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id n5HEOBTG030329 for ; Wed, 17 Jun 2009 15:24:12 +0100 Received: from pxi36 (pxi36.prod.google.com [10.243.27.36]) by wpaz21.hot.corp.google.com with ESMTP id n5HEO8qD024729 for ; Wed, 17 Jun 2009 07:24:09 -0700 Received: by pxi36 with SMTP id 36so343647pxi.30 for ; Wed, 17 Jun 2009 07:24:08 -0700 (PDT) Received: by 10.115.58.20 with SMTP id l20mr327446wak.2.1245248648770; Wed, 17 Jun 2009 07:24:08 -0700 (PDT) Received: from localhost.localdomain.google.com ([67.218.105.128]) by mx.google.com with ESMTPS id c26sm1206616waa.50.2009.06.17.07.24.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Jun 2009 07:24:08 -0700 (PDT) To: Adam Nemet Cc: gcc@gcc.gnu.org, law@redhat.com Subject: Re: Rationale for an old TRUNCATE patch References: <19000.8283.533096.76324@ropi.home> <19000.36794.687088.768724@ropi.home> From: Ian Lance Taylor Date: Wed, 17 Jun 2009 14:24:00 -0000 In-Reply-To: <19000.36794.687088.768724@ropi.home> (Adam Nemet's message of "Tue\, 16 Jun 2009 23\:39\:54 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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-06/txt/msg00408.txt.bz2 Adam Nemet writes: > Ian Lance Taylor writes: >> truncate has a machine independent meaning. > > Yes, I guess with your definition below it does. It's interesting though that > Jim had said the opposite in the excerpts posted by Jeff: > > And a later message from Jim: > > Truncate converts a value from a larger to a smaller mode in a machine > dependent way. > > A subreg just chops off the high bits. A truncate does not. The name might > be a little confusing, but the whole point of truncate is to have something > that operates differently than a subreg. > > Combine is clearly making an invalid transformation. I'm not entirely sure, but I don't think Jim said the opposite. He said that the way truncate works is machine dependent. I said that the output of truncate is machine independent. Since truncate is only defined for fixed-point modes, I think both statements are true. Ian