mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
generalize aggregate handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3248,12 +3248,28 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) {
|
|||||||
if (OpInfo.CallOperandVal) {
|
if (OpInfo.CallOperandVal) {
|
||||||
OpInfo.CallOperand = getValue(OpInfo.CallOperandVal);
|
OpInfo.CallOperand = getValue(OpInfo.CallOperandVal);
|
||||||
const Type *OpTy = OpInfo.CallOperandVal->getType();
|
const Type *OpTy = OpInfo.CallOperandVal->getType();
|
||||||
if (!OpInfo.isIndirect) {
|
// If this is an indirect operand, the operand is a pointer to the
|
||||||
// Must be an input.
|
// accessed type.
|
||||||
OpVT = TLI.getValueType(OpTy);
|
if (OpInfo.isIndirect)
|
||||||
} else {
|
OpTy = cast<PointerType>(OpTy)->getElementType();
|
||||||
OpVT = TLI.getValueType(cast<PointerType>(OpTy)->getElementType(),true);
|
|
||||||
|
// If OpTy is not a first-class value, it may be a struct/union that we
|
||||||
|
// can tile with integers.
|
||||||
|
if (!OpTy->isFirstClassType() && OpTy->isSized()) {
|
||||||
|
unsigned BitSize = TD->getTypeSizeInBits(OpTy);
|
||||||
|
switch (BitSize) {
|
||||||
|
default: break;
|
||||||
|
case 1:
|
||||||
|
case 8:
|
||||||
|
case 16:
|
||||||
|
case 32:
|
||||||
|
case 64:
|
||||||
|
OpTy = IntegerType::get(BitSize);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OpVT = TLI.getValueType(OpTy, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
OpInfo.ConstraintVT = OpVT;
|
OpInfo.ConstraintVT = OpVT;
|
||||||
|
Reference in New Issue
Block a user