mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
Look through struct wrapped types for inline asm statments.
Patch by Evan Cheng. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77a2c4c1e5
commit
cef81b7e51
@ -5268,6 +5268,7 @@ public:
|
||||
|
||||
const llvm::Type *OpTy = CallOperandVal->getType();
|
||||
|
||||
// FIXME: code duplicated from TargetLowering::ParseConstraints().
|
||||
// If this is an indirect operand, the operand is a pointer to the
|
||||
// accessed type.
|
||||
if (isIndirect) {
|
||||
@ -5277,6 +5278,11 @@ public:
|
||||
OpTy = PtrTy->getElementType();
|
||||
}
|
||||
|
||||
// Look for vector wrapped in a struct. e.g. { <16 x i8> }.
|
||||
if (const StructType *STy = dyn_cast<StructType>(OpTy))
|
||||
if (STy->getNumElements() == 1)
|
||||
OpTy = STy->getElementType(0);
|
||||
|
||||
// If OpTy is not a single value, it may be a struct/union that we
|
||||
// can tile with integers.
|
||||
if (!OpTy->isSingleValueType() && OpTy->isSized()) {
|
||||
|
@ -2812,6 +2812,12 @@ TargetLowering::AsmOperandInfoVector TargetLowering::ParseConstraints(
|
||||
report_fatal_error("Indirect operand for inline asm not a pointer!");
|
||||
OpTy = PtrTy->getElementType();
|
||||
}
|
||||
|
||||
// Look for vector wrapped in a struct. e.g. { <16 x i8> }.
|
||||
if (const StructType *STy = dyn_cast<StructType>(OpTy))
|
||||
if (STy->getNumElements() == 1)
|
||||
OpTy = STy->getElementType(0);
|
||||
|
||||
// If OpTy is not a single value, it may be a struct/union that we
|
||||
// can tile with integers.
|
||||
if (!OpTy->isSingleValueType() && OpTy->isSized()) {
|
||||
|
Loading…
Reference in New Issue
Block a user