[AArch64] PR target/20667, fix disassembler for the "special" optional SYS_Rt operand for "ic"/"tlbi"

Jiong Wang jiong.wang@foss.arm.com
Fri Oct 7 09:21:00 GMT 2016


"ic/tlbi" are taking "special" optional operands.  They always take one
mandatory operand which is "ic_op"/"tlbi_op".  Some of these "ic_op/tlbi_op"
take one additional "Rt" register operand, the other take nothing.  For either,
the additional operand is never optional with a given "ic_op/tlbi_op".

AArch64 assembler implemented this by firstly treating "ic/tlbi" as taking
optional operand, then doing a later check on the "ic_op/tlbi_op" in
"operand_general_constraint_met_p".  If the "ic_op/tlbi_op" requires additional
operand and there isn't (operand->present be false), error will be issued.  For
example we won't accept "ic ivau" as "ivau" is defined to take one "Rt" register
operand.

However, disassembler haven't understood this.  For "ic ivau, xzr", it's printing
"ic ivau".

This patch fixed this by always print the operand if the operand is present for
"ic/tlbi", they are the only ones using the special "SYS_Rt" operand.

OK for master?


gas/
2016-10-05  Jiong Wang  <jiong.wang@arm.com>

         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/
2016-10-05  Jiong Wang  <jiong.wang@arm.com>

         PR target/20667
         * aarch64-opc.c (aarch64_print_operand): Always print operand if
         it's available.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.patch
Type: text/x-patch
Size: 6285 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161007/05ca2163/attachment.bin>


More information about the Binutils mailing list