Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Alexander Graf
On 19.03.2013, at 19:32, Richard Henderson wrote: > On 03/19/2013 10:20 AM, Fabien Chouteau wrote: >> Cleaner solution indeed. I'll do the opposite, store_fpscr calls >> helper_store_fpscr. > > The declarations won't be in the right places for that to work right. > > Canonically, cpu_store_fps

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Richard Henderson
On 03/19/2013 10:20 AM, Fabien Chouteau wrote: > Cleaner solution indeed. I'll do the opposite, store_fpscr calls > helper_store_fpscr. The declarations won't be in the right places for that to work right. Canonically, cpu_store_fpscr should be declared in cpu.h, have the leading "cpu_" prefix,

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Peter Maydell
On 19 March 2013 17:20, Fabien Chouteau wrote: > On 03/19/2013 04:23 PM, Peter Maydell wrote: >> The way we do this on ARM for cpsr_read is: >> * cpsr_read() is defined in target-arm/cpu.h >> * gdbstub.c calls cpsr_read() >> * HELPER(cpsr_read) is mostly a wrapper calling cpsr_read() >> * help

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Fabien Chouteau
On 03/19/2013 04:23 PM, Peter Maydell wrote: > On 19 March 2013 15:14, Fabien Chouteau wrote: >> I can if I include helper.h, unfortunately this file is named helpers.h >> (note the 's') for m68k so I wont be able to include it for all >> platforms. > > The way we do this on ARM for cpsr_read is:

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Peter Maydell
On 19 March 2013 15:14, Fabien Chouteau wrote: > I can if I include helper.h, unfortunately this file is named helpers.h > (note the 's') for m68k so I wont be able to include it for all > platforms. The way we do this on ARM for cpsr_read is: * cpsr_read() is defined in target-arm/cpu.h * gdbs

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Fabien Chouteau
On 03/19/2013 01:10 PM, Alexander Graf wrote: > > On 19.03.2013, at 13:03, Fabien Chouteau wrote: > >> Although the support of this register may be uncomplete, there are no >> reason to prevent the debugger from reading or writing it. >> >> Signed-off-by: Fabien Chouteau >> --- >> gdbstub.c

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Alexander Graf
On 19.03.2013, at 13:13, Peter Maydell wrote: > On 19 March 2013 12:10, Alexander Graf wrote: >> Check out helper_store_fpscr() in target-ppc/fpu_helper.c. Storing >> fpscr has a bunch of side effects that won't happen when you just >> set the env variable. > > Speaking of which, am I missing s

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Peter Maydell
On 19 March 2013 12:10, Alexander Graf wrote: > Check out helper_store_fpscr() in target-ppc/fpu_helper.c. Storing > fpscr has a bunch of side effects that won't happen when you just > set the env variable. Speaking of which, am I missing something, or does the code in machine.c do nothing to ens

Re: [Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Alexander Graf
On 19.03.2013, at 13:03, Fabien Chouteau wrote: > Although the support of this register may be uncomplete, there are no > reason to prevent the debugger from reading or writing it. > > Signed-off-by: Fabien Chouteau > --- > gdbstub.c |3 ++- > target-ppc/translate_init.c |

[Qemu-devel] [PATCH] PPC/GDB: handle read and write of fpscr

2013-03-19 Thread Fabien Chouteau
Although the support of this register may be uncomplete, there are no reason to prevent the debugger from reading or writing it. Signed-off-by: Fabien Chouteau --- gdbstub.c |3 ++- target-ppc/translate_init.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) dif