[Top][All Lists]

[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: Fri, 27 Feb 2015 07:30:14 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 02/27/2015 12:31 AM, Richard Henderson wrote:
> On 02/25/2015 03:44 PM, Chen Gang S wrote:
>> OK, thanks. After check ISA document again, for me, we have to still use
>> "y0, y1, y2", e.g. de5e598034ac3000 { fnop ; jalr r12 ; st r10, r11 }
>>  If y0 -> y1 -> y2:
>>  - if jalr succeeds, it will write pc to sp stack, but sp is not changed
>>    (just like lr, pc, they are buffered to tcg temporary variables).
>>  - if st fails, as the result, we can still say the whole bundle is not
>>    execute (it has already written pc to sp stack, but sp isn't changed,
>>    so it is still OK).
>>  If y0 -> y2 -> y1:
>>  - if st succeeds, it will write data to the useful memory.
>>  - if jalr fails (e.g. sp stack is full, which may cause memory access
>>    issue), we can not restore the bundle.
> You need to re-check the ISA document.  JALR does not write to the "real" 
> stack
> at all, and cannot raise any kind of exception.
> Section clearly defines pushReturnStack as part of the branch
> prediction mechanism on the cpu.  It can be completely ignored for QEMU.

OK, thanks. What you said above sounds reasonable to me.

Open, share, and attitude like air, water, and life which God blessed.

reply via email to

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