aboutsummaryrefslogtreecommitdiff
path: root/target/microblaze/gdbstub.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-08-18 11:58:23 -0700
committerRichard Henderson <richard.henderson@linaro.org>2020-09-01 07:41:38 -0700
commit1074c0fb9153f631ce93f7e7d74b935fdcb0d82a (patch)
treee1ea24a332b03f32dcad83ae06aefafc57e2374a /target/microblaze/gdbstub.c
parent480d29a8fa842ca94297600397041f0efb0c7bd0 (diff)
target/microblaze: Split out MSR[C] to its own variable
Having the MSR[C] bit separate will improve arithmetic that operates on the carry bit. Having mb_cpu_read_msr() populate MSR[CC] will prevent the carry copy not matching the carry bit. Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/microblaze/gdbstub.c')
-rw-r--r--target/microblaze/gdbstub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c
index 9cba9d2215..08d6a0e807 100644
--- a/target/microblaze/gdbstub.c
+++ b/target/microblaze/gdbstub.c
@@ -62,7 +62,7 @@ int mb_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
val = env->pc;
break;
case GDB_MSR:
- val = env->msr;
+ val = mb_cpu_read_msr(env);
break;
case GDB_EAR:
val = env->ear;
@@ -118,7 +118,7 @@ int mb_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
env->pc = tmp;
break;
case GDB_MSR:
- env->msr = tmp;
+ mb_cpu_write_msr(env, tmp);
break;
case GDB_EAR:
env->ear = tmp;