From 362c0c4d9cc9f320d1e85755404879a13ebed91a Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Fri, 7 Oct 2016 10:55:56 +0100 Subject: [AArch64] PR target/20667, fix disassembler for the "special" optional SYS_Rt operand for "ic"/"tlbi" gas/ PR target/20667 * testsuite/gas/aarch64/sys-rt-reg.s: Test source for instructions using SYS_Rt reg. * testsuite/gas/aarch64/sys-rt-reg.d: New testcase. opcodes/ PR target/20667 * aarch64-opc.c (aarch64_print_operand): Always print operand if it's available. --- opcodes/ChangeLog | 6 ++++++ opcodes/aarch64-opc.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 22ec46b..65cf0d7 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2016-10-07 Jiong Wang + + PR target/20667 + * aarch64-opc.c (aarch64_print_operand): Always print operand if it's + available. + 2016-10-07 Alan Modra * sh-opc.h (sh_merge_bfd_arch): Delete prototype. diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index 4b1411f..333be5a 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -2970,11 +2970,15 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, /* The optional-ness of in e.g. IC {, } is determined by the , therefore we we use opnd->present to override the generic optional-ness information. */ - if (opnd->type == AARCH64_OPND_Rt_SYS && !opnd->present) - break; + if (opnd->type == AARCH64_OPND_Rt_SYS) + { + if (!opnd->present) + break; + } /* Omit the operand, e.g. RET. */ - if (optional_operand_p (opcode, idx) - && opnd->reg.regno == get_optional_operand_default_value (opcode)) + else if (optional_operand_p (opcode, idx) + && (opnd->reg.regno + == get_optional_operand_default_value (opcode))) break; assert (opnd->qualifier == AARCH64_OPND_QLF_W || opnd->qualifier == AARCH64_OPND_QLF_X); -- cgit v1.1