PR3678: Add support for "Yt" asm register constraint.

llvm-svn: 72764
This commit is contained in:
Eli Friedman 2009-06-03 10:33:05 +00:00
parent 1a4eea5ad6
commit ffc8748faa
2 changed files with 14 additions and 0 deletions

View File

@ -754,6 +754,13 @@ X86TargetInfo::validateAsmConstraint(const char *&Name,
// instructions.
Info.setAllowsRegister();
return true;
case 'Y':
++Name;
if (*Name == 't') {
Info.setAllowsRegister();
return true;
}
return false;
}
}

View File

@ -0,0 +1,7 @@
// RUN: clang-cc %s -triple i386-pc-linux-gnu -target-feature=+sse2 -verify -fsyntax-only
// PR3678
int test8() {
asm("%0" : : "Yt"(1.0));
asm("%0" : : "Yy"(1.0)); // expected-error {{invalid input constraint 'Yy' in asm}}
}