From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRj5C-0007VF-Q3 for qemu-devel@nongnu.org; Fri, 05 Feb 2016 11:18:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRj58-0006K1-N7 for qemu-devel@nongnu.org; Fri, 05 Feb 2016 11:18:06 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRj58-0006JU-GD for qemu-devel@nongnu.org; Fri, 05 Feb 2016 11:18:02 -0500 Received: by mail-wm0-x22b.google.com with SMTP id g62so34217510wme.0 for ; Fri, 05 Feb 2016 08:18:01 -0800 (PST) References: <1454506721-11843-1-git-send-email-peter.maydell@linaro.org> <1454506721-11843-6-git-send-email-peter.maydell@linaro.org> <87io23nsqe.fsf@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: Date: Fri, 05 Feb 2016 16:17:57 +0000 Message-ID: <87egcrnnbe.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 5/7] target-arm: Add isread parameter to CPAccessFns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Edgar E. Iglesias" , qemu-arm , QEMU Developers , Patch Tracking Peter Maydell writes: > On 5 February 2016 at 14:20, Alex Bennée wrote: >> >> Peter Maydell writes: >>> -typedef CPAccessResult CPAccessFn(CPUARMState *env, const ARMCPRegInfo *opaque); >>> +typedef CPAccessResult CPAccessFn(CPUARMState *env, >>> + const ARMCPRegInfo *opaque, >>> + bool isread); >> >> I guess my only comment here is we've extended the call for every access >> check with another parameter (and associated TCG activity) for something >> only one handler currently cares about. >> >> Is there an argument for an rwaccessfn() that we use for just those >> registers that care about the detail? I know system registers are hardly >> a fast path priority but I'm concerned about knock on effects on >> performance. Have you done any measurements? > > I haven't measured, no, but since there are only 3 arguments the > third argument is going to be in a register on any host architecture > we care about, which means the overhead is just going to be a single > "load constant 0 or 1 into register before the call". I think that's > going to be lost in the noise compared to actually having to make > the function call at all, the work the function call does, and then > the second function call later to do the read or write. I was thinking of knock on effects on spilling other registers in the TCG code. I guess this depends on how complex the code is around system register access. > > thanks > -- PMM -- Alex Bennée