diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-08-17 16:07:50 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-08-17 16:07:50 +0000 |
commit | 1c3210d08dbb73cf94e9db45c2b8de56208bc63e (patch) | |
tree | d5ed3cdb822c19a0731e27b3b74e2607709906bc /llvm/lib/Target | |
parent | fc60fb974c6e21372e4fb9b575c3e715c39d0258 (diff) | |
download | bcm5719-llvm-1c3210d08dbb73cf94e9db45c2b8de56208bc63e.tar.gz bcm5719-llvm-1c3210d08dbb73cf94e9db45c2b8de56208bc63e.zip |
Add the 'c' constraint as needed by the linux kernel
llvm-svn: 29747
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index e1e3ef38f95..7a479599342 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -4186,6 +4186,7 @@ X86TargetLowering::getConstraintType(char ConstraintLetter) const { case 'Y': case 'S': case 'D': + case 'c': return C_RegisterClass; default: return TargetLowering::getConstraintType(ConstraintLetter); } @@ -4201,11 +4202,15 @@ getRegClassForInlineAsmConstraint(const std::string &Constraint, default: break; // Unknown constraint letter case 'S': // ESI if (VT == MVT::i32) - return make_vector<unsigned>(X86::ESI,0); + return make_vector<unsigned>(X86::ESI,0); break; case 'D': // EDI if (VT == MVT::i32) - return make_vector<unsigned>(X86::EDI,0); + return make_vector<unsigned>(X86::EDI,0); + break; + case 'c': // ECX + if (VT == MVT::i32) + return make_vector<unsigned>(X86::ECX, 0); break; case 'A': // EAX/EDX if (VT == MVT::i32 || VT == MVT::i64) |