From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10881 invoked by alias); 6 Jun 2011 14:31:46 -0000 Received: (qmail 10867 invoked by uid 22791); 6 Jun 2011 14:31:45 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 14:31:32 +0000 Received: (qmail 30436 invoked from network); 6 Jun 2011 14:31:31 -0000 Received: from unknown (HELO ?192.168.0.100?) (ams@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Jun 2011 14:31:31 -0000 Message-ID: <4DECE4C0.6030008@codesourcery.com> Date: Mon, 06 Jun 2011 14:31:00 -0000 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Dmitry Plotnikov CC: Ramana Radhakrishnan , gcc-patches@gcc.gnu.org, patches@linaro.org, dm@ispras.ru Subject: Re: [PATCH][ARM] Add support for ADDW and SUBW instructions References: <4DAEFB5C.8020802@codesourcery.com> <4DE751DF.8080906@codesourcery.com> <4DECC4CB.2000500@ispras.ru> <4DECCAF8.5030406@codesourcery.com> <4DECD592.2070708@ispras.ru> <4DECD71B.9060907@codesourcery.com> <4DECE3A2.5040807@ispras.ru> In-Reply-To: <4DECE3A2.5040807@ispras.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00413.txt.bz2 On 06/06/11 15:26, Dmitry Plotnikov wrote: > On 06/06/2011 05:33 PM, Andrew Stubbs wrote: >> On 06/06/11 14:26, Dmitry Plotnikov wrote: >>> if (const_ok_for_arm (INTVAL (x)) >>> - || const_ok_for_arm (~INTVAL (x))) >>> + || const_ok_for_arm (~INTVAL (x)) >>> + || (TARGET_THUMB2&& outer == PLUS >>> + && (const_ok_for_op (INTVAL (x), outer)))) >> >> Sorry, I should have noticed before ... >> >> This whole condition should be covered by a single call to >> const_ok_for_op. It already calls const_ok_for_arm internally. >> > This condition is not covered by const_ok_for_op, because "outer" can be > equal to other rtx codes, which are not covered in const_ok_for_op like > IF_THEN_ELSE or MULT (I have several ICEs with these codes). I don't > know how to fix this correctly - should I add all codes to > const_ok_for_op or maybe just replace default alternative from > gcc_unreachable() to "return 0;" ? That sounds reasonable to me - I mean, the constant is indeed not ok for those operations. ... but I'm not a maintainer .... Andrew