On Feb 15, 2011, at 11:22 AM, Peter Maydell wrote: > On 15 February 2011 08:59, Tristan Gingold <ging...@adacore.com> wrote: >> @@ -770,7 +770,8 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t >> *mem_buf, int n) >> /* fpscr */ >> if (gdb_has_xml) >> return 0; >> - return 4; >> + env->fpscr = ldtul_p(mem_buf); >> + return sizeof(target_ulong); >> } >> } >> return 0; > > Not a PPC expert, but this doesn't look right; for instance if you change > the rounding mode by fiddling with the FPSCR in the debugger this > won't update the softfloat rounding mode settings. (that is, it lets the > visible state in env->fpscr get out of sync with the hidden state of the > model). Also we probably shouldn't be letting the debugger change > reserved fpscr bits.
Indeed, you're right. We initially were interested in reading fpscr, and I wrote the writing part without thinking enough. Tristan.