Handle the 'e' constraint. Fixes PR3385

llvm-svn: 62923
This commit is contained in:
Anders Carlsson 2009-01-24 18:03:09 +00:00
parent b66a312f93
commit a0b892113a
2 changed files with 10 additions and 2 deletions

View File

@ -505,8 +505,10 @@ X86TargetInfo::validateAsmConstraint(char c,
case 'y': // Any MMX register.
case 'x': // Any SSE register.
case 'Q': // Any register accessible as [r]h: a, b, c, and d.
case 'Z': // 32-bit integer constant for use with zero-extending x86_64
// instructions.
case 'e': // 32-bit signed integer constant for use with zero-extending
// x86_64 instructions.
case 'Z': // 32-bit unsigned integer constant for use with zero-extending
// x86_64 instructions.
case 'N': // unsigned 8-bit integer constant for use with in and out
// instructions.
info = (TargetInfo::ConstraintInfo)(info|TargetInfo::CI_AllowsRegister);

View File

@ -54,3 +54,9 @@ void test5()
{
asm("nop" : : "X" (8));
}
// PR3385
void test6(long i)
{
asm("nop" : : "er"(i));
}