qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return addr


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument
Date: Tue, 27 Aug 2013 00:26:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 26/08/2013 23:00, Richard Henderson ha scritto:
> Allow the code that tcg generates to be less obtuse, passing in
> the return address directly instead of computing it in the helper.
> 
> Maintain the old entrance point unchanged as an alternate entry point.
> 
> Delete the helper_st*_cmmu prototypes; the implementations did not exist.
> 
> Signed-off-by: Richard Henderson <address@hidden>

Something that can be done on top of this patch: what about moving the
"-1" to helper_ret_*?  It is common to pretty much all the targets
(except ARM has -2), and it would allow some simplifications.  For
example I played with return address helpers on 32-bit PPC, and you
could use a

    li   rN, retaddr
    mtlr rN
    b    st_trampoline[i]

sequence instead of one of

    li   rN, retaddr
    mtlr rN
    bl   st_trampoline[i]
    b    retaddr

or

    li   rN, retaddr
    mtlr rN
    addi rN, rN, -1
    b    st_trampoline[i]

Paolo



reply via email to

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