From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17723 invoked by alias); 20 Jun 2011 18:44:12 -0000 Received: (qmail 17714 invoked by uid 22791); 20 Jun 2011 18:44:11 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jun 2011 18:43:57 +0000 Received: by iym10 with SMTP id 10so1922022iym.20 for ; Mon, 20 Jun 2011 11:43:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.220.134 with SMTP id hy6mr6359673icb.386.1308595436993; Mon, 20 Jun 2011 11:43:56 -0700 (PDT) Received: by 10.42.228.199 with HTTP; Mon, 20 Jun 2011 11:43:56 -0700 (PDT) In-Reply-To: <1308579588.5273.1.camel@oc2474580526.ibm.com> References: <4DFA3421.6020603@redhat.com> <1308579588.5273.1.camel@oc2474580526.ibm.com> Date: Mon, 20 Jun 2011 19:09:00 -0000 Message-ID: Subject: Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR From: Andrew Pinski To: "William J. Schmidt" Cc: Richard Henderson , Richard Guenther , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg01522.txt.bz2 On Mon, Jun 20, 2011 at 7:19 AM, William J. Schmidt wrote: > On Thu, 2011-06-16 at 09:49 -0700, Richard Henderson wrote: >> On 06/16/2011 04:35 AM, Richard Guenther wrote: >> > >> > + =C2=A0 =C2=A0 /* Bit-field insertion needs several shift and mask op= erations. =C2=A0*/ >> > + =C2=A0 =C2=A0 case BIT_FIELD_EXPR: >> > + =C2=A0 =C2=A0 =C2=A0 return 3; >> >> ... depending on the target, of course. >> > > Agreed -- this is a single-instruction operation on PowerPC. =C2=A0Probab= ly > need some target-specific weights here. It is also a single instruction on MIPS32R2 and MIPS64R2. So a target hook is the best here rather than a constant number in the target hook field. Thanks, Andrew Pinski