aarch64: Eliminate unused variable warnings with -DNDEBUG

This commit is contained in:
Andrew Carlotti
2024-01-23 18:22:12 +00:00
parent 8699aa4f64
commit bb1ab9d4ab
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1325,7 +1325,7 @@ aarch64_ins_sve_strided_reglist (const aarch64_operand *self,
ATTRIBUTE_UNUSED) ATTRIBUTE_UNUSED)
{ {
unsigned int num_regs = get_operand_specific_data (self); 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; unsigned int val = info->reglist.first_regno;
assert ((val & mask) == val); assert ((val & mask) == val);
insert_field (self->fields[0], code, val >> 4, 0); insert_field (self->fields[0], code, val >> 4, 0);
+3 -2
View File
@@ -3686,8 +3686,9 @@ get_style_text (enum disassembler_style style)
for (i = 0; i <= 0xf; ++i) for (i = 0; i <= 0xf; ++i)
{ {
int res = snprintf (&formats[i][0], sizeof (formats[i]), "%c%x%c", int res ATTRIBUTE_UNUSED
STYLE_MARKER_CHAR, i, STYLE_MARKER_CHAR); = snprintf (&formats[i][0], sizeof (formats[i]), "%c%x%c",
STYLE_MARKER_CHAR, i, STYLE_MARKER_CHAR);
assert (res == 3); assert (res == 3);
} }
+4 -5
View File
@@ -3335,12 +3335,11 @@ aarch64_match_operands_constraint (aarch64_inst *inst,
invalid tying and invalid qualifiers, the error about invalid tying and invalid qualifiers, the error about
qualifiers would suggest several alternative instructions qualifiers would suggest several alternative instructions
that also have invalid tying. */ 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); = aarch64_get_operand_class (inst->operands[0].type);
enum aarch64_operand_class op_class2 assert (aarch64_get_operand_class (inst->operands[i].type)
= aarch64_get_operand_class (inst->operands[i].type); == op_class);
assert (op_class1 == op_class2); if (op_class == AARCH64_OPND_CLASS_SVE_REGLIST
if (op_class1 == AARCH64_OPND_CLASS_SVE_REGLIST
? ((inst->operands[0].reglist.first_regno ? ((inst->operands[0].reglist.first_regno
!= inst->operands[i].reglist.first_regno) != inst->operands[i].reglist.first_regno)
|| (inst->operands[0].reglist.num_regs || (inst->operands[0].reglist.num_regs