Bug 21176 - [Aarch64] Wrong syntax accepted for SIMD vector by element operations
Summary: [Aarch64] Wrong syntax accepted for SIMD vector by element operations
Status: ASSIGNED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.29
: P2 normal
Target Milestone: ---
Assignee: Jiong Wang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-17 07:51 UTC by Ashwin Sekhar T K
Modified: 2017-02-17 11:39 UTC (History)
1 user (show)

See Also:
Host:
Target: aarch64*
Build:
Last reconfirmed: 2017-02-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashwin Sekhar T K 2017-02-17 07:51:50 UTC
Following syntax is wrong as per Aarch64 specification for vector by element operations, but is accepted without any warnings/errors. 

fmul	v16.4s, v0.4s, v8.4s[0]
fmla	v20.4s, v0.4s, v8.2s[1]
fmla	v0.2d, v1.2d, v2.2d[0]

Correct syntax should be.

fmul	v16.4s, v0.4s, v8.s[0]
fmla	v20.4s, v0.4s, v8.s[1]
fmla	v0.2d, v1.2d, v2.d[0]


References:
https://github.com/xianyi/OpenBLAS/commit/278511ad2d1727a7ed74c38e3664b5e51b04adc6
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/FMLA_advsimd_elt_vector.html

Thanks,
Ashwin
Comment 1 Jiong Wang 2017-02-17 11:39:03 UTC
(In reply to Ashwin Sekhar T K from comment #0)
> Following syntax is wrong as per Aarch64 specification for vector by element
> operations, but is accepted without any warnings/errors. 
> 
> fmul	v16.4s, v0.4s, v8.4s[0]
> fmla	v20.4s, v0.4s, v8.2s[1]
> fmla	v0.2d, v1.2d, v2.2d[0]
> 
> Correct syntax should be.
> 
> fmul	v16.4s, v0.4s, v8.s[0]
> fmla	v20.4s, v0.4s, v8.s[1]
> fmla	v0.2d, v1.2d, v2.d[0]
> 
> 
> References:
> https://github.com/xianyi/OpenBLAS/commit/
> 278511ad2d1727a7ed74c38e3664b5e51b04adc6
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802b/
> FMLA_advsimd_elt_vector.html
> 
> Thanks,
> Ashwin

IIRC, aarch64 gcc is using both forms, the assembler is giving some tolerance on this.  Will confirm whether this is a mistake.