diff options
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/aarch64-dis.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index e0834bf..3c2cf16 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2018-05-01 Tamar Christina <tamar.christina@arm.com> + + * aarch64-dis.c (aarch64_opcode_decode): Moved memory clear code. + 2018-04-30 Francois H. Theron <francois.theron@netronome.com> Makefile.am: Added nfp-dis.c. diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index c63f595..e7bece9 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -2733,6 +2733,9 @@ aarch64_opcode_decode (const aarch64_opcode *opcode, const aarch64_insn code, assert (opcode && inst); + /* Clear inst. */ + memset (inst, '\0', sizeof (aarch64_inst)); + /* Check the base opcode. */ if ((code & opcode->mask) != (opcode->opcode & opcode->mask)) { @@ -2740,9 +2743,6 @@ aarch64_opcode_decode (const aarch64_opcode *opcode, const aarch64_insn code, goto decode_fail; } - /* Clear inst. */ - memset (inst, '\0', sizeof (aarch64_inst)); - inst->opcode = opcode; inst->value = code; |