From patchwork Thu Nov 15 21:54:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 199436 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 5A7BF2C0384 for ; Fri, 16 Nov 2012 08:56:51 +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=1353621411; 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=3JvL55V tgbqrcj/tX8FXH/JyzaA=; b=SA0DhFw/xUq0nqL7g5TJAxkrCGcMKfnSvSlawbr cuv4uIGpL+cksK7d1x/IC4P9NEMJtAmhrRN5FyQoT92KMYY/VExJ/cY5X4Fmvxl6 M/XK0slSP8muOgOXeAKOfjrkTN9mg9POXD1jB7bno+71LfVJSs0zcoetSCUOBkX0 XYBg= 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=yH69FWN1QejQRc31qyntD3fsr8BXeaqCoPiNVdyWw8G3b8CFiq/1khVW1fCVp+ pg23KdrNXhR2xd4mLt8RaLEeEexxWS93oWDwqxsDZPnTXb4W6JZFgqgYOikgJWv8 MlvbzLkIFdOvf6lNtXCsuINnVhQGouwZWJzUF8rc74qYU=; Received: (qmail 10957 invoked by alias); 15 Nov 2012 21:54:21 -0000 Received: (qmail 10791 invoked by uid 22791); 15 Nov 2012 21:54:19 -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-wg0-f73.google.com (HELO mail-wg0-f73.google.com) (74.125.82.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 21:54:11 +0000 Received: by mail-wg0-f73.google.com with SMTP id dt12so136766wgb.2 for ; Thu, 15 Nov 2012 13:54:10 -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=lVKMflWNzfJvtlt9u7k29ixdu+dIZbbl/XzZXpjJjn0=; b=h7gfz4ZF9MW9XII9RmCgTbkjUEuYjPYoBhzd+ckur1J2AGzXubuAWG7z9dbnOQG8tN kJjWint33b+xfLACDI/gFS7X1XrzsK+BpNzaXA3t7XzBTWqKnoRSXlgzcAupThcN7S8A 6tYjvzVfOX4Imq8yneJLXpaTGHjeFNxhkjOnWX8vbnqYSHzGQzK/MUS+avWGhCxpwblG B+Fd6Wv1CQvWg23HuX581dTSCBAdm6CyzE9Q7USKylzbVGuDb3/1ckS4E3sVciQ9syr1 tYmnhxPZpQA8hPYrw+KFbv1ljKBC/v3cneJwLbqik0776OXA3of+BCpcmxdZwiVIFORq 0ErA== Received: by 10.14.204.3 with SMTP id g3mr3295183eeo.7.1353016450251; Thu, 15 Nov 2012 13:54:10 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id u8si4117299een.1.2012.11.15.13.54.10 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 15 Nov 2012 13:54:10 -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 E98CA20004E; Thu, 15 Nov 2012 13:54:09 -0800 (PST) Received: by torture.tor.corp.google.com (Postfix, from userid 54752) id 5D4B4C0916; Thu, 15 Nov 2012 16:54:09 -0500 (EST) Date: Thu, 15 Nov 2012 16:54:09 -0500 To: dj@redhat.com, gcc-patches@gcc.gnu.org Subject: VEC re-write [patch 17/25] User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-Id: <20121115215409.5D4B4C0916@torture.tor.corp.google.com> From: dnovillo@google.com (Diego Novillo) X-Gm-Message-State: ALoCoQkx32lesHkgxVVo8r/CTNo/u9VWeS4dMkrYtfH13YWriYiNdlT/ygFvftN7vudbSQImeXbqXgIpfkY7cgUfmVp24WprjBV+ukUJKwV/gs5fEWGD5KXvWnI53DgNSQaMYhzeiw/+f1XZRXWcF81TMZjllShNBKLEX3P0rCALIRblx+JhM/l4F0u3C3uuKcmicdrTqbj5/n0oNXkZVfxYjutLeMOVZGD+oTYOTRiJXmLaBNDR0uE= 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/mep/mep.c: Use new vec API in vec.h. diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 79611a8..a44e521 100644 --- a/gcc/config/mep/mep.c +++ b/gcc/config/mep/mep.c @@ -300,54 +300,54 @@ mep_option_override (void) unsigned int i; int j; cl_deferred_option *opt; - VEC(cl_deferred_option,heap) *vec - = (VEC(cl_deferred_option,heap) *) mep_deferred_options; + vec *v = (vec *) mep_deferred_options; - FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt) - { - switch (opt->opt_index) - { - case OPT_mivc2: - for (j = 0; j < 32; j++) - fixed_regs[j + 48] = 0; - for (j = 0; j < 32; j++) - call_used_regs[j + 48] = 1; - for (j = 6; j < 8; j++) - call_used_regs[j + 48] = 0; + if (v) + FOR_EACH_VEC_ELT (*v, i, opt) + { + switch (opt->opt_index) + { + case OPT_mivc2: + for (j = 0; j < 32; j++) + fixed_regs[j + 48] = 0; + for (j = 0; j < 32; j++) + call_used_regs[j + 48] = 1; + for (j = 6; j < 8; j++) + call_used_regs[j + 48] = 0; #define RN(n,s) reg_names[FIRST_CCR_REGNO + n] = s - RN (0, "$csar0"); - RN (1, "$cc"); - RN (4, "$cofr0"); - RN (5, "$cofr1"); - RN (6, "$cofa0"); - RN (7, "$cofa1"); - RN (15, "$csar1"); - - RN (16, "$acc0_0"); - RN (17, "$acc0_1"); - RN (18, "$acc0_2"); - RN (19, "$acc0_3"); - RN (20, "$acc0_4"); - RN (21, "$acc0_5"); - RN (22, "$acc0_6"); - RN (23, "$acc0_7"); - - RN (24, "$acc1_0"); - RN (25, "$acc1_1"); - RN (26, "$acc1_2"); - RN (27, "$acc1_3"); - RN (28, "$acc1_4"); - RN (29, "$acc1_5"); - RN (30, "$acc1_6"); - RN (31, "$acc1_7"); + RN (0, "$csar0"); + RN (1, "$cc"); + RN (4, "$cofr0"); + RN (5, "$cofr1"); + RN (6, "$cofa0"); + RN (7, "$cofa1"); + RN (15, "$csar1"); + + RN (16, "$acc0_0"); + RN (17, "$acc0_1"); + RN (18, "$acc0_2"); + RN (19, "$acc0_3"); + RN (20, "$acc0_4"); + RN (21, "$acc0_5"); + RN (22, "$acc0_6"); + RN (23, "$acc0_7"); + + RN (24, "$acc1_0"); + RN (25, "$acc1_1"); + RN (26, "$acc1_2"); + RN (27, "$acc1_3"); + RN (28, "$acc1_4"); + RN (29, "$acc1_5"); + RN (30, "$acc1_6"); + RN (31, "$acc1_7"); #undef RN - break; + break; - default: - gcc_unreachable (); - } - } + default: + gcc_unreachable (); + } + } if (flag_pic == 1) warning (OPT_fpic, "-fpic is not supported");