From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30063 invoked by alias); 21 Jun 2011 07:09:10 -0000 Received: (qmail 30055 invoked by uid 22791); 21 Jun 2011 07:09:09 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_XT X-Spam-Check-By: sourceware.org Received: from mail-ew0-f47.google.com (HELO mail-ew0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Jun 2011 07:08:55 +0000 Received: by ewy5 with SMTP id 5so572417ewy.20 for ; Tue, 21 Jun 2011 00:08:54 -0700 (PDT) Received: by 10.14.27.140 with SMTP id e12mr2392450eea.185.1308640134167; Tue, 21 Jun 2011 00:08:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.101.12 with HTTP; Tue, 21 Jun 2011 00:08:33 -0700 (PDT) In-Reply-To: <4DFF88C7.3080809@gjlay.de> References: <4DFF88C7.3080809@gjlay.de> From: Denis Chertykov Date: Tue, 21 Jun 2011 07:42:00 -0000 Message-ID: Subject: Re: [Patch, AVR]: Fix PR33049 (implement extzv) To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org, Anatoly Sokolov , "Eric B. Weddington" Content-Type: text/plain; charset=UTF-8 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg01563.txt.bz2 2011/6/20 Georg-Johann Lay : > This is an optimization patch that implements extzv for 1-bit extracts. > +(define_insn_and_split "*extzv" > + [(set (match_operand:QI 0 "register_operand" "=*d,*d,*d,r") > + (zero_extract:QI (match_operand:QI 1 "register_operand" "0,r,0,r") > + (const_int 1) > + (match_operand:QI 2 "const_0_to_7_operand" "L,L,P,n")))] > + "" > + "@ > + andi %0,1 > + mov %0,%1\;andi %0,1 > + lsr %0\;andi %0,1 > + bst %1,%2\;clr %0\;bld %0,0" Why you have a second constraint alternative (*d,r,L) ? IMHO it's unnecessary. > + && REGNO (operands[0]) >= 16" It's not a good practice to refer to register as number. Denis.