target-mips: Correct the writes to Status and Cause registers via gdbstub
authorMaciej W. Rozycki <macro@codesourcery.com>
Mon, 10 Nov 2014 13:46:35 +0000 (13:46 +0000)
committerLeon Alrae <leon.alrae@imgtec.com>
Tue, 16 Dec 2014 12:45:19 +0000 (12:45 +0000)
commit81a423e6c6d3ccaa79de4e58024369c660c1eeb4
treeccc5e90b146ffa3e0d8a6c40888b063cae188961
parentf88f79ec9df06d26d84e1d2e0c02d2634b4d8583
target-mips: Correct the writes to Status and Cause registers via gdbstub

Make writes to CP0.Status and CP0.Cause have the same effect as
executing corresponding MTC0 instructions would in Kernel Mode.  Also
ignore writes in the user emulation mode.

Currently for requests from the GDB stub we write all the bits across
both registers, ignoring any read-only locations, and do not synchronise
the environment to evaluate side effects.  We also write these registers
in the user emulation mode even though a real kernel presents them as
read only.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
target-mips/cpu.h
target-mips/gdbstub.c
target-mips/op_helper.c