mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-25 15:01:07 +00:00
Add support for S and D constraints, as needed to compile the linux kernel.
llvm-svn: 29746
This commit is contained in:
parent
09354b923d
commit
7fdc3bbbcf
@ -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<unsigned>(X86::ESI,0);
|
||||
break;
|
||||
case 'D': // EDI
|
||||
if (VT == MVT::i32)
|
||||
return make_vector<unsigned>(X86::EDI,0);
|
||||
break;
|
||||
case 'A': // EAX/EDX
|
||||
if (VT == MVT::i32 || VT == MVT::i64)
|
||||
return make_vector<unsigned>(X86::EAX, X86::EDX, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user