forked from OSchip/llvm-project
[X86] Prevent clang clobber checking for asm flag constraints.
Update getConstraintRegister as X86 Asm flag output constraints are no longer fully alphanumeric, llvm-svn: 354211
This commit is contained in:
parent
37f30231ba
commit
91ecb69acd
|
@ -198,7 +198,7 @@ public:
|
|||
StringRef Expression) const override {
|
||||
StringRef::iterator I, E;
|
||||
for (I = Constraint.begin(), E = Constraint.end(); I != E; ++I) {
|
||||
if (isalpha(*I))
|
||||
if (isalpha(*I) || *I == '@')
|
||||
break;
|
||||
}
|
||||
if (I == E)
|
||||
|
|
|
@ -363,3 +363,14 @@ int test_ccs(long nr, volatile long *addr) {
|
|||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
_Bool check_no_clobber_conflicts() {
|
||||
//CHECK-LABEL: @check_no_clobber_conflicts
|
||||
//CHECK: = tail call i8 asm "", "={@cce},~{cx},~{dirflag},~{fpsr},~{flags}"()
|
||||
_Bool b;
|
||||
asm(""
|
||||
: "=@cce"(b)
|
||||
:
|
||||
: "cx");
|
||||
return b;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue