aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-03-16 17:21:38 +0000
committerAlex Bennée <alex.bennee@linaro.org>2020-03-17 17:38:38 +0000
commit8b1ca58c3b0789a41c75d8626ba65a8c35e16b58 (patch)
tree1053a194b3f82f88a2b2d1ecbbf52104f79d5ec5
parent532cc1fb44823d2df55eebde2501e95cf83b4b9a (diff)
downloadqemu-8b1ca58c3b0789a41c75d8626ba65a8c35e16b58.zip
qemu-8b1ca58c3b0789a41c75d8626ba65a8c35e16b58.tar.gz
qemu-8b1ca58c3b0789a41c75d8626ba65a8c35e16b58.tar.bz2
target/arm: use gdb_get_reg helpers
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200316172155.971-12-alex.bennee@linaro.org>
-rw-r--r--target/arm/helper.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c
index b61ee73..69104fb 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -106,21 +106,17 @@ static int aarch64_fpu_gdb_get_reg(CPUARMState *env, uint8_t *buf, int reg)
{
switch (reg) {
case 0 ... 31:
- /* 128 bit FP register */
- {
- uint64_t *q = aa64_vfp_qreg(env, reg);
- stq_le_p(buf, q[0]);
- stq_le_p(buf + 8, q[1]);
- return 16;
- }
+ {
+ /* 128 bit FP register - quads are in LE order */
+ uint64_t *q = aa64_vfp_qreg(env, reg);
+ return gdb_get_reg128(buf, q[1], q[0]);
+ }
case 32:
/* FPSR */
- stl_p(buf, vfp_get_fpsr(env));
- return 4;
+ return gdb_get_reg32(buf, vfp_get_fpsr(env));
case 33:
/* FPCR */
- stl_p(buf, vfp_get_fpcr(env));
- return 4;
+ return gdb_get_reg32(buf,vfp_get_fpcr(env));
default:
return 0;
}