qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 9/9] cpu-exec.c: avoid AREG0 use


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 9/9] cpu-exec.c: avoid AREG0 use
Date: Sun, 22 May 2011 19:01:12 +0100

On 22 May 2011 18:33, Laurent Desnogues <address@hidden> wrote:
> On Sun, May 22, 2011 at 7:10 PM, Peter Maydell <address@hidden> wrote:
>> On 22 May 2011 17:55, Blue Swirl <address@hidden> wrote:
>>> For ARM, the handcrafted instructions below need to be changed to save also 
>>> r7:

>> That would be ...ff0 rather than ...f70 in both cases
>> (bottom 16 bits are a bit map of registers being saved/loaded):

> Shouldn't you extend the range to include r12, due to
> the 8-byte alignment restriction of the stack?

Oops, good point.

    /* Calling convention requires us to save r4-r11 and lr;
     * save also r12 to maintain stack 8-alignment.
     */

    /* stmdb sp!, { r4 - r12, lr } */
    tcg_out32(s, (COND_AL << 28) | 0x092d5ff0);

    /* ldmia sp!, { r4 - r12, pc } */
    tcg_out32(s, (COND_AL << 28) | 0x08bd9ff0);

-- PMM



reply via email to

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