forked from OSchip/llvm-project
fix PR4938 by recognizing % as a modifier on outputs,
previously we only recognized it on inputs. llvm-svn: 83939
This commit is contained in:
parent
278c12e1af
commit
f315471e24
|
@ -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;
|
||||
|
|
|
@ -101,3 +101,12 @@ void t14(struct S *P) {
|
|||
}
|
||||
|
||||
|
||||
// PR4938
|
||||
int t16() {
|
||||
int a,b;
|
||||
asm ( "nop;"
|
||||
:"=%c" (a)
|
||||
: "r" (b)
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue