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: Laurent Desnogues
Subject: Re: [Qemu-devel] [PATCH 9/9] cpu-exec.c: avoid AREG0 use
Date: Sun, 22 May 2011 19:33:51 +0200

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:
>>    /* stmdb sp!, { r4 - r6, r8 - r11, lr } */
>>    tcg_out32(s, (COND_AL << 28) | 0x092d4f70);
>>
>>    /* ldmia sp!, { r4 - r6, r8 - r11, pc } */
>>    tcg_out32(s, (COND_AL << 28) | 0x08bd8f70);
>
> That would be ...ff0 rather than ...f70 in both cases
> (bottom 16 bits are a bit map of registers being saved/loaded):
>
>    /* stmdb sp!, { r4 - r11, lr } */
>    tcg_out32(s, (COND_AL << 28) | 0x092d4ff0);
>
>    /* ldmia sp!, { r4 - r11, pc } */
>    tcg_out32(s, (COND_AL << 28) | 0x08bd8ff0);

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


Laurent



reply via email to

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