diff options
| author | Jim Laskey <jlaskey@mac.com> | 2005-10-26 17:30:34 +0000 |
|---|---|---|
| committer | Jim Laskey <jlaskey@mac.com> | 2005-10-26 17:30:34 +0000 |
| commit | a2b5235facce78b229b6f3592a30ad28104f964c (patch) | |
| tree | df9ead35cddd5ee87f3f46d43b16bc62206ff27e /llvm/lib/Target/PowerPC/PPCSubtarget.cpp | |
| parent | 53ad110490853fd5cb40429dcad3924068278b54 (diff) | |
| download | llvm-a2b5235facce78b229b6f3592a30ad28104f964c.zip llvm-a2b5235facce78b229b6f3592a30ad28104f964c.tar.gz llvm-a2b5235facce78b229b6f3592a30ad28104f964c.tar.bz2 | |
Give full control of subtarget features over to table generated code.
llvm-svn: 24013
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index 1995e1c..94af54c 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -68,22 +68,25 @@ static const char *GetCurrentPowerPCCPU() { } #endif + PPCSubtarget::PPCSubtarget(const Module &M, const std::string &FS) - : StackAlignment(16), IsGigaProcessor(false), IsAIX(false), IsDarwin(false) { + : StackAlignment(16) + , IsGigaProcessor(false) + , Is64Bit(false) + , Has64BitRegs(false) + , HasAltivec(false) + , HasFSQRT(false) + , IsAIX(false) + , IsDarwin(false) { // Determine default and user specified characteristics std::string CPU = "generic"; #if defined(__APPLE__) CPU = GetCurrentPowerPCCPU(); #endif - SubtargetFeatures Features(FS); - Features.setCPUIfNone(CPU); - uint32_t Bits = Features.getBits(SubTypeKV, SubTypeKVSize, - FeatureKV, FeatureKVSize); - IsGigaProcessor = (Bits & FeatureGPUL ) != 0; - Is64Bit = (Bits & Feature64Bit) != 0; - HasFSQRT = (Bits & FeatureFSqrt) != 0; - Has64BitRegs = (Bits & Feature64BitRegs) != 0; + + // Parse features string. + ParseSubtargetFeatures(FS, CPU); // Set the boolean corresponding to the current target triple, or the default // if one cannot be determined, to true. |
