From patchwork Wed Oct 22 21:49:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Collison X-Patchwork-Id: 39339 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 90ECC202DB for ; Wed, 22 Oct 2014 21:49:36 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf147115wiv.10 for ; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-original-sender :x-original-authentication-results:content-type; bh=9BfBNP9lTzACnZ80jrKIrHs0rdHsUYoA0tX1vQ6PB1k=; b=nJ9rzS+LD/9UDoMdSHf85hr2UgFpM7wdt9q+a/akZ5NSoHdkpYWzdtvzuPtX2tofAF haQaQDUq4sgy5u7+b43bDLWhl7AK7qQAmM9n8PoAo8YtdUfDUAyM3a63HGeJrlSQalMd m4qHkVDXmXQhdJ/MYy1ARo5Js1/wItJemF55C9q/oIolWwa8PYKJzRnR0FSuTtj0yrGt qtQDCvaFvPMap3Nn2xCpowV3nLcz6S/rS2gncQUi6N1Oj272uTsZRrjsohqenLHkI5xS Yn4vPrNx53a4ppFQA/RjNH9tfbNeGuAcbiNnTzOZWMLEOdzdwQqy2oLGYv0t/65At27e pajQ== X-Gm-Message-State: ALoCoQno6phfv/mmabQMXPonHXU060nsiu2D6ps4CTnMcihFKJV4t/C7IQkq9uBC0I7BQlxKpuF1 X-Received: by 10.194.118.197 with SMTP id ko5mr155063wjb.2.1414014575729; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.166 with SMTP id t6ls267205lat.20.gmail; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) X-Received: by 10.112.133.138 with SMTP id pc10mr829200lbb.48.1414014575567; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) Received: from mail-la0-x231.google.com (mail-la0-x231.google.com. [2a00:1450:4010:c03::231]) by mx.google.com with ESMTPS id oc10si24936036lbb.99.2014.10.22.14.49.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 14:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::231 as permitted sender) client-ip=2a00:1450:4010:c03::231; Received: by mail-la0-f49.google.com with SMTP id q1so3730043lam.36 for ; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) X-Received: by 10.112.224.162 with SMTP id rd2mr644436lbc.95.1414014575419; Wed, 22 Oct 2014 14:49:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp158936lbz; Wed, 22 Oct 2014 14:49:34 -0700 (PDT) X-Received: by 10.66.156.101 with SMTP id wd5mr529407pab.145.1414014572318; Wed, 22 Oct 2014 14:49:32 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id lm4si13545796pab.217.2014.10.22.14.49.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Oct 2014 14:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-381537-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 18099 invoked by alias); 22 Oct 2014 21:49:20 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 18087 invoked by uid 89); 22 Oct 2014 21:49:19 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f43.google.com Received: from mail-pa0-f43.google.com (HELO mail-pa0-f43.google.com) (209.85.220.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 22 Oct 2014 21:49:17 +0000 Received: by mail-pa0-f43.google.com with SMTP id eu11so147360pac.2 for ; Wed, 22 Oct 2014 14:49:16 -0700 (PDT) X-Received: by 10.66.193.193 with SMTP id hq1mr883773pac.20.1414014556138; Wed, 22 Oct 2014 14:49:16 -0700 (PDT) Received: from [192.168.2.118] (ip70-176-172-237.ph.ph.cox.net. [70.176.172.237]) by mx.google.com with ESMTPSA id kw10sm20756pab.0.2014.10.22.14.49.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Oct 2014 14:49:14 -0700 (PDT) Message-ID: <54482653.5060805@linaro.org> Date: Wed, 22 Oct 2014 14:49:07 -0700 From: Michael Collison User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Tejas Belagod , "gcc-patches@gcc.gnu.org" Subject: Re: [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes References: <543633BD.9030004@linaro.org> <54363F8A.8020501@arm.com> In-Reply-To: <54363F8A.8020501@arm.com> X-Original-Sender: michael.collison@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::231 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Patch that removes extraneous comment attached. The CLZ_DEFINED_VALUE_AT_ZERO macro is hard coded to return 32. For the vector intrinsic vclz this is incorrect and should return the value eight. The CTZ_DEFINED_VALUE_AT_ZERO has the same issue. Tested on arm-linux-gnueabihf, arm-linux-gnueabi. 2014-10-08 Michael Collison * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update to support vector modes (CTZ_DEFINED_VALUE_AT_ZERO): Ditto On 10/09/2014 12:55 AM, Tejas Belagod wrote: > On 09/10/14 08:05, Michael Collison wrote: >> >> The CLZ_DEFINED_VALUE_AT_ZERO macro is harded to return 32. For the >> vector intrinsic vclz this is incorrect and should return the value >> eight. The CTZ_DEFINED_VALUE_AT_ZERO has the same issue. >> >> Tested on arm-linux-gnueabihf, arm-linux-gnueabi. >> >> 2014-10-08 Michael Collison >> >> * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update >> to support vector modes >> (CTZ_DEFINED_VALUE_AT_ZERO): Ditto >> > > Update comment? > > /* The arm5 clz instruction returns 32. */ > > > Thanks, > Tejas. > --- ../../../../linaro-gcc4_9_git/gcc/config/arm/arm.h 2014-10-08 13:49:01.109819957 -0700 +++ ./arm.h 2014-10-22 14:41:10.767130430 -0700 @@ -2137,9 +2137,10 @@ ? reverse_condition_maybe_unordered (code) \ : reverse_condition (code)) -/* The arm5 clz instruction returns 32. */ -#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) -#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) +#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \ + ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE)) +#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \ + ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE)) #define CC_STATUS_INIT \ do { cfun->machine->thumb1_cc_insn = NULL_RTX; } while (0)