Skip to content

Commit f606a43

Browse files
committed
[RISCV] Update Zvk shorthand extension to 1.0.0-rc1
1. Zvbc is not part of Zvkn. 2. Zvbc is not part of Zvks. 3. Add extensions implied into shorthand extension. Also arrange its definition order as more closely its order in document. Please refer to https://reviews.llvm.org/D152117 and https://reviews.llvm.org/D153836. Document: https://github.com/riscv/riscv-crypto/releases/download/v20230620/riscv-crypto-spec-vector.pdf Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D156084
1 parent 30fed4d commit f606a43

File tree

1 file changed

+40
-30
lines changed

1 file changed

+40
-30
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -560,28 +560,13 @@ def HasStdExtZvkg : Predicate<"Subtarget->hasStdExtZvkg()">,
560560
AssemblerPredicate<(all_of FeatureStdExtZvkg),
561561
"'Zvkg' (Vector GCM instructions for Cryptography)">;
562562

563-
def FeatureStdExtZvkn
564-
: SubtargetFeature<"experimental-zvkn", "HasStdExtZvkn", "true",
565-
"This extension is shorthand for the following set of "
566-
"other extensions: Zvkned, Zvknhb, Zvbb, Zvbc, and Zvkt.">;
567-
568-
def FeatureStdExtZvknc
569-
: SubtargetFeature<"experimental-zvknc", "HasStdExtZvknc", "true",
570-
"This extension is shorthand for the following set of "
571-
"other extensions: Zvkn and Zvbc.">;
572-
573563
def FeatureStdExtZvkned
574564
: SubtargetFeature<"experimental-zvkned", "HasStdExtZvkned", "true",
575565
"'Zvkned' (Vector AES Encryption & Decryption (Single Round))">;
576566
def HasStdExtZvkned : Predicate<"Subtarget->hasStdExtZvkned()">,
577567
AssemblerPredicate<(all_of FeatureStdExtZvkned),
578568
"'Zvkned' (Vector AES Encryption & Decryption (Single Round))">;
579569

580-
def FeatureStdExtZvkng
581-
: SubtargetFeature<"experimental-zvkng", "HasStdExtZvkng", "true",
582-
"This extension is shorthand for the following set of "
583-
"other extensions: Zvkn and Zvkg.">;
584-
585570
def FeatureStdExtZvknha
586571
: SubtargetFeature<"experimental-zvknha", "HasStdExtZvknha", "true",
587572
"'Zvknha' (Vector SHA-2 (SHA-256 only))">;
@@ -594,28 +579,13 @@ def HasStdExtZvknha : Predicate<"Subtarget->hasStdExtZvknha()">,
594579
AssemblerPredicate<(all_of FeatureStdExtZvknha),
595580
"'Zvknha' (Vector SHA-2 (SHA-256 only))">;
596581

597-
def FeatureStdExtZvks
598-
: SubtargetFeature<"experimental-zvks", "HasStdExtZvks", "true",
599-
"This extension is shorthand for the following set of "
600-
"other extensions: Zvksed, Zvksh, Zvbb, Zvbc, and Zvkt.">;
601-
602-
def FeatureStdExtZvksc
603-
: SubtargetFeature<"experimental-zvksc", "HasStdExtZvksc", "true",
604-
"This extension is shorthand for the following set of "
605-
"other extensions: Zvks and Zvbc.">;
606-
607582
def FeatureStdExtZvksed
608583
: SubtargetFeature<"experimental-zvksed", "HasStdExtZvksed", "true",
609584
"'Zvksed' (SM4 Block Cipher Instructions)">;
610585
def HasStdExtZvksed : Predicate<"Subtarget->hasStdExtZvksed()">,
611586
AssemblerPredicate<(all_of FeatureStdExtZvksed),
612587
"'Zvksed' (SM4 Block Cipher Instructions)">;
613588

614-
def FeatureStdExtZvksg
615-
: SubtargetFeature<"experimental-zvksg", "HasStdExtZvksg", "true",
616-
"This extension is shorthand for the following set of "
617-
"other extensions: Zvks and Zvkg.">;
618-
619589
def FeatureStdExtZvksh
620590
: SubtargetFeature<"experimental-zvksh", "HasStdExtZvksh", "true",
621591
"'Zvksh' (SM3 Hash Function Instructions)">;
@@ -627,6 +597,46 @@ def FeatureStdExtZvkt
627597
: SubtargetFeature<"experimental-zvkt", "HasStdExtZvkt", "true",
628598
"'Zvkt' (Vector Data-Independent Execution Latency)">;
629599

600+
// Zvk short-hand extensions
601+
602+
def FeatureStdExtZvkn
603+
: SubtargetFeature<"experimental-zvkn", "HasStdExtZvkn", "true",
604+
"This extension is shorthand for the following set of "
605+
"other extensions: Zvkned, Zvknhb, Zvbb and Zvkt.",
606+
[FeatureStdExtZvkned, FeatureStdExtZvknhb,
607+
FeatureStdExtZvbb, FeatureStdExtZvkt]>;
608+
609+
def FeatureStdExtZvknc
610+
: SubtargetFeature<"experimental-zvknc", "HasStdExtZvknc", "true",
611+
"This extension is shorthand for the following set of "
612+
"other extensions: Zvkn and Zvbc.",
613+
[FeatureStdExtZvkn, FeatureStdExtZvbc]>;
614+
615+
def FeatureStdExtZvkng
616+
: SubtargetFeature<"experimental-zvkng", "HasStdExtZvkng", "true",
617+
"This extension is shorthand for the following set of "
618+
"other extensions: Zvkn and Zvkg.",
619+
[FeatureStdExtZvkn, FeatureStdExtZvkg]>;
620+
621+
def FeatureStdExtZvks
622+
: SubtargetFeature<"experimental-zvks", "HasStdExtZvks", "true",
623+
"This extension is shorthand for the following set of "
624+
"other extensions: Zvksed, Zvksh, Zvbb and Zvkt.",
625+
[FeatureStdExtZvksed, FeatureStdExtZvksh,
626+
FeatureStdExtZvbb, FeatureStdExtZvkt]>;
627+
628+
def FeatureStdExtZvksc
629+
: SubtargetFeature<"experimental-zvksc", "HasStdExtZvksc", "true",
630+
"This extension is shorthand for the following set of "
631+
"other extensions: Zvks and Zvbc.",
632+
[FeatureStdExtZvks, FeatureStdExtZvbc]>;
633+
634+
def FeatureStdExtZvksg
635+
: SubtargetFeature<"experimental-zvksg", "HasStdExtZvksg", "true",
636+
"This extension is shorthand for the following set of "
637+
"other extensions: Zvks and Zvkg.",
638+
[FeatureStdExtZvks, FeatureStdExtZvkg]>;
639+
630640
def FeatureStdExtZicond
631641
: SubtargetFeature<"experimental-zicond", "HasStdExtZicond", "true",
632642
"'Zicond' (Integer Conditional Operations)">;

0 commit comments

Comments
 (0)