From patchwork Thu Dec 1 11:22:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 128682 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 1BE6DB6F62 for ; Thu, 1 Dec 2011 22:23:27 +1100 (EST) Received: (qmail 3529 invoked by alias); 1 Dec 2011 11:23:25 -0000 Received: (qmail 3520 invoked by uid 22791); 1 Dec 2011 11:23:24 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Dec 2011 11:23:11 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by smtp.strato.de (cohen mo11) (RZmta 26.10 AUTH) with ESMTPA id 003d5fnB1AZQyB ; Thu, 1 Dec 2011 12:22:47 +0100 (MET) Message-ID: <4ED76383.8010306@gjlay.de> Date: Thu, 01 Dec 2011 12:22:43 +0100 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Denis Chertykov CC: "Weddington, Eric" , Richard Henderson , gcc-patches@gcc.gnu.org, Anatoly Sokolov Subject: Re: [Patch,AVR] Light-weight DImode implementation. References: <4ECAA70E.5050205@gjlay.de> <4ECAD332.9020101@redhat.com> <4ED5206D.8070408@gjlay.de> <4ED524BF.2040000@redhat.com> <8D64F155F1C88743BFDC71288E8E2DA8059850A5@csomb01.corp.atmel.com> In-Reply-To: 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 Denis Chertykov wrote: >>>> The only question that remains is what the -m64 option should be like? >>>> >>>> [ ] Omit it altogether >>>> [ ] Leave it as is (off per default) >>>> [ ] Set it on per default >>>> >>>> As soon as the direction is clear, I'll post a follow-up patch to >>>> add the missing bits like, e.g., documentation for the new switch. >>> I'll leave the decision to Denis, but I'm for omitting it. >> I will also defer to Denis, but I'd rather avoid having another option, >> if we can. Keep it simple for the users. It might also be a hidden option like -morder2 and on per default. Such thing is nice for developers to play :-) > I'm agree with Richard. I'm for omitting it. > > Denis. So here is a follow-up patch atop http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02136.html to remove the -m64 option. The variable avr_have_dimode is still there but set always to true in avr.c and avr.opt remains unchanged. Ok? gcc/ * config/avr/avr-dimode.md: New file. * config/avr/avr.md: Include it. (adjust_len): Add plus64, compare64. (HIDI): Remove code iterator. (code_stdname): New code attribute. (rotx, rotsmode): Remove DI. (rotl3, *rotw, *rotb): Use HISI instead of HIDI as code iterator. * config/avr/avr-protos.h (avr_have_dimode): New. (avr_out_plus64, avr_out_compare64): New. * config/avr/avr.c (avr_out_compare): Handle DImode. (avr_have_dimode): New variable definition and initialization. (avr_out_compare64, avr_out_plus64): New functions. (avr_out_plus_1): Use simplify_unary_operation to negate xval. (adjust_insn_length): Handle ADJUST_LEN_COMPARE64, ADJUST_LEN_PLUS64. (avr_compare_pattern): Skip DImode comparisons. libgcc/ * config/avr/t-avr (LIB1ASMFUNCS): Add _adddi3, _adddi3_s8, _subdi3, _cmpdi2, _cmpdi2_s8, _rotldi3. * config/avr/lib1funcs.S (__adddi3, __adddi3_s8, __subdi3, __cmpdi2, __cmpdi2_s8, __rotldi3): New functions. diff --git a/config/avr/avr-protos.h b/config/avr/avr-protos.h index fd00a4e..a95e611 100644 --- a/config/avr/avr-protos.h +++ b/config/avr/avr-protos.h @@ -132,6 +132,8 @@ extern bool avr_xload_libgcc_p (enum machine_mode); extern void asm_output_float (FILE *file, REAL_VALUE_TYPE n); #endif +extern bool avr_have_dimode; + /* From avr-log.c */ #define avr_edump (avr_log_set_caller_e (__FUNCTION__)) diff --git a/config/avr/avr.c b/config/avr/avr.c index 551d7c6..1806ac8 100644 --- a/config/avr/avr.c +++ b/config/avr/avr.c @@ -145,6 +145,9 @@ static const char * const progmem_section_prefix[6] = ".progmem5.data" }; +/* Condition for insns/expanders from avr-dimode.md. */ +bool avr_have_dimode = true; + /* To track if code will use .bss and/or .data. */ bool avr_need_clear_bss_p = false; bool avr_need_copy_data_p = false; diff --git a/config/avr/avr.opt b/config/avr/avr.opt index eaa8df5..bb9c90e 100644 --- a/config/avr/avr.opt +++ b/config/avr/avr.opt @@ -77,7 +77,3 @@ When accessing RAM, use X as imposed by the hardware, i.e. just use pre-decremen mbranch-cost= Target Report RejectNegative Joined UInteger Var(avr_branch_cost) Init(0) Set the cost of a branch instruction. Default value is 0. - -m64 -Target Report Var(avr_have_dimode) Init(0) -Experimental.