This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Armv8.2-A: add the crypto extensions
ClosedPublic

Authored by SjoerdMeijer on Jul 16 2018, 6:05 AM.

Details

Summary

This adds MC support for the crypto instructions that were made optional extensions in Armv8.2-A (AArch64 only).

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Jul 16 2018, 6:05 AM

Fixed a typo.

There are some variants of the PMULL instruction which depend on HasCrypto, which I think should be changed to HasAES.

lib/Target/AArch64/AArch64InstrFormats.td
10051

Some of these input operands look wrong to me. For example, this one is used by SHA512SU1, which should have three inputs, the first of which is tied to the output.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
4772

I think it would be better to parse this in parseDirectiveCPU, and always pass an ArchKind to this function.

Thanks for the review and suggestions! Comments addressed.

Ah, I now see I forgot about PMULL. I am addressing that now.

Fixed PMULL predicate.

olista01 added inline comments.Jul 25 2018, 6:40 AM
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
4753

These new feature names and ExpandCryptoAEK aren't covered by any of the tests, could you add some?

Added tests for the crypto .cpu directives.

This revision is now accepted and ready to land.Jul 25 2018, 7:48 AM
This revision was automatically updated to reflect the committed changes.