mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-08 09:43:20 +00:00
Add getFeatureBits to extract feature bits for a given CPU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d59ff95d8
commit
2416b89621
@ -54,6 +54,10 @@ public:
|
||||
/// getInstrItineraryForCPU - Get scheduling itinerary of a CPU.
|
||||
///
|
||||
InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const;
|
||||
|
||||
/// getFeatureBits - Get the feature bits for a CPU (optionally supplemented
|
||||
/// with feature string).
|
||||
uint64_t getFeatureBits(StringRef CPU, StringRef FS) const;
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -42,3 +42,11 @@ MCSubtargetInfo::getInstrItineraryForCPU(StringRef CPU) const {
|
||||
return InstrItineraryData(Stages, OperandCycles, ForwardingPathes,
|
||||
(InstrItinerary *)Found->Value);
|
||||
}
|
||||
|
||||
/// getFeatureBits - Get the feature bits for a CPU (optionally supplemented
|
||||
/// with feature string).
|
||||
uint64_t MCSubtargetInfo::getFeatureBits(StringRef CPU, StringRef FS) const {
|
||||
SubtargetFeatures Features(FS);
|
||||
return Features.getFeatureBits(CPU, ProcDesc, NumProcs,
|
||||
ProcFeatures, NumFeatures);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user