summaryrefslogtreecommitdiff
path: root/opcodes/aarch64-opc.c
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2018-10-08 13:33:42 +0100
committerTamar Christina <tamar.christina@arm.com>2018-10-08 13:42:37 +0100
commit780f601cf3bfd2eb141c2ea32b673b5bd0956a33 (patch)
tree940363d630ed34855a082dda1cf11430253c40ff /opcodes/aarch64-opc.c
parent80f3ac5d61a5d01d7cf951de0e24ecdc71c545cb (diff)
downloadbinutils-gdb-780f601cf3bfd2eb141c2ea32b673b5bd0956a33.tar.gz
AArch64: Replace C initializers with memset
Clang doesn't accept {0} as a valid C struct initializer under their implementation of -Wmissing-field-initializers. This makes using C initializers a bit tricky. Instead I'm changing the code to use memset instead, which at least GCC inlines and generates the same code for. This also seems to be the idiom used in binutils for most targets. opcodes/ * aarch64-opc.c (verify_constraints): Use memset instead of {0}.
Diffstat (limited to 'opcodes/aarch64-opc.c')
-rw-r--r--opcodes/aarch64-opc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index 3f62e2a9fc4..ed75a9a77ea 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -4671,7 +4671,9 @@ verify_constraints (const struct aarch64_inst *inst,
/* Next check for usage of the predicate register. */
aarch64_opnd_info blk_dest = insn_sequence->instr->operands[0];
- aarch64_opnd_info blk_pred = {0}, inst_pred = {0};
+ aarch64_opnd_info blk_pred, inst_pred;
+ memset (&blk_pred, 0, sizeof (aarch64_opnd_info));
+ memset (&inst_pred, 0, sizeof (aarch64_opnd_info));
bfd_boolean predicated = FALSE;
assert (blk_dest.type == AARCH64_OPND_SVE_Zd);