From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4949 invoked by alias); 3 Aug 2011 16:24:54 -0000 Received: (qmail 4891 invoked by uid 22791); 3 Aug 2011 16:24:46 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Aug 2011 16:24:28 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p73GORVu013253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Aug 2011 12:24:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p73GOQah013018; Wed, 3 Aug 2011 12:24:26 -0400 Received: from [10.3.113.20] (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p73GOOpJ021889; Wed, 3 Aug 2011 12:24:25 -0400 Message-ID: <4E397638.40802@redhat.com> Date: Wed, 03 Aug 2011 16:24:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: Georg-Johann Lay CC: Richard Henderson , GCC Patches , Denis Chertykov Subject: Re: [RFC] Cleanup DW_CFA_GNU_args_size handling References: <4E36D44A.6020607@redhat.com> <4E36F3AF.3070300@gjlay.de> <4E36F48F.4040106@redhat.com> <4E393BBB.8030300@gjlay.de> <4E395612.8060806@gjlay.de> In-Reply-To: <4E395612.8060806@gjlay.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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-08/txt/msg00366.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/03/11 08:07, Georg-Johann Lay wrote: > Georg-Johann Lay wrote: >> Richard Henderson wrote: >>> On 08/01/2011 11:42 AM, Georg-Johann Lay wrote: >>>> Is there a specific reason not to define >>>> ACCUMULATE_OUTGOING_ARGS on AVR? >>> Yes. So that you can use PUSH. But as I said in PR49881, you >>> probably want to provide -maccumulate-outgoing-args. >>> >>> I have a follow-up patch to the last one in that PR... >>> >>> >>> r~ >> >> PUSH is fine but what about POP? >> >> It's very expensive to pop several bytes, i.e. disabling IRQs, >> loading and storing SP and the like. Usung store+displacement has >> not this drawback and as I wrote, come code degradations you >> explained in PR49881 are artifacts of PR46278, i.e. fake X >> addressing. >> >> Johann >> > > Tried this test case: > > #include > > void foo () { printf ("%d %d %d", 1, 2, 3); printf ("%d %d %d", 3, 4, > 5); printf ("%d %d %d", 1, 4, 5); } > > Attached the output: The compiler happily pushes onto the stack but > pops only at the end of the function. So in a function with many such > calls that would eat up great deal of RAM. It that what we want? > > RETURN_POPS_ARGS cannot help here. Popping arguments is deferred until the accumulated size of the deferred argument pops reaches a particular threshold or certain other conditions are met (see NO_DEFER_POP). I don't recall the parameters used to determine when the accumulated size is large enough to force pops, but I'm sure you can find it with a little searching in the GCC sources. Ahhh, memories of the m68k... jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOOXY4AAoJEBRtltQi2kC79VkH/Ar4NFKpU9mMXS+Pswz3vuOT 6Mv0pWGmuACBz7r69NZ9WNb2PQBXTJUp/vQJUbvKxIBFWmtEc6wRO1kYz3NuZ9FX MRTXO+Mo3TWkFtzr5krq6d3r0CYVwa3ta/U/XNwvoo+XAUVkuYQgJi0C85yBQBwM M9Q8nzWaJxAohSh+r6tOIBBdFG66YnfmZAYxLnsOaS5akm4tMuS6D5KFnJVJZbc7 btjNYzLvjCBXuekuHCyaq3HxpTTmhKWCFXuy55fUiOZGJJabPfTfbXlRaM5pGkPk eo6gR9ydvMIt0RbYCSpqNy1RE+bOfeawqnoE/Mx86ZIzJZuLWOz+3K8UI5cINJ4= =2Kgl -----END PGP SIGNATURE-----