From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11380 invoked by alias); 6 Nov 2009 15:34:16 -0000 Received: (qmail 11371 invoked by uid 22791); 6 Nov 2009 15:34:15 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Nov 2009 15:34:11 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id nA6FY8xr026760 for ; Fri, 6 Nov 2009 07:34:08 -0800 Received: from pwi7 (pwi7.prod.google.com [10.241.219.7]) by spaceape11.eur.corp.google.com with ESMTP id nA6FY4HF030233 for ; Fri, 6 Nov 2009 07:34:05 -0800 Received: by pwi7 with SMTP id 7so758798pwi.36 for ; Fri, 06 Nov 2009 07:34:03 -0800 (PST) Received: by 10.114.44.10 with SMTP id r10mr6837803war.77.1257521643761; Fri, 06 Nov 2009 07:34:03 -0800 (PST) Received: from coign.google.com ([67.218.102.182]) by mx.google.com with ESMTPS id 23sm78015pxi.1.2009.11.06.07.34.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 06 Nov 2009 07:34:02 -0800 (PST) To: Mohamed Shafi Cc: Richard Henderson , GCC Subject: Re: How to write shift and add pattern? References: <4A97E98C.8040009@redhat.com> From: Ian Lance Taylor Date: Fri, 06 Nov 2009 15:34:00 -0000 In-Reply-To: (Mohamed Shafi's message of "Fri\, 6 Nov 2009 18\:59\:38 +0530") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (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-11/txt/msg00133.txt.bz2 Mohamed Shafi writes: > It is generating with data registers. Here is the pattern that i have > written: > > > (define_insn "*saddl" > [(set (match_operand:SI 0 "register_operand" "=r,d") > (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "r,d") > (match_operand:SI 2 "const24_operand" "J,J")) > (match_operand:SI 3 "register_operand" "0,0")))] > > How can i do this. Will the constraint modifiers '?' or '!' help? > How can make GCC generate shift and add sequence when the shift count is 1? Does 'd' represent a data register? I assume that 'r' is a general register, as it always is. What is the constraint character for an address register? You don't seem to have an alternative here for address registers, so I'm not surprised that the compiler isn't picking it. No doubt I misunderstand something. Ian