diff options
author | Andrew Carlotti <andrew.carlotti@arm.com> | 2024-01-23 18:22:12 +0000 |
---|---|---|
committer | Andrew Carlotti <andrew.carlotti@arm.com> | 2024-01-24 12:14:59 +0000 |
commit | f895041bb9c6b05ddb457ce24fd8cb33880fe375 (patch) | |
tree | a1e383b9995249056614ca70629ed0f44143a682 | |
parent | 601c741d5ce6cae53dad8b19da8ed9c5cae4b797 (diff) | |
download | binutils-f895041bb9c6b05ddb457ce24fd8cb33880fe375.zip binutils-f895041bb9c6b05ddb457ce24fd8cb33880fe375.tar.gz binutils-f895041bb9c6b05ddb457ce24fd8cb33880fe375.tar.bz2 |
aarch64: Eliminate unused variable warnings with -DNDEBUG
-rw-r--r-- | opcodes/aarch64-asm.c | 2 | ||||
-rw-r--r-- | opcodes/aarch64-dis.c | 5 | ||||
-rw-r--r-- | opcodes/aarch64-opc.c | 9 |
3 files changed, 8 insertions, 8 deletions
diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c index 565c4b1..29e96e2 100644 --- a/opcodes/aarch64-asm.c +++ b/opcodes/aarch64-asm.c @@ -1325,7 +1325,7 @@ aarch64_ins_sve_strided_reglist (const aarch64_operand *self, ATTRIBUTE_UNUSED) { unsigned int num_regs = get_operand_specific_data (self); - unsigned int mask = 16 | (16 / num_regs - 1); + unsigned int mask ATTRIBUTE_UNUSED = 16 | (16 / num_regs - 1); unsigned int val = info->reglist.first_regno; assert ((val & mask) == val); insert_field (self->fields[0], code, val >> 4, 0); diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index f63b747..82d2f8f 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -3686,8 +3686,9 @@ get_style_text (enum disassembler_style style) for (i = 0; i <= 0xf; ++i) { - int res = snprintf (&formats[i][0], sizeof (formats[i]), "%c%x%c", - STYLE_MARKER_CHAR, i, STYLE_MARKER_CHAR); + int res ATTRIBUTE_UNUSED + = snprintf (&formats[i][0], sizeof (formats[i]), "%c%x%c", + STYLE_MARKER_CHAR, i, STYLE_MARKER_CHAR); assert (res == 3); } diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index 5b76f2c..965c1c0 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -3335,12 +3335,11 @@ aarch64_match_operands_constraint (aarch64_inst *inst, invalid tying and invalid qualifiers, the error about qualifiers would suggest several alternative instructions that also have invalid tying. */ - enum aarch64_operand_class op_class1 + enum aarch64_operand_class op_class = aarch64_get_operand_class (inst->operands[0].type); - enum aarch64_operand_class op_class2 - = aarch64_get_operand_class (inst->operands[i].type); - assert (op_class1 == op_class2); - if (op_class1 == AARCH64_OPND_CLASS_SVE_REGLIST + assert (aarch64_get_operand_class (inst->operands[i].type) + == op_class); + if (op_class == AARCH64_OPND_CLASS_SVE_REGLIST ? ((inst->operands[0].reglist.first_regno != inst->operands[i].reglist.first_regno) || (inst->operands[0].reglist.num_regs |