From patchwork Wed May 20 11:40:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 474362 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 A388014016A for ; Wed, 20 May 2015 21:40:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=XcE1LLAe; dkim-atps=neutral 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:subject:content-type; q= dns; s=default; b=CcLyvMbHkHQmx8gGOW58e79GMzdmr/5gVHosTbWT/n2pOB QoM5oUD4UbaHsrkt14nkxp2wy7jeXriDHoGX0R/cJSIVw+i0oZOREUeusJQUDbLh M9+6dnfFPoTu6k70LeAx9lvFmgQe8HKKmioYgwa4MM30LgZ2ESUYw4qOv7VT8= 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:subject:content-type; s= default; bh=mw7OrkQIib9YZCs1L5Al/y1LPRc=; b=XcE1LLAezZK11roPoKZU +BzpSyt7ZnqCmQ7VCs1VAF2xyET7PWygfPTyxxMSNRADtxaOSUVrWF84Myk1drIq slHWHVU+Zpl8alk1nfQ5nIdTZyPJ5I209mrG/bdbefGILJab3aIGAYDThdmsUNjE 0xbnq74RhrZZZu2ug5Fm0CM= Received: (qmail 107316 invoked by alias); 20 May 2015 11:40:25 -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 107298 invoked by uid 89); 20 May 2015 11:40:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 May 2015 11:40:23 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-4.uk.mimecast.lan; Wed, 20 May 2015 12:40:21 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 May 2015 12:40:21 +0100 Message-ID: <555C72A4.8030807@arm.com> Date: Wed, 20 May 2015 12:40:20 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][AArch64][obvious] In aarch64_class_max_nregs use UNITS_PER_VREG and UNITS_PER_WORD X-MC-Unique: LG2dn07bSyOFto8FLvRfeg-1 X-IsSubscribed: yes Hi all, This patch replaces 15, 16, 7 and 8 in aarch64_class_max_nregs with the macro that they represent. This should make the logic of that function easier to understand. Bootstrapped and tested on aarch64. Applying as obvious. 2015-05-20 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_class_max_nregs): Use UNITS_PER_VREG and UNITS_PER_WORD instead of their direct values. commit 8abd208611b50e8f477b6efb8d8604b3390a9072 Author: Kyrylo Tkachov Date: Mon May 18 12:01:24 2015 +0100 [AArch64] In aarch64_class_max_nregs use UNITS_PER_VREG and UNITS_PER_WORD diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index c939a4a..5f23359 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4923,8 +4923,9 @@ aarch64_class_max_nregs (reg_class_t regclass, machine_mode mode) case FP_REGS: case FP_LO_REGS: return - aarch64_vector_mode_p (mode) ? (GET_MODE_SIZE (mode) + 15) / 16 : - (GET_MODE_SIZE (mode) + 7) / 8; + aarch64_vector_mode_p (mode) + ? (GET_MODE_SIZE (mode) + UNITS_PER_VREG - 1) / UNITS_PER_VREG + : (GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD; case STACK_REG: return 1;