From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11391 invoked by alias); 6 Jul 2011 13:49:52 -0000 Received: (qmail 11377 invoked by uid 22791); 6 Jul 2011 13:49:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ew0-f47.google.com (HELO mail-ew0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 13:49:35 +0000 Received: by ewy5 with SMTP id 5so2785633ewy.20 for ; Wed, 06 Jul 2011 06:49:34 -0700 (PDT) Received: by 10.14.14.160 with SMTP id d32mr2497193eed.70.1309960174208; Wed, 06 Jul 2011 06:49:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.101.143 with HTTP; Wed, 6 Jul 2011 06:49:14 -0700 (PDT) In-Reply-To: <4E144C61.60600@gjlay.de> References: <4E144C61.60600@gjlay.de> From: Denis Chertykov Date: Wed, 06 Jul 2011 13:57:00 -0000 Message-ID: Subject: Re: [Path,AVR]: Improve loading of 32-bit constants To: Georg-Johann Lay Cc: gcc-patches@gcc.gnu.org, Eric Weddington , Anatoly Sokolov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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-07/txt/msg00341.txt.bz2 2011/7/6 Georg-Johann Lay : > For loading a 32-bit constant in a register, there is room for > improvement: > > * SF can be handled the same way as SI and therefore the patch > =C2=A0adds a peep2 to produce a *reload_insf analogon to *reload_insi. > > * If the destination register overlaps NO_LD_REGS, values already > =C2=A0loaded into some other byte can be reused by a simple MOV. > =C2=A0This is helpful then moving values like, e.g. -2, -100 etc. because > =C2=A0all high bytes are 0xff. > > * 0.0f can be directly moved to memory. > > * The mov insns contain "!d" constraint. I see no reason to make "d" > =C2=A0expensive and discourage use of d-regs. =C2=A0A "*d" to hide is bet= ter > =C2=A0because it does it neither puts additional pressure on "d" nor > =C2=A0discourages "d". > I would like to have a real code examples. Denis.