mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix CodeGen/Generic/2007-04-27-LargeMemObject.ll and
CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll llvm-svn: 36534
This commit is contained in:
parent
782ebe9f8a
commit
0e2a4a7890
@ -3210,16 +3210,22 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
|
|||||||
switch (Constraints[i].Type) {
|
switch (Constraints[i].Type) {
|
||||||
case InlineAsm::isOutput:
|
case InlineAsm::isOutput:
|
||||||
if (!Constraints[i].isIndirect) {
|
if (!Constraints[i].isIndirect) {
|
||||||
|
// The return value of the call is this value.
|
||||||
assert(I.getType() != Type::VoidTy && "Bad inline asm!");
|
assert(I.getType() != Type::VoidTy && "Bad inline asm!");
|
||||||
OpVT = TLI.getValueType(I.getType());
|
OpVT = TLI.getValueType(I.getType());
|
||||||
} else {
|
} else {
|
||||||
const Type *OpTy = I.getOperand(OpNum)->getType();
|
const Type *OpTy = I.getOperand(OpNum)->getType();
|
||||||
OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType());
|
OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType(),true);
|
||||||
OpNum++; // Consumes a call operand.
|
OpNum++; // Consumes a call operand.
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case InlineAsm::isInput:
|
case InlineAsm::isInput:
|
||||||
OpVT = TLI.getValueType(I.getOperand(OpNum)->getType());
|
if (!Constraints[i].isIndirect) {
|
||||||
|
OpVT = TLI.getValueType(I.getOperand(OpNum)->getType());
|
||||||
|
} else {
|
||||||
|
const Type *OpTy = I.getOperand(OpNum)->getType();
|
||||||
|
OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType(),true);
|
||||||
|
}
|
||||||
OpNum++; // Consumes a call operand.
|
OpNum++; // Consumes a call operand.
|
||||||
break;
|
break;
|
||||||
case InlineAsm::isClobber:
|
case InlineAsm::isClobber:
|
||||||
@ -3275,8 +3281,8 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
|
|||||||
if (ConstraintCode.size() == 1) // not a physreg name.
|
if (ConstraintCode.size() == 1) // not a physreg name.
|
||||||
CTy = TLI.getConstraintType(ConstraintCode);
|
CTy = TLI.getConstraintType(ConstraintCode);
|
||||||
|
|
||||||
if (CTy == TargetLowering::C_Memory) {
|
if (CTy != TargetLowering::C_RegisterClass) {
|
||||||
// Memory output.
|
// Memory output, or 'other' output (e.g. 'X' constraint).
|
||||||
SDOperand InOperandVal = getValue(I.getOperand(OpNum));
|
SDOperand InOperandVal = getValue(I.getOperand(OpNum));
|
||||||
|
|
||||||
// Check that the operand (the address to store to) isn't a float.
|
// Check that the operand (the address to store to) isn't a float.
|
||||||
|
Loading…
Reference in New Issue
Block a user