diff options
author | Matthias Welwarsky <matthias.welwarsky@sysgo.com> | 2016-10-20 16:48:42 +0200 |
---|---|---|
committer | Matthias Welwarsky <matthias.welwarsky@sysgo.com> | 2017-02-10 14:18:35 +0100 |
commit | 822ebda6747b747f5c366bc41f3cc897f344aee4 (patch) | |
tree | 3742af5190888d425b4482fe442db58d1fd40330 /src/target | |
parent | f7dbcc3fab3d5b52710f235ae3ead3135cf9c2e6 (diff) |
aarch64: enlarge value buffer of arm_reg to store 64 bit
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>
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/arm.h | 2 | ||||
-rw-r--r-- | src/target/armv8.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/target/arm.h b/src/target/arm.h index 25480387..e5e336df 100644 --- a/src/target/arm.h +++ b/src/target/arm.h @@ -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); diff --git a/src/target/armv8.c b/src/target/armv8.c index a2a099d6..54ec42f0 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -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]; |