aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/gdbstub.c
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2015-05-07 14:35:44 -0400
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-05-27 17:52:03 +0200
commitc498d8e36e2998fb67de21a34ece633d356a4834 (patch)
tree5b767101eb99af8c7adefdec65cbae2f737325f0 /target-s390x/gdbstub.c
parent0915aed5842bd4dbe396b92d4f3b846ae29ad663 (diff)
downloadqemu-c498d8e36e2998fb67de21a34ece633d356a4834.zip
qemu-c498d8e36e2998fb67de21a34ece633d356a4834.tar.gz
qemu-c498d8e36e2998fb67de21a34ece633d356a4834.tar.bz2
s390x: Common access to floating point registers
Provide a routine to access the correct floating point register, to simplify future expansion. Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/gdbstub.c')
-rw-r--r--target-s390x/gdbstub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c
index 8945f02..40bdfe7 100644
--- a/target-s390x/gdbstub.c
+++ b/target-s390x/gdbstub.c
@@ -111,7 +111,7 @@ static int cpu_read_fp_reg(CPUS390XState *env, uint8_t *mem_buf, int n)
case S390_FPC_REGNUM:
return gdb_get_reg32(mem_buf, env->fpc);
case S390_F0_REGNUM ... S390_F15_REGNUM:
- return gdb_get_reg64(mem_buf, env->fregs[n - S390_F0_REGNUM].ll);
+ return gdb_get_reg64(mem_buf, get_freg(env, n - S390_F0_REGNUM)->ll);
default:
return 0;
}
@@ -124,7 +124,7 @@ static int cpu_write_fp_reg(CPUS390XState *env, uint8_t *mem_buf, int n)
env->fpc = ldl_p(mem_buf);
return 4;
case S390_F0_REGNUM ... S390_F15_REGNUM:
- env->fregs[n - S390_F0_REGNUM].ll = ldtul_p(mem_buf);
+ get_freg(env, n - S390_F0_REGNUM)->ll = ldtul_p(mem_buf);
return 8;
default:
return 0;