[llvm-commits] [llvm] r156295 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Eric Christopher
echristo at apple.com
Sun May 6 23:25:19 PDT 2012
Author: echristo
Date: Mon May 7 01:25:19 2012
New Revision: 156295
URL: http://llvm.org/viewvc/llvm-project?rev=156295&view=rev
Log:
Add support for the 'x' constraint.
Patch by Jack Carter.
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=156295&r1=156294&r2=156295&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Mon May 7 01:25:19 2012
@@ -3001,7 +3001,8 @@
// backwards compatibility.
// 'c' : A register suitable for use in an indirect
// jump. This will always be $25 for -mabicalls.
- // 'l' : The lo register.
+ // 'l' : The lo register. 1 word storage.
+ // 'x' : The hilo register pair. Double word storage.
if (Constraint.size() == 1) {
switch (Constraint[0]) {
default : break;
@@ -3010,6 +3011,7 @@
case 'f':
case 'c':
case 'l':
+ case 'x':
return C_RegisterClass;
}
}
@@ -3045,6 +3047,7 @@
break;
case 'c': // $25 for indirect jumps
case 'l': // lo register
+ case 'x': // hilo register pair
if (type->isIntegerTy())
weight = CW_SpecificReg;
break;
@@ -3097,6 +3100,10 @@
if (VT == MVT::i32)
return std::make_pair((unsigned)Mips::LO, &Mips::HILORegClass);
return std::make_pair((unsigned)Mips::LO64, &Mips::HILO64RegClass);
+ case 'x': // register suitable for indirect jump
+ // Fixme: Not triggering the use of both hi and low
+ // This will generate an error message
+ return std::make_pair(0u, static_cast<const TargetRegisterClass*>(0));
}
}
return TargetLowering::getRegForInlineAsmConstraint(Constraint, VT);
More information about the llvm-commits
mailing list