diff options
author | Jiong Wang <jiong.wang@arm.com> | 2016-10-07 10:55:56 +0100 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2016-10-07 10:55:56 +0100 |
commit | 362c0c4d9cc9f320d1e85755404879a13ebed91a (patch) | |
tree | 5db4cecee49069b56614c7249d6d76805c0be450 /opcodes | |
parent | 1d0e042a8321cca82cce521afd276a8494385ae3 (diff) | |
download | gdb-362c0c4d9cc9f320d1e85755404879a13ebed91a.zip gdb-362c0c4d9cc9f320d1e85755404879a13ebed91a.tar.gz gdb-362c0c4d9cc9f320d1e85755404879a13ebed91a.tar.bz2 |
[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.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/aarch64-opc.c | 12 |
2 files changed, 14 insertions, 4 deletions
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 <jiong.wang@arm.com> + + PR target/20667 + * aarch64-opc.c (aarch64_print_operand): Always print operand if it's + available. + 2016-10-07 Alan Modra <amodra@gmail.com> * 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 <Xt> in e.g. IC <ic_op>{, <Xt>} is determined by the <ic_op>, 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); |