This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Assembler support for the ARMv8.2a dot product instructions
ClosedPublic

Authored by SjoerdMeijer on Aug 10 2017, 5:56 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

SjoerdMeijer created this revision.Aug 10 2017, 5:56 AM

Oops, I now see that I forgot to add the disassmbler tests.

Added the disassembler tests.

Note that the AArch32 instructions were added to the an instruction encoding space that has been reclaimed from what was originally allocated for the unused “Coprocessor 13”.
That's why I created a DecoderNamespace CoProc and assigned the coprocessor isntructions to it, otherwise the dot product instructions would get disassembled to coprocessor instructions.

samparker edited edge metadata.Aug 10 2017, 7:53 AM

Hi Sjoerd,

Shouldn't the feature be predicated on HasV8_2aOps, not just NEON? It seems weird, from the tests, that we can target arm or thumbv7 but still have access to these instructions.

cheers,
sam

t.p.northover edited edge metadata.Aug 10 2017, 8:58 AM

Shouldn't the feature be predicated on HasV8_2aOps, not just NEON? It seems weird, from the tests, that we can target arm or thumbv7 but still have access to these instructions.

They're optional in v8.2a (actually, until I saw the XML I thought they were v8.4) so they need a separate feature. I think those implies fields mostly make sense for the grander features like whole architecture levels; Sjoerd's choice is at least consistent with the FeatureCrypto above.

Hi Sam,
Thanks for reviewing. I agree it looks odd, but the argument of not doing this, is that this is not user-facing. I.e., they are internal options and it's Clang's responsibilities to parse options and set the target features. Other optional instructions/extensions are also not predicated on e.g. v8.1a or v8.2a.

Cheers,
Sjoerd.

samparker accepted this revision.Aug 11 2017, 2:42 AM

Ok, all fair points. LGTM then.

This revision is now accepted and ready to land.Aug 11 2017, 2:42 AM
This revision was automatically updated to reflect the committed changes.