diff options
Diffstat (limited to 'binutils-2.25/gas/config/tc-aarch64.c')
-rw-r--r-- | binutils-2.25/gas/config/tc-aarch64.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/binutils-2.25/gas/config/tc-aarch64.c b/binutils-2.25/gas/config/tc-aarch64.c index 0e58764..4f3fe47 100644 --- a/binutils-2.25/gas/config/tc-aarch64.c +++ b/binutils-2.25/gas/config/tc-aarch64.c @@ -3939,11 +3939,11 @@ output_info (const char *format, ...) static void output_operand_error_record (const operand_error_record *record, char *str) { - int idx = record->detail.index; + const aarch64_operand_error *detail = &record->detail; + int idx = detail->index; const aarch64_opcode *opcode = record->opcode; - enum aarch64_opnd opd_code = (idx != -1 ? opcode->operands[idx] + enum aarch64_opnd opd_code = (idx >= 0 ? opcode->operands[idx] : AARCH64_OPND_NIL); - const aarch64_operand_error *detail = &record->detail; switch (detail->kind) { @@ -3955,20 +3955,22 @@ output_operand_error_record (const operand_error_record *record, char *str) case AARCH64_OPDE_RECOVERABLE: case AARCH64_OPDE_FATAL_SYNTAX_ERROR: case AARCH64_OPDE_OTHER_ERROR: - gas_assert (idx >= 0); /* Use the prepared error message if there is, otherwise use the operand description string to describe the error. */ if (detail->error != NULL) { - if (detail->index == -1) + if (idx < 0) as_bad (_("%s -- `%s'"), detail->error, str); else as_bad (_("%s at operand %d -- `%s'"), - detail->error, detail->index + 1, str); + detail->error, idx + 1, str); } else - as_bad (_("operand %d should be %s -- `%s'"), idx + 1, + { + gas_assert (idx >= 0); + as_bad (_("operand %d should be %s -- `%s'"), idx + 1, aarch64_get_operand_desc (opd_code), str); + } break; case AARCH64_OPDE_INVALID_VARIANT: @@ -4073,28 +4075,28 @@ output_operand_error_record (const operand_error_record *record, char *str) if (detail->data[0] != detail->data[1]) as_bad (_("%s out of range %d to %d at operand %d -- `%s'"), detail->error ? detail->error : _("immediate value"), - detail->data[0], detail->data[1], detail->index + 1, str); + detail->data[0], detail->data[1], idx + 1, str); else as_bad (_("%s expected to be %d at operand %d -- `%s'"), detail->error ? detail->error : _("immediate value"), - detail->data[0], detail->index + 1, str); + detail->data[0], idx + 1, str); break; case AARCH64_OPDE_REG_LIST: if (detail->data[0] == 1) as_bad (_("invalid number of registers in the list; " "only 1 register is expected at operand %d -- `%s'"), - detail->index + 1, str); + idx + 1, str); else as_bad (_("invalid number of registers in the list; " "%d registers are expected at operand %d -- `%s'"), - detail->data[0], detail->index + 1, str); + detail->data[0], idx + 1, str); break; case AARCH64_OPDE_UNALIGNED: as_bad (_("immediate value should be a multiple of " "%d at operand %d -- `%s'"), - detail->data[0], detail->index + 1, str); + detail->data[0], idx + 1, str); break; default: @@ -7184,20 +7186,10 @@ static const struct aarch64_cpu_option_table aarch64_cpus[] = { AARCH64_FEATURE_CRC), "Cortex-A53"}, {"cortex-a57", AARCH64_FEATURE(AARCH64_ARCH_V8, AARCH64_FEATURE_CRC), "Cortex-A57"}, - /* The 'xgene-1' name is an older name for 'xgene1', which was used - in earlier releases and is superseded by 'xgene1' in all - tools. */ + {"thunderx", AARCH64_ARCH_V8, "Cavium ThunderX"}, {"xgene-1", AARCH64_ARCH_V8, "APM X-Gene 1"}, - {"xgene1", AARCH64_ARCH_V8, "APM X-Gene 1"}, - {"xgene2", AARCH64_FEATURE(AARCH64_ARCH_V8, - AARCH64_FEATURE_CRC), "APM X-Gene 2"}, {"generic", AARCH64_ARCH_V8, NULL}, - /* These two are example CPUs supported in GCC, once we have real - CPUs they will be removed. */ - {"example-1", AARCH64_ARCH_V8, NULL}, - {"example-2", AARCH64_ARCH_V8, NULL}, - {NULL, AARCH64_ARCH_NONE, NULL} }; |