Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/RISCV/RISCV.td
Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | def HasStdExtZca : Predicate<"Subtarget->hasStdExtZca()">, | ||||
"'Zca' (part of the C extension, excluding compressed floating point loads/stores)">; | "'Zca' (part of the C extension, excluding compressed floating point loads/stores)">; | ||||
def HasStdExtCOrZca | def HasStdExtCOrZca | ||||
: Predicate<"Subtarget->hasStdExtC() || Subtarget->hasStdExtZca()">, | : Predicate<"Subtarget->hasStdExtC() || Subtarget->hasStdExtZca()">, | ||||
AssemblerPredicate<(any_of FeatureStdExtC, FeatureExtZca), | AssemblerPredicate<(any_of FeatureStdExtC, FeatureExtZca), | ||||
"'C' (Compressed Instructions) or " | "'C' (Compressed Instructions) or " | ||||
"'Zca' (part of the C extension, excluding compressed floating point loads/stores)">; | "'Zca' (part of the C extension, excluding compressed floating point loads/stores)">; | ||||
def FeatureExtZcmt | |||||
: SubtargetFeature<"experimental-zcmt", "HasStdExtZcmt", "true", | |||||
"'Zcmt' (table jump instuctions for code-size reduction)", | |||||
[FeatureExtZca]>; // TODO: add Zicsr as another dependence | |||||
jrtc27: This is an odd implication, Zcmt works just fine without Zca? | |||||
VincentWuAuthorUnsubmitted the spec says:
I think maybe zcmt needs to be aligned using c.nop? That might be one of the reasons why zcmt required zca. VincentWu: the [[ https://github.com/riscv/riscv-code-size-reduction/releases/tag/v1.0.0-RC5.7 | spec ]]… | |||||
def HasStdExtZcmt : Predicate<"Subtarget->hasStdExtZcmt() && !Subtarget->hasStdExtC()">, | |||||
reamesUnsubmitted Wait, Zcmt can't be enabled if C is? That seems odd... reames: Wait, Zcmt can't be enabled if C is? That seems odd... | |||||
craig.topperUnsubmitted I think Zcmt reuses encodings from the FP part of C. That's why C was split into Zca, Zcf, and Zcd. craig.topper: I think Zcmt reuses encodings from the FP part of C. That's why C was split into Zca, Zcf, and… | |||||
jrtc27Unsubmitted Shouldn't the conflict be enforced at a higher level? Otherwise you're silently making +c,+zcmt resolve to +c here. jrtc27: Shouldn't the conflict be enforced at a higher level? Otherwise you're silently making +c,+zcmt… | |||||
craig.topperUnsubmitted This restriction needs to be enforced in RISCVISAInfo.cpp so that it generates a proper error message. craig.topper: This restriction needs to be enforced in RISCVISAInfo.cpp so that it generates a proper error… | |||||
AssemblerPredicate<(all_of FeatureExtZcmt, (not FeatureStdExtC)), | |||||
"'Zcmt' (table jump instuctions for code-size reduction)">; | |||||
def FeatureNoRVCHints | def FeatureNoRVCHints | ||||
: SubtargetFeature<"no-rvc-hints", "EnableRVCHintInstrs", "false", | : SubtargetFeature<"no-rvc-hints", "EnableRVCHintInstrs", "false", | ||||
"Disable RVC Hint Instructions.">; | "Disable RVC Hint Instructions.">; | ||||
def HasRVCHints : Predicate<"Subtarget->enableRVCHintInstrs()">, | def HasRVCHints : Predicate<"Subtarget->enableRVCHintInstrs()">, | ||||
AssemblerPredicate<(all_of(not FeatureNoRVCHints)), | AssemblerPredicate<(all_of(not FeatureNoRVCHints)), | ||||
"RVC Hint Instructions">; | "RVC Hint Instructions">; | ||||
def FeatureStdExtZvl32b : SubtargetFeature<"zvl32b", "ZvlLen", "32", | def FeatureStdExtZvl32b : SubtargetFeature<"zvl32b", "ZvlLen", "32", | ||||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |
This is an odd implication, Zcmt works just fine without Zca?