From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfrR4-0005Vt-Cy for qemu-devel@nongnu.org; Thu, 01 May 2014 09:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfrQz-0006oW-VN for qemu-devel@nongnu.org; Thu, 01 May 2014 09:54:02 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:41180 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfrQz-0006oE-PH for qemu-devel@nongnu.org; Thu, 01 May 2014 09:53:57 -0400 References: <1398926097-28097-1-git-send-email-edgar.iglesias@gmail.com> <1398926097-28097-3-git-send-email-edgar.iglesias@gmail.com> <87r44drhwo.fsf@linaro.org> <20140501114303.GA18802@zapo.iiNet> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <20140501114303.GA18802@zapo.iiNet> Date: Thu, 01 May 2014 14:55:07 +0100 Message-ID: <87mwf1r4ck.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v1 2/4] target-arm: A64: Handle blr lr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Peter Maydell , QEMU Developers Edgar E. Iglesias writes: > On Thu, May 01, 2014 at 10:31:06AM +0100, Peter Maydell wrote: >> On 1 May 2014 10:02, Alex Bennée wrote: >> > >> > Edgar E. Iglesias writes: >> > >> >> From: "Edgar E. Iglesias" >> >> >> >> For linked branches, updates to the link register happen >> >> conceptually after the read of the branch target register. >> >> >> >> Signed-off-by: Edgar E. Iglesias >> > >> > I'm trying to think of a case where this could actually cause a problem >> > but I can't. However from a clarity/correctness point of view it's >> > better. >> >> Well, we actually misexecute "BLR LR" otherwise, right? >> That's probably not very common but there's no reason it >> might not occur (eg call to a function pointer from a >> function where LR has been saved on entry and is free >> for use as a generic tempreg). > > Right. For example, the kernel/kvm actually does this in > arch/arm64/kvm/hyp.S:773: blr lr Of course, I see know ;-) -- Alex Bennée