Skip to contentSkip to conversation

[5821] gdbstub: Fix access to PPC FPRs

Qemu-devel Aurelien Jarno 1 participant 1 message Nov 30, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5821

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5821
Author:   aurel32
Date:     2008-11-30 16:23:18 +0000 (Sun, 30 Nov 2008)

Log Message:
-----------
gdbstub: Fix access to PPC FPRs

Obviously, someone forgot to rebase the index before accessing one of the 32 FPRs.

Modified Paths:
--------------
trunk/gdbstub.c

Modified: trunk/gdbstub.c
===================================================================

gdbstub.c +2 -2
@@ -428,7 +428,7 @@
         GET_REGL(env->gpr[n]);
     } else if (n < 64) {
         /* fprs */
-        stfq_p(mem_buf, env->fpr[n]);
+        stfq_p(mem_buf, env->fpr[n-32]);
         return 8;
     } else {
         switch (n) {
@@ -459,7 +459,7 @@
         return sizeof(target_ulong);
     } else if (n < 64) {
         /* fprs */
-        env->fpr[n] = ldfq_p(mem_buf);
+        env->fpr[n-32] = ldfq_p(mem_buf);
         return 8;
     } else {
         switch (n) {