From patchwork Fri Apr 18 16:02:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 340364 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E815D1400F8 for ; Sat, 19 Apr 2014 02:02:59 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=KdmwABKF0Ng90lltIK7/i+w6l8/ndwJf0TXiPSjowez ZHEs/K7L718D8VohSW2sXV/LSWq0n2jpIljvfY9TGKqedJ8an67VPvXWSVWgFFpR ShgdJENB96vdQ6xXixOaXL7VLb7ztWqrWov5/39g7lP991UJKqU8rAxs9tHkx5yE = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=U0n7HzfYGPKtr6zn2IfgNTg/o1o=; b=jl7wySc9wVnNTie8o 82m9Xev7Kg6biA+wRT0BmAY5Pxa+/guM9hbArvDpXJK9KQjPaVYduy1dMuqL4xtQ UIt+Gfuhf/jaWKI1uJ9v4S0m13U6zKftmZif4xg5RbpGN28Tp8qxQ7UCYbHtujlq v3f0hPs21Pascelw/yyVZR8nmw= Received: (qmail 25609 invoked by alias); 18 Apr 2014 16:02:52 -0000 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 Received: (qmail 25600 invoked by uid 89); 18 Apr 2014 16:02:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Apr 2014 16:02:51 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3IG2kjA016707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Apr 2014 12:02:46 -0400 Received: from anchor.twiddle.net (vpn-226-12.phx2.redhat.com [10.3.226.12]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3IG2jcO018864; Fri, 18 Apr 2014 12:02:46 -0400 Message-ID: <53514CA4.3060704@redhat.com> Date: Fri, 18 Apr 2014 09:02:44 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft Subject: [COMMITTED] Fix silly error in aarch64_register_move_cost X-IsSubscribed: yes Building mainline I got > .../aarch64.c:4879:134: error: invalid conversion from ‘reg_class_t {aka int}’ to ‘machine_mode’ [-fpermissive] > if (! TARGET_SIMD && GET_MODE_SIZE (from) == 128 && GET_MODE_SIZE (to) == 128) Sure enough, TO and FROM are not modes. Did mainline just change away from permissive or something? It surely seems like we ought to have seen this earlier... Anyway, applied as obvious to all active branches. r~ * config/aarch64/aarch64.c (aarch64_register_move_cost): Pass a mode to GET_MODE_SIZE, not a reg_class_t. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index a3147ee..7b6c2b3 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4847,9 +4847,11 @@ aarch64_address_cost (rtx x ATTRIBUTE_UNUSED, } static int -aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, - reg_class_t from, reg_class_t to) +aarch64_register_move_cost (enum machine_mode mode, + reg_class_t from_i, reg_class_t to_i) { + enum reg_class from = (enum reg_class) from_i; + enum reg_class to = (enum reg_class) to_i; const struct cpu_regmove_cost *regmove_cost = aarch64_tune_params->regmove_cost; @@ -4875,8 +4877,7 @@ aarch64_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED, secondary reload. A general register is used as a scratch to move the upper DI value and the lower DI value is moved directly, hence the cost is the sum of three moves. */ - - if (! TARGET_SIMD && GET_MODE_SIZE (from) == 128 && GET_MODE_SIZE (to) == 128) + if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 128) return regmove_cost->GP2FP + regmove_cost->FP2GP + regmove_cost->FP2FP; return regmove_cost->FP2FP;