[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: |
Claudio Fontana |
Subject: |
Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code |
Date: |
Mon, 7 Apr 2014 13:11:20 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
On 07.04.2014 11:49, Peter Maydell wrote:
> On 7 April 2014 09:03, Claudio Fontana <address@hidden> wrote:
>> On 03.04.2014 21:56, Richard Henderson wrote:
>>> It's obviously call-clobbered, but is otherwise unused.
>>> Repurpose it as the TCG temporary.
>
>> Giving one last chance to the ARM guys to speak up about repurposing LR.
>
> Can you clarify what you think the issue is with using LR?
> I think you said before but I forget :-(
>
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.
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[...]. Options are:
* It may require the frame pointer to address a valid frame record at all
times, except that small subroutines which do not modify the link register may
elect not to create a frame record
* It may require the frame pointer to address a valid frame record at all
times, except that any subroutine may elect not to create a frame record
* It may permit the frame pointer register to be used as a general-purpose
callee-saved register, but provide a platform-specific mechanism for external
agents to reliably detect this condition
* It may elect not to maintain a frame chain and to use the frame pointer
register as a general-purpose callee-saved register.
I think however that since the latest version of RH's patches do not repurpose
FP, this is not that relevant anymore, but I think that the general question
remains topical, ie, which of these options do our platforms dictate?
Thanks,
Claudio
- [Qemu-devel] [PATCH v3 04/26] tcg-aarch64: Use MOVN in tcg_out_movi, (continued)
- [Qemu-devel] [PATCH v3 04/26] tcg-aarch64: Use MOVN in tcg_out_movi, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 05/26] tcg-aarch64: Use ORRI in tcg_out_movi, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 06/26] tcg-aarch64: Special case small constants in tcg_out_movi, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 07/26] tcg-aarch64: Use adrp in tcg_out_movi, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 08/26] tcg-aarch64: Use symbolic names for branches, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 09/26] tcg-aarch64: Create tcg_out_brcond, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 10/26] tcg-aarch64: Use CBZ and CBNZ, Richard Henderson, 2014/04/03
- [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code, Richard Henderson, 2014/04/03
- Re: [Qemu-devel] [PATCH v3 11/26] tcg-aarch64: Reuse LR in translated code, Claudio Fontana, 2014/04/11
[Qemu-devel] [PATCH v3 12/26] tcg-aarch64: Introduce tcg_out_insn_3314, Richard Henderson, 2014/04/03
[Qemu-devel] [PATCH v3 13/26] tcg-aarch64: Implement tcg_register_jit, Richard Henderson, 2014/04/03
[Qemu-devel] [PATCH v3 14/26] tcg-aarch64: Avoid add with zero in tlb load, Richard Henderson, 2014/04/03
[Qemu-devel] [PATCH v3 15/26] tcg-aarch64: Use tcg_out_call for qemu_ld/st, Richard Henderson, 2014/04/03
[Qemu-devel] [PATCH v3 16/26] tcg-aarch64: Use ADR to pass the return address to the ld/st helpers, Richard Henderson, 2014/04/03
[Qemu-devel] [PATCH v3 17/26] tcg-aarch64: Use TCGMemOp in qemu_ld/st, Richard Henderson, 2014/04/03