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

2011-05-23 Thread Aurelien Jarno
On Sun, May 22, 2011 at 07:55:53PM +0300, Blue Swirl wrote: > On Sun, May 22, 2011 at 2:18 PM, Blue Swirl wrote: > > Make functions take a parameter for CPUState instead of relying > > on global env. Pass CPUState pointer to TCG prologue, which moves > > it to AREG0. > > I found the problem with

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

2011-05-22 Thread Peter Maydell
On 22 May 2011 18:33, Laurent Desnogues wrote: > On Sun, May 22, 2011 at 7:10 PM, Peter Maydell > wrote: >> On 22 May 2011 17:55, Blue Swirl 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

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

2011-05-22 Thread Laurent Desnogues
On Sun, May 22, 2011 at 7:10 PM, Peter Maydell wrote: > On 22 May 2011 17:55, Blue Swirl 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); >> >>    /* ldm

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

2011-05-22 Thread Peter Maydell
On 22 May 2011 17:55, Blue Swirl 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

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

2011-05-22 Thread Blue Swirl
On Sun, May 22, 2011 at 2:18 PM, Blue Swirl wrote: > Make functions take a parameter for CPUState instead of relying > on global env. Pass CPUState pointer to TCG prologue, which moves > it to AREG0. I found the problem with this patch on i386, TCG assumes that its caller is also using global env