look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20 llvm-svn: 70685
This commit is contained in:
parent
ccf6183687
commit
61af27860d
|
@ -848,11 +848,9 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
|
||||||
for (InputNo = 0; InputNo != S.getNumInputs(); ++InputNo) {
|
for (InputNo = 0; InputNo != S.getNumInputs(); ++InputNo) {
|
||||||
TargetInfo::ConstraintInfo &Input = InputConstraintInfos[InputNo];
|
TargetInfo::ConstraintInfo &Input = InputConstraintInfos[InputNo];
|
||||||
if (Input.hasTiedOperand() &&
|
if (Input.hasTiedOperand() &&
|
||||||
Input.getTiedOperand() == i) {
|
Input.getTiedOperand() == i)
|
||||||
InputNo = i;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
assert(InputNo != S.getNumInputs() && "Didn't find matching input!");
|
assert(InputNo != S.getNumInputs() && "Didn't find matching input!");
|
||||||
|
|
||||||
QualType InputTy = S.getInputExpr(InputNo)->getType();
|
QualType InputTy = S.getInputExpr(InputNo)->getType();
|
||||||
|
|
|
@ -77,6 +77,19 @@ unsigned char t13(unsigned input) {
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct large {
|
||||||
|
int x[1000];
|
||||||
|
};
|
||||||
|
|
||||||
|
unsigned long t15(int x, struct large *P) {
|
||||||
|
__asm__("xyz "
|
||||||
|
: "=r" (x)
|
||||||
|
: "m" (*P), "0" (x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// bitfield destination of an asm.
|
// bitfield destination of an asm.
|
||||||
struct S {
|
struct S {
|
||||||
|
|
Loading…
Reference in New Issue