[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __li
From: |
Chen Gang S |
Subject: |
Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully |
Date: |
Wed, 25 Feb 2015 01:08:18 +0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 2/25/15 00:42, Richard Henderson wrote:
> On 02/24/2015 05:39 AM, Chen Gang S wrote:
>> After read through target-arm/translate-a64.c, I guess, the main reason
>> is: the zero register (r31) shares with the sp register (also r31).
>>
>> - So it uses cpu_reg() and cpu_reg_sp() for them.
>>
>> - For each zero register access, it will new a tcg temporary variable
>> for it, and release it after finish decoding one insn (so it will not
>> overwrite sp register.).
>>
>> For tilegx, zero register (r63) does not share with other registers (sp
>> is r54), so we needn't use wrap functions for it.
>
> Perhaps aarch64 is confusing for you. But Alpha also has zero registers, and
> also uses wrapper functions. See load_gpr and dest_gpr.
>
> The very most important reason to use a wrapper, and thus a tcg temporary that
> keeps getting re-initialized to zero, is that the tcg optimizer gets to see
> that zero and optimize the code accordingly.
>
OK, thanks, what you said above sounds reasonable to me, I shall use tcg
temporary variable for zero register, when I send patch v2.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully, Richard Henderson, 2015/02/24