From: Andrew Lenharth Date: Thu, 17 Aug 2006 15:35:43 +0000 (+0000) Subject: Add support for S and D constraints, as needed to compile the linux kernel. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c63e56ee5f00da39563c174262872ec5e96a4bb5;p=oota-llvm.git Add support for S and D constraints, as needed to compile the linux kernel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29746 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 4f1feb1c615..e1e3ef38f95 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -4184,6 +4184,8 @@ X86TargetLowering::getConstraintType(char ConstraintLetter) const { case 'Q': case 'x': case 'Y': + case 'S': + case 'D': return C_RegisterClass; default: return TargetLowering::getConstraintType(ConstraintLetter); } @@ -4197,6 +4199,14 @@ getRegClassForInlineAsmConstraint(const std::string &Constraint, // FIXME: not handling MMX registers yet ('y' constraint). switch (Constraint[0]) { // GCC X86 Constraint Letters default: break; // Unknown constraint letter + case 'S': // ESI + if (VT == MVT::i32) + return make_vector(X86::ESI,0); + break; + case 'D': // EDI + if (VT == MVT::i32) + return make_vector(X86::EDI,0); + break; case 'A': // EAX/EDX if (VT == MVT::i32 || VT == MVT::i64) return make_vector(X86::EAX, X86::EDX, 0);