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 blauwir...@gmail.com 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

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

2011-05-22 Thread Blue Swirl
Make functions take a parameter for CPUState instead of relying on global env. Pass CPUState pointer to TCG prologue, which moves it to AREG0. Revert the hacks to avoid AREG0 use on Sparc hosts. Move cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. Compile the file without

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 blauwir...@gmail.com 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

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 blauwir...@gmail.com 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 } */    

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 peter.mayd...@linaro.org wrote: On 22 May 2011 17:55, Blue Swirl blauwir...@gmail.com 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

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 laurent.desnog...@gmail.com wrote: On Sun, May 22, 2011 at 7:10 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 May 2011 17:55, Blue Swirl blauwir...@gmail.com wrote: For ARM, the handcrafted instructions below need to be changed to save also