Implement getConstraintType for PPC.
authorChris Lattner <sabre@nondot.org>
Tue, 7 Feb 2006 20:16:30 +0000 (20:16 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 Feb 2006 20:16:30 +0000 (20:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26042 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h

index 76bcf1e5c36871dca291102a40814bce1f8cb907..8e454105a0f832ed5f33309785339b1cc8763422 100644 (file)
@@ -980,6 +980,23 @@ PPCTargetLowering::InsertAtEndOfBasicBlock(MachineInstr *MI,
   return BB;
 }
 
+/// getConstraintType - Given a constraint letter, return the type of
+/// constraint it is for this target.
+PPCTargetLowering::ConstraintType 
+PPCTargetLowering::getConstraintType(char ConstraintLetter) const {
+  switch (ConstraintLetter) {
+  default: break;
+  case 'b':
+  case 'r':
+  case 'f':
+  case 'v':
+  case 'y':
+    return C_RegisterClass;
+  }  
+  return TargetLowering::getConstraintType(ConstraintLetter);
+}
+
+
 std::vector<unsigned> PPCTargetLowering::
 getRegForInlineAsmConstraint(const std::string &Constraint) const {
   if (Constraint.size() == 1) {
index bcf4c6ffe4883706c5a9952de81be4fcb0808a76..681d41a85340f511d205c752a06b7fb46b4a328a 100644 (file)
@@ -97,6 +97,7 @@ namespace llvm {
     virtual MachineBasicBlock *InsertAtEndOfBasicBlock(MachineInstr *MI,
                                                        MachineBasicBlock *MBB);
     
+    ConstraintType getConstraintType(char ConstraintLetter) const;
     std::vector<unsigned> 
       getRegForInlineAsmConstraint(const std::string &Constraint) const;
     bool isOperandValidForConstraint(SDOperand Op, char ConstraintLetter);