aarch64: enlarge value buffer of arm_reg to store 64 bit
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Thu, 20 Oct 2016 14:48:42 +0000 (16:48 +0200)
committerMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Fri, 10 Feb 2017 13:18:35 +0000 (14:18 +0100)
struct arm_reg::value[] must be 8 byte to hold a 64bit register value.

Change-Id: If253e90731d0ee855eafd9d7b63b91f84630cc7c
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
src/target/arm.h
src/target/armv8.c

index 254803873b5e68810ddea63c3f814629769df802..e5e336dff7f3094432be3fd3d77eb00b90b02f0f 100644 (file)
@@ -235,7 +235,7 @@ struct arm_reg {
        enum arm_mode mode;
        struct target *target;
        struct arm *arm;
-       uint8_t value[4];
+       uint8_t value[8];
 };
 
 struct reg_cache *arm_build_reg_cache(struct target *target, struct arm *arm);
index a2a099d66434f2467dc8e6b7988a60db1b79dcbe..54ec42f0c42696e05e377c88d74fd4d0755b48d0 100644 (file)
@@ -1168,7 +1168,7 @@ struct reg_cache *armv8_build_reg_cache(struct target *target)
 
                reg_list[i].name = armv8_regs[i].name;
                reg_list[i].size = armv8_regs[i].bits;
-               reg_list[i].value = calloc(1, 8);
+               reg_list[i].value = &arch_info[i].value[0];
                reg_list[i].type = &armv8_reg_type;
                reg_list[i].arch_info = &arch_info[i];