File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1465,7 +1465,7 @@ bool X86TargetInfo::validateAsmConstraint(
1465
1465
}
1466
1466
case ' f' : // Any x87 floating point stack register.
1467
1467
// Constraint 'f' cannot be used for output operands.
1468
- if (Info.ConstraintStr [0 ] == ' =' )
1468
+ if (Info.ConstraintStr [0 ] == ' =' || Info. ConstraintStr [ 0 ] == ' + ' )
1469
1469
return false ;
1470
1470
Info.setAllowsRegister ();
1471
1471
return true ;
Original file line number Diff line number Diff line change @@ -204,6 +204,12 @@ double f_output_constraint(void) {
204
204
return result ;
205
205
}
206
206
207
+ double f_output_constraint_2 (void ) {
208
+ double result ;
209
+ __asm("foo1" : "+f" (result )); // expected-error {{invalid output constraint '+f' in asm}}
210
+ return result ;
211
+ }
212
+
207
213
void fn1 (void ) {
208
214
int l ;
209
215
__asm__(""
You can’t perform that action at this time.
0 commit comments