qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 2/4] target-arm: A64: Handle blr lr


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [PATCH v1 2/4] target-arm: A64: Handle blr lr
Date: Thu, 1 May 2014 21:43:03 +1000
User-agent: Mutt/1.5.21+155 (d3096e8796e7) (2012-12-30)

On Thu, May 01, 2014 at 10:31:06AM +0100, Peter Maydell wrote:
> On 1 May 2014 10:02, Alex Bennée <address@hidden> wrote:
> >
> > Edgar E. Iglesias <address@hidden> writes:
> >
> >> From: "Edgar E. Iglesias" <address@hidden>
> >>
> >> For linked branches, updates to the link register happen
> >> conceptually after the read of the branch target register.
> >>
> >> Signed-off-by: Edgar E. Iglesias <address@hidden>
> >
> > 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

Thanks,
Edgar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]