[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.cpp SparcInstrSelection.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Apr 26 14:45:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcInstrInfo.cpp updated: 1.39 -> 1.40
SparcInstrSelection.cpp updated: 1.87 -> 1.88

---
Log message:

IntegerRegSize is always 8 for sparc


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.39 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.40
--- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.39	Fri Apr 25 00:23:09 2003
+++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp	Sat Apr 26 14:44:35 2003
@@ -441,9 +441,7 @@
           uint64_t C = GetConstantValueAsUnsignedInt(val, isValidConstant);
           assert(isValidConstant && "Unrecognized constant");
 
-          if (opSize > destSize ||
-              (val->getType()->isSigned()
-               && destSize < target.getTargetData().getIntegerRegSize()))
+          if (opSize > destSize || (val->getType()->isSigned() && destSize < 8))
             { // operand is larger than dest,
               //    OR both are equal but smaller than the full register size
               //       AND operand is signed, so it may have extra sign bits:


Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.87 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.88
--- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.87	Fri Apr 25 00:23:10 2003
+++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp	Sat Apr 26 14:44:35 2003
@@ -758,8 +758,7 @@
   // 
   Value* shiftDest = destVal;
   unsigned opSize = target.getTargetData().getTypeSize(argVal1->getType());
-  if ((shiftOpCode == SLL || shiftOpCode == SLLX)
-      && opSize < target.getTargetData().getIntegerRegSize())
+  if ((shiftOpCode == SLL || shiftOpCode == SLLX) && opSize < 8)
     { // put SLL result into a temporary
       shiftDest = new TmpInstruction(argVal1, optArgVal2, "sllTmp");
       mcfi.addTemp(shiftDest);
@@ -2305,7 +2304,7 @@
                                  .addReg(dest, MOTy::Def);
               mvec.push_back(M);
             }
-          else if (destSize < target.getTargetData().getIntegerRegSize())
+          else if (destSize < 8)
             assert(0 && "Unsupported type size: 32 < size < 64 bits");
         }
     }





More information about the llvm-commits mailing list