llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.65k stars 11.84k forks source link

Missing Arm ACLE intrinsics for cryptography extensions #47172

Closed pbarrio closed 3 years ago

pbarrio commented 4 years ago
Bugzilla Link 47828
Resolution FIXED
Resolved on Mar 16, 2021 08:48
Version trunk
OS All
CC @DavidSpickett,@efriedma-quic,@makotokato,@zygoloid,@R-Santhir

Extended Description

Clang is missing intrinsics support for the following crypto extensions: SHA512, SHA3, SM3, SM4, ADD instructions on polynomial types. See https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics.

Full list of missing crypto intrinsics:

ADD: vadd_p8, vadd_p16, vadd_p64, vaddq_p8, vaddq_p16, vaddq_p64, vaddq_p128 SHA512: vsha512hq_u64, vsha512h2q_u64, vsha512su0q_u64, vsha512su1q_u64 SHA3: veor3q_u8 veor3q_u16 veor3q_u32 veor3q_u64 veor3q_s8 veor3q_s16 veor3q_s32 veor3q_s64 vrax1q_u64 vxarq_u64 vbcaxq_u8 vbcaxq_u16 vbcaxq_u32 vbcaxq_u64 vbcaxq_s8 vbcaxq_s16 vbcaxq_s32 vbcaxq_s64 SM3 & SM4: vsm3ss1q_u32 vsm3tt1aq_u32 vsm3tt1bq_u32 vsm3tt2aq_u32 vsm3tt2bq_u32 vsm3partw1q_u32 vsm3partw2q_u32 vsm4eq_u32 vsm4ekeyq_u32

R-Santhir commented 3 years ago

The following patch adds the polynomial adds: https://reviews.llvm.org/D96825

R-Santhir commented 3 years ago

The Following patch adds the SHA512 and SHA3 Intrinsics: https://reviews.llvm.org/D96381

R-Santhir commented 3 years ago

The Following patch adds the SM4&SM3 Intrinsics: https://reviews.llvm.org/D95655