From patchwork Wed Jun 16 18:07:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 55918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E8D27B7D64 for ; Thu, 17 Jun 2010 04:07:39 +1000 (EST) Received: (qmail 2225 invoked by alias); 16 Jun 2010 18:07:35 -0000 Received: (qmail 2209 invoked by uid 22791); 16 Jun 2010 18:07:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 18:07:24 +0000 Received: (qmail 5516 invoked from network); 16 Jun 2010 18:07:23 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Jun 2010 18:07:23 -0000 Date: Wed, 16 Jun 2010 11:07:23 -0700 From: Nathan Froyd To: Steve Ellcey Cc: Mark Mitchell , gcc-patches@gcc.gnu.org Subject: Re: [PATCH, c++] rewrite vtable initialization construction to use VECs Message-ID: <20100616180722.GF27105@codesourcery.com> References: <20100603204741.GA19235@codesourcery.com> <201006101705.o5AH5wg18034@lucas.cup.hp.com> <20100615122234.GW27105@codesourcery.com> <1276623054.28515.35.camel@hpsje.cup.hp.com> <20100615175908.GB27105@codesourcery.com> <1276632638.28515.46.camel@hpsje.cup.hp.com> <20100615201557.GL27105@codesourcery.com> <1276708867.28515.66.camel@hpsje.cup.hp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1276708867.28515.66.camel@hpsje.cup.hp.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Wed, Jun 16, 2010 at 10:21:07AM -0700, Steve Ellcey wrote: > I finished a full bootstrap and test of the last patch you sent me and > it looks good on IA64 HP-UX. Thanks for doing this and bearing with me on the remote debugging. I have committed the patch below as r160856. -Nathan * class.c (build_vtbl_initializer): Adjust computation of new_position and which entry to add padding for. Index: ChangeLog =================================================================== Index: class.c =================================================================== --- class.c (revision 160853) +++ class.c (working copy) @@ -7607,14 +7607,15 @@ build_vtbl_initializer (tree binfo, ix--) { int j; - int new_position = TARGET_VTABLE_DATA_ENTRY_DISTANCE * ix; + int new_position = (TARGET_VTABLE_DATA_ENTRY_DISTANCE * ix + + (TARGET_VTABLE_DATA_ENTRY_DISTANCE - 1)); VEC_replace (constructor_elt, vid.inits, new_position, e); for (j = 1; j < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++j) { - constructor_elt *f = VEC_index (constructor_elt, *inits, - new_position + j); + constructor_elt *f = VEC_index (constructor_elt, vid.inits, + new_position - j); f->index = NULL_TREE; f->value = build1 (NOP_EXPR, vtable_entry_type, null_pointer_node);