fix PR4938 by recognizing % as a modifier on outputs,

previously we only recognized it on inputs.

llvm-svn: 83939
This commit is contained in:
Chris Lattner 2009-10-13 04:32:07 +00:00
parent 278c12e1af
commit f315471e24
2 changed files with 12 additions and 0 deletions

View File

@ -188,6 +188,9 @@ bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const {
}
case '&': // early clobber.
break;
case '%': // commutative.
// FIXME: Check that there is a another register after this one.
break;
case 'r': // general register.
Info.setAllowsRegister();
break;

View File

@ -101,3 +101,12 @@ void t14(struct S *P) {
}
// PR4938
int t16() {
int a,b;
asm ( "nop;"
:"=%c" (a)
: "r" (b)
);
return 0;
}