From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24116 invoked by alias); 13 Oct 2011 18:35:47 -0000 Received: (qmail 23841 invoked by uid 22791); 13 Oct 2011 18:35:45 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from shards.monkeyblade.net (HELO shards.monkeyblade.net) (198.137.202.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Oct 2011 18:35:31 +0000 Received: from localhost (nat-pool-rdu.redhat.com [66.187.233.202]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id p9DIZSeN014475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Oct 2011 11:35:30 -0700 Date: Thu, 13 Oct 2011 20:06:00 -0000 Message-Id: <20111013.143528.1318292403050799329.davem@davemloft.net> To: rth@redhat.com Cc: gcc@gcc.gnu.org Subject: Re: VIS2 pattern review From: David Miller In-Reply-To: <20111013.142636.1859659747859622111.davem@davemloft.net> References: <4E96358F.30405@redhat.com> <20111013.142636.1859659747859622111.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii 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: 2011-10/txt/msg00211.txt.bz2 From: David Miller Date: Thu, 13 Oct 2011 14:26:36 -0400 (EDT) > product = src1 * src2; > > scaled = (product & 0x00ffff00) >> 8; > if (product & 0x80) > scaled++; In fact, all of the partitioned multiply instructions scale the result by 8 bits with rounding towards positive infinity. Therefore, we have to use an unspec for all of them.