From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755545AbcG0Lm7 (ORCPT ); Wed, 27 Jul 2016 07:42:59 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38746 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753636AbcG0Lm6 (ORCPT ); Wed, 27 Jul 2016 07:42:58 -0400 Subject: Re: [PATCH v15 04/10] arm64: Kprobes with single stepping support To: Dave Martin References: <578FA238.3050206@arm.com> <5790F960.5050007@linaro.org> <57910528.7070902@arm.com> <57911590.50305@linaro.org> <20160722101617.GA17821@e104818-lin.cambridge.arm.com> <57924104.1080202@linaro.org> <20160725171350.GE2423@e104818-lin.cambridge.arm.com> <20160726175447.GA28376@leverpostej> <20160727113759.GB7147@e103592.cambridge.arm.com> Cc: Mark Rutland , Yang Shi , Zi Shen Lim , Will Deacon , Andrey Ryabinin , yalin wang , Li Bin , Jisheng Zhang , John Blackwood , Pratyush Anand , David Long , Catalin Marinas , Huang Shijie , Petr Mladek , Vladimir Murzin , Steve Capper , Suzuki K Poulose , Marc Zyngier , Mark Brown , Sandeepa Prabhu , William Cohen , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Adam Buchbinder , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Masami Hiramatsu , Andrew Morton , Robin Murphy , Jens Wiklander , Christoffer Dall From: Daniel Thompson Message-ID: <0bb682ba-aede-97a3-c858-4cd1c28fd68b@linaro.org> Date: Wed, 27 Jul 2016 12:42:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160727113759.GB7147@e103592.cambridge.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/07/16 12:38, Dave Martin wrote: > On Wed, Jul 27, 2016 at 12:19:59PM +0100, Daniel Thompson wrote: > > [...] > >> It is interesting to note that you force large_func() to stack its arguments >> (by providing 8 dummy int arguments first) then the implicit >> pass-by-reference behavior is still preserved even for a stacked argument; >> large_func() ends up as: >> >> ~~~ >> large_func: >> ldr x0, [sp] >> ldr x0, [x0] >> ret >> ~~~ >> >> Only thing is... I *still* haven't found anything in the AArch64 PCS which >> describes this behavior. >> >> I'm coming to believe that this is a mistake and this information (and the >> threshold at which implicit pass-by-reference kicks in) should be documented >> in section 7. > > Is that answered by this? > > B.3. If the argument type is a Composite Type that is larger than > 16 bytes, then the argument is copied to memory allocated by the > caller and the argument is replaced by a pointer to the copy. > > Experimenting with gcc's behaviour seems to back this up. Absolutely answered by that. Thanks (and sorry for the noise)! Daniel.