forked from OSchip/llvm-project
Rollback changes to take a different tack.
llvm-svn: 32488
This commit is contained in:
parent
2dc148e89d
commit
8171e58bd9
|
@ -81,9 +81,6 @@ public:
|
|||
/// Set the CPU string. Replaces previous setting. Setting to "" clears CPU.
|
||||
void setCPU(const std::string &String);
|
||||
|
||||
/// Get the CPU string.
|
||||
const std::string &getCPU() const { return Features[0]; }
|
||||
|
||||
/// Setting CPU string only if no string is set.
|
||||
void setCPUIfNone(const std::string &String);
|
||||
|
||||
|
|
|
@ -27,13 +27,10 @@ namespace llvm {
|
|||
class TargetSubtarget {
|
||||
TargetSubtarget(const TargetSubtarget&); // DO NOT IMPLEMENT
|
||||
void operator=(const TargetSubtarget&); // DO NOT IMPLEMENT
|
||||
std::string CPU; // CPU name.
|
||||
protected: // Can only create subclasses...
|
||||
TargetSubtarget();
|
||||
public:
|
||||
virtual ~TargetSubtarget();
|
||||
void setCPU(const std::string &C) { CPU = C; }
|
||||
const std::string &getCPU() const { return CPU; }
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
|
|
@ -542,6 +542,10 @@ bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||
|
||||
|
||||
bool DarwinAsmPrinter::doInitialization(Module &M) {
|
||||
#if 1
|
||||
if (Subtarget.isGigaProcessor())
|
||||
O << "\t.machine ppc970\n";
|
||||
#else
|
||||
const std::string &CPU = Subtarget.getCPU();
|
||||
|
||||
if (CPU != "generic")
|
||||
|
@ -554,6 +558,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) {
|
|||
O << "\t.machine ppc7400\n";
|
||||
else
|
||||
O << "\t.machine ppc\n";
|
||||
#endif
|
||||
|
||||
AsmPrinter::doInitialization(M);
|
||||
|
||||
|
|
|
@ -460,7 +460,6 @@ void SubtargetEmitter::ParseFeaturesFunction(std::ostream &OS) {
|
|||
" const std::string &CPU) {\n"
|
||||
" SubtargetFeatures Features(FS);\n"
|
||||
" Features.setCPUIfNone(CPU);\n"
|
||||
" setCPU(Features.getCPU());\n"
|
||||
" uint32_t Bits = Features.getBits(SubTypeKV, SubTypeKVSize,\n"
|
||||
" FeatureKV, FeatureKVSize);\n";
|
||||
|
||||
|
|
Loading…
Reference in New Issue