[PATCH v2][ARM] Fix the decoding of indexed element VCMLA instruction

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Jan 17 17:42:00 GMT 2017


On 16/01/17 11:11, Jan Beulich wrote:
>>>> On 16.01.17 at 11:56, <nickc@redhat.com> wrote:
>>> opcodes/
>>> 2017-01-13  Szabolcs Nagy  <szabolcs.nagy@arm.com>
>>>
>>> 	* arm-dis.c (coprocessor_opcodes): Fix vcmla mask.
>>
>> Approved - please apply.
> 
> I'm sorry for having noticed only over the weekend, but I think
> there's a second issue here: Aiui the instruction takes a 1-bit
> immediate (selecting between 90° and 270°), yet doesn't
> decode bit 20 (which would be required to always be 1 for only
> those two value to be selectable). It is of no help that the test
> case only ever tests #90 as the immediate operand.

vcadd immediate is 90/270, encoded in bit 24.
vcmla immediate is 0/90/180/270, encoded in bits 23-24
indexed element vcmla immediate is 0/90/180/270, in bits 20-21.

there was a bug in the immediate decoding of indexed element
vcmla, i assume that's what you've seen, i think i'll propose
a separate patch to make the disasm format string cleaner
(i'm not yet sure if it will be a new format char or some other
way, but my current hack is clearly error prone).

v2: fix rotation immediates, add more test coverage.


Bit 24 of the indexed element vcmla decode mask was incorrectly
left unset.  This could cause incorrect disassembly of some
currently undefined instructions as vcmla.

Rotatation immediates were not printed correctly in the disassembly
(could print 170 and 280 instead of 180 and 270).

opcodes/
2017-01-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* arm-dis.c (coprocessor_opcodes): Fix vcmla mask and disassembly.

gas/
2017-01-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* testsuite/gas/arm/armv8_3-a-simd.s: Add vcmla tests.
	* testsuite/gas/arm/armv8_3-a-simd.d: Update.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcmla2.diff
Type: text/x-patch
Size: 3703 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170117/d50fe0d9/attachment.bin>


More information about the Binutils mailing list