[X86] Support Intel Key Locker
authorXiang1 Zhang <xiang1.zhang@intel.com>
Wed, 30 Sep 2020 10:01:15 +0000 (18:01 +0800)
committerXiang1 Zhang <xiang1.zhang@intel.com>
Wed, 30 Sep 2020 10:08:45 +0000 (18:08 +0800)
commit413577a8790407d75ba834fa5668c2632fe1851e
tree3a789ee5a7593723bcd16c248d08d76d63e4e359
parent8c05c7c8d87c7ab02fca2a789dfcca4976c6601b
[X86] Support Intel Key Locker

Key Locker provides a mechanism to encrypt and decrypt data with an AES key without having access
to the raw key value by converting AES keys into “handles”. These handles can be used to perform the
same encryption and decryption operations as the original AES keys, but they only work on the current
system and only until they are revoked. If software revokes Key Locker handles (e.g., on a reboot),
then any previous handles can no longer be used.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D88398
34 files changed:
clang/include/clang/Basic/BuiltinsX86.def
clang/include/clang/Driver/Options.td
clang/lib/Basic/Targets/X86.cpp
clang/lib/Basic/Targets/X86.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/immintrin.h
clang/lib/Headers/keylocker_wide_intrin.h [new file with mode: 0644]
clang/lib/Headers/keylockerintrin.h [new file with mode: 0644]
clang/test/CodeGen/X86/keylocker.c [new file with mode: 0644]
clang/test/CodeGen/attr-target-x86.c
clang/test/Driver/x86-target-features.c
clang/test/Preprocessor/x86_target_features.c
llvm/include/llvm/IR/IntrinsicsX86.td
llvm/include/llvm/Support/X86TargetParser.def
llvm/lib/IR/Function.cpp
llvm/lib/Support/Host.cpp
llvm/lib/Support/X86TargetParser.cpp
llvm/lib/Target/X86/X86.td
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86InstrInfo.td.rej [new file with mode: 0644]
llvm/lib/Target/X86/X86InstrKL.td [new file with mode: 0644]
llvm/lib/Target/X86/X86Subtarget.h
llvm/test/CodeGen/X86/keylocker-intrinsics.ll [new file with mode: 0644]
llvm/test/MC/Disassembler/X86/KEYLOCKER/Keylocker-x86-32-att.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/X86/KEYLOCKER/Keylocker-x86-32-intel.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/X86/KEYLOCKER/Keylocker-x86-64-att.txt [new file with mode: 0644]
llvm/test/MC/Disassembler/X86/KEYLOCKER/Keylocker-x86-64-intel.txt [new file with mode: 0644]
llvm/test/MC/X86/KEYLOCKER/keylocker-att.s [new file with mode: 0644]
llvm/test/MC/X86/KEYLOCKER/keylocker-intel.s [new file with mode: 0644]
llvm/test/MC/X86/KEYLOCKER/x86-64-keylocker-att.s [new file with mode: 0644]
llvm/test/MC/X86/KEYLOCKER/x86-64-keylocker-intel.s [new file with mode: 0644]
llvm/utils/TableGen/IntrinsicEmitter.cpp