From patchwork Thu Nov 15 21:54:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 199439 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 00ECA2C04F9 for ; Fri, 16 Nov 2012 08:57:29 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1353621450; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Date:To:Subject:User-Agent: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: From:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=LPtPxeI mYWO0Fti7WryPCKOibhw=; b=QjHkkFySYQYg/eK/25sNcNK16536fHwWgKRs3dJ Q1qBeaOeeJHyLzq8cDUHIHqXE5btZQtjalzEnM58fELwKrC0LRFbN9UYDRMx/BWH DvgJzRp6efTRCyT+uUs3kFHRKyZidR8oZgoVKwC2K4yFkrmgk3HO0LXPnsABypbL VLX0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Received:Date:To:Subject:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=p0mUNmff9UJyioXCYx8k5y1o8rjzNUvi331hcq9dvpFbwiHVskJqmflLlBWfJF UQ+XOEvnw4ruCbTscy/43etPf/12DyxI4Ht7+SwsT6zTXp5FbdHCMLdvWX5+g2d/ 5KtMVmf3/D1ZJv9/F7X21oA+IY/nYxHh6FMTARayTluG8=; Received: (qmail 11532 invoked by alias); 15 Nov 2012 21:54:35 -0000 Received: (qmail 11490 invoked by uid 22791); 15 Nov 2012 21:54:33 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-wi0-f201.google.com (HELO mail-wi0-f201.google.com) (209.85.212.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 21:54:23 +0000 Received: by mail-wi0-f201.google.com with SMTP id hm2so137577wib.2 for ; Thu, 15 Nov 2012 13:54:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:to:subject:user-agent:mime-version:content-type :content-transfer-encoding:message-id:from:x-gm-message-state; bh=dGjxYmQe7inM4fagmqxltr25/aE/jRRNVU2H48ujsUM=; b=gCGkCVAKuHsvFzhvDQXK6g4buFy08kdlsKXp7otse5tzGuELqgRt5cTSMxB5jQASIb ze+qWDRHmrkXJ0/HLTFD7JiLn2DOTJmHi/qyqxH/RQOZGGPZUJPcwDD/B0IugtNHBF55 HjoVyXtcX3AJxQZURslLBXSDsSvoQ3ADi8uNYsWD/DoMB3IovT27zLRfyA7/MYkK6WDz CPOf2wd0sARUtgBK0cmGrsji5V1Y18Yp8oWuLZOB2UiDUg05SjpbjWkcR9AY4Plf0N9X oKzXj8M9K00uAct6o9dAOd7IK5i2kmBjUpY6+x+Pkz/vKLeJH+9AEOCos67M+83y6gbf worg== Received: by 10.14.216.197 with SMTP id g45mr3303212eep.3.1353016462298; Thu, 15 Nov 2012 13:54:22 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z47si4118653eel.0.2012.11.15.13.54.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 15 Nov 2012 13:54:22 -0800 (PST) Received: from torture.tor.corp.google.com (torture.tor.corp.google.com [172.30.222.16]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 01F5F2000D9; Thu, 15 Nov 2012 13:54:22 -0800 (PST) Received: by torture.tor.corp.google.com (Postfix, from userid 54752) id 70D54C0916; Thu, 15 Nov 2012 16:54:21 -0500 (EST) Date: Thu, 15 Nov 2012 16:54:21 -0500 To: nickc@redhat.com, gcc-patches@gcc.gnu.org Subject: VEC re-write [patch 21/25] User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-Id: <20121115215421.70D54C0916@torture.tor.corp.google.com> From: dnovillo@google.com (Diego Novillo) X-Gm-Message-State: ALoCoQk4NPegeLp9MqP7Q2TKkcEqtLzlpsVtJq1HYhr+dmNWAI888zVUZaJ8qgLCvogHWFldq2z6NzKjV5ZHns47HXktQ4IwwRSc/74DpbP95P76p1ujdwLbjUWQ6PDjA8jZlhdNOIvwDUKDObomaFHISBcF0SwzFEOCgArMAfJaueD/uzN+9rEwCf+SJ6h8Ty80MlbkO0MkM9hUz510ISkafixoOM/aJSK1PYgnc3ByfcfOigoVR1w= 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 2012-11-15 Diego Novillo Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) * config/rx/rx.c: Use new vec API in vec.h. diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 5d31eac..8cd9253 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -2614,43 +2614,43 @@ rx_option_override (void) { unsigned int i; cl_deferred_option *opt; - VEC(cl_deferred_option,heap) *vec - = (VEC(cl_deferred_option,heap) *) rx_deferred_options; + vec *v = (vec *) rx_deferred_options; - FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt) - { - switch (opt->opt_index) - { - case OPT_mint_register_: - switch (opt->value) - { - case 4: - fixed_regs[10] = call_used_regs [10] = 1; - /* Fall through. */ - case 3: - fixed_regs[11] = call_used_regs [11] = 1; - /* Fall through. */ - case 2: - fixed_regs[12] = call_used_regs [12] = 1; - /* Fall through. */ - case 1: - fixed_regs[13] = call_used_regs [13] = 1; - /* Fall through. */ - case 0: - rx_num_interrupt_regs = opt->value; - break; - default: - rx_num_interrupt_regs = 0; - /* Error message already given because rx_handle_option - returned false. */ - break; - } - break; + if (v) + FOR_EACH_VEC_ELT (*v, i, opt) + { + switch (opt->opt_index) + { + case OPT_mint_register_: + switch (opt->value) + { + case 4: + fixed_regs[10] = call_used_regs [10] = 1; + /* Fall through. */ + case 3: + fixed_regs[11] = call_used_regs [11] = 1; + /* Fall through. */ + case 2: + fixed_regs[12] = call_used_regs [12] = 1; + /* Fall through. */ + case 1: + fixed_regs[13] = call_used_regs [13] = 1; + /* Fall through. */ + case 0: + rx_num_interrupt_regs = opt->value; + break; + default: + rx_num_interrupt_regs = 0; + /* Error message already given because rx_handle_option + returned false. */ + break; + } + break; - default: - gcc_unreachable (); - } - } + default: + gcc_unreachable (); + } + } /* This target defaults to strict volatile bitfields. */ if (flag_strict_volatile_bitfields < 0 && abi_version_at_least(2))