Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initialise subtarget features to false in constructor
ParseSubTargetFeatures can only set features to true, not false.
Any default trues have to be handled by this method to be able
to override them.
  • Loading branch information
skristiansson committed Jul 27, 2012
1 parent bbcbd8a commit 3e6400e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/Target/LM32/LM32.td
Expand Up @@ -54,7 +54,8 @@ def FeatureSPBias :
// LM32 supported processors.
//===----------------------------------------------------------------------===//

def : Processor< "lm32", LM32Itineraries, []>;
def : Processor< "lm32", LM32Itineraries, [FeatureDIV, FeatureMUL,
FeatureBarrel, FeatureSPBias]>;


//===----------------------------------------------------------------------===//
Expand Down
12 changes: 6 additions & 6 deletions lib/Target/LM32/LM32Subtarget.cpp
Expand Up @@ -26,13 +26,13 @@ using namespace llvm;
LM32Subtarget::LM32Subtarget(const std::string &TT,
const std::string &CPU,
const std::string &FS)
: LM32GenSubtargetInfo(TT, CPU, FS)
: LM32GenSubtargetInfo(TT, CPU, FS),
HasSDIV(false),
HasDIV(false),
HasMUL(false),
HasBarrel(false),
HasSPBias(false)
{
HasSDIV = false;
HasDIV = true;
HasMUL = true;
HasBarrel = true;
HasSPBias = true;

// Parse features string.
std::string CPUName = CPU;
Expand Down

0 comments on commit 3e6400e

Please sign in to comment.