Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 3e6400e2d9bc3b1b0708ff36f6d18a0e2c774868 1 parent bbcbd8a
Stefan Kristiansson authored July 28, 2012
3  lib/Target/LM32/LM32.td
@@ -54,7 +54,8 @@ def FeatureSPBias :
54 54
 // LM32 supported processors.
55 55
 //===----------------------------------------------------------------------===//
56 56
 
57  
-def : Processor< "lm32", LM32Itineraries, []>;
  57
+def : Processor< "lm32", LM32Itineraries, [FeatureDIV, FeatureMUL,
  58
+                                           FeatureBarrel, FeatureSPBias]>;
58 59
 
59 60
 
60 61
 //===----------------------------------------------------------------------===//
12  lib/Target/LM32/LM32Subtarget.cpp
@@ -26,13 +26,13 @@ using namespace llvm;
26 26
 LM32Subtarget::LM32Subtarget(const std::string &TT, 
27 27
                                  const std::string &CPU,
28 28
                                  const std::string &FS) 
29  
-  : LM32GenSubtargetInfo(TT, CPU, FS)
  29
+  : LM32GenSubtargetInfo(TT, CPU, FS),
  30
+    HasSDIV(false),
  31
+    HasDIV(false),
  32
+    HasMUL(false),
  33
+    HasBarrel(false),
  34
+    HasSPBias(false)
30 35
 {
31  
-  HasSDIV = false;
32  
-  HasDIV = true;
33  
-  HasMUL = true;
34  
-  HasBarrel = true;
35  
-  HasSPBias = true;
36 36
 
37 37
   // Parse features string.
38 38
   std::string CPUName = CPU;

0 notes on commit 3e6400e

Please sign in to comment.
Something went wrong with that request. Please try again.