Implement getConstraintType for PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-07 20:16:30 +00:00
parent eac707f702
commit ad3bc8d8ad
2 changed files with 18 additions and 0 deletions

View 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) {

View 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);