qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated co


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code
Date: Mon, 7 Apr 2014 12:28:23 +0100

On 7 April 2014 12:11, Claudio Fontana <address@hidden> wrote:
[your mail client is generating very long lines]
> My doubt was about the AAPCS64 (Procedure Call standard for the
> ARM 64-bit Architecture), and what the platforms in our case dictate
> regarding FP and LR use.
>
> I think that LR should be ok to use, because basically the whole
> generated code from the prologue to the end can be seen as a single
> big subroutine, and there does not seem to be a clear mandate to
> keep LR's special significance inside subroutines at all times.

Agreed.

> The role of the registers is described in 5.1.1, where it is
> mentioned that "in all variants of the pcs, registers r16,r17,r29
> and r30 have special roles" [...]
>
> The standard says at 5.2.3 that "conforming code" shall construct
> a linked list of stack frames, [...] A platform shall mandate the
> minimum level of conformance[...].

Since our TCG generated code is not platform specific we should
take the most conservative approach, and make sure we set up
a frame record in the prologue and don't touch FP after that.

thanks
-- PMM



reply via email to

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