[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp PPCISelLowering.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 7 12:16:42 PST 2006
Changes in directory llvm/lib/Target/PowerPC:
PPCISelLowering.cpp updated: 1.85 -> 1.86
PPCISelLowering.h updated: 1.20 -> 1.21
---
Log message:
Implement getConstraintType for PPC.
---
Diffs of the changes: (+18 -0)
PPCISelLowering.cpp | 17 +++++++++++++++++
PPCISelLowering.h | 1 +
2 files changed, 18 insertions(+)
Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.85 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.86
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.85 Mon Feb 6 18:47:13 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Tue Feb 7 14:16:30 2006
@@ -980,6 +980,23 @@
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: llvm/lib/Target/PowerPC/PPCISelLowering.h
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.h:1.20 llvm/lib/Target/PowerPC/PPCISelLowering.h:1.21
--- llvm/lib/Target/PowerPC/PPCISelLowering.h:1.20 Mon Feb 6 18:47:13 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.h Tue Feb 7 14:16:30 2006
@@ -97,6 +97,7 @@
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);
More information about the llvm-commits
mailing list