From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21521 invoked by alias); 21 Oct 2014 21:11:35 -0000 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 Received: (qmail 21505 invoked by uid 89); 21 Oct 2014 21:11:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 21 Oct 2014 21:11:29 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9LLBPiR022525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 Oct 2014 17:11:25 -0400 Received: from [10.3.113.119] (ovpn-113-119.phx2.redhat.com [10.3.113.119]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9LLBO5g028325; Tue, 21 Oct 2014 17:11:24 -0400 Message-ID: <5446CC00.9000009@redhat.com> Date: Tue, 21 Oct 2014 21:25:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Bernd Schmidt , GCC Patches Subject: Re: The nvptx port [7/11+] Inform the port about call arguments References: <54451994.9070209@codesourcery.com> <54451C57.5020705@codesourcery.com> In-Reply-To: <54451C57.5020705@codesourcery.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg02177.txt.bz2 On 10/20/14 14:29, Bernd Schmidt wrote: > In ptx assembly we need to decorate call insns with the arguments that > are being passed. We also need to know the exact function type. This is > kind of hard to do with the existing infrastructure since things like > function_arg are called at other times rather than just when emitting a > call, so this patch adds two more hooks, one called just before argument > registers are loaded (once for each arg), and the other just after the > call is complete. > > > Bernd > > > 007-callargs.diff > > > gcc/ > * target.def (call_args, end_call_args): New hooks. > * hooks.c (hook_void_rtx_tree): New empty function. > * hooks.h (hook_void_rtx_tree): Declare. > * doc/tm.texi.in (TARGET_CALL_ARGS, TARGET_END_CALL_ARGS): Add. > * doc/tm.texi: Regenerate. > * calls.c (expand_call): Slightly rearrange the code. Use the two new > hooks. > (expand_library_call_value_1): Use the two new hooks. How exactly do you need to decorate? Just mention the register, size information or do you need full type information? We've had targets where we had to indicate register banks for each argument. Those would walk CALL_INSN_FUNCTION_USAGE to find the argument registers, then from the register # we would know which register bank to use. Would that work for you? Jeff