[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: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully
Date: Thu, 26 Feb 2015 06:31:55 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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.


reply via email to

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