mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Support vector constant zeros, thanks to Zack Rusin for the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -799,13 +799,13 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
|
|||||||
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
|
||||||
InitializeMemory(CP->getOperand(i), (char*)Addr+i*ElementSize);
|
InitializeMemory(CP->getOperand(i), (char*)Addr+i*ElementSize);
|
||||||
return;
|
return;
|
||||||
|
} else if (isa<ConstantAggregateZero>(Init)) {
|
||||||
|
memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType()));
|
||||||
|
return;
|
||||||
} else if (Init->getType()->isFirstClassType()) {
|
} else if (Init->getType()->isFirstClassType()) {
|
||||||
GenericValue Val = getConstantValue(Init);
|
GenericValue Val = getConstantValue(Init);
|
||||||
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
|
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
|
||||||
return;
|
return;
|
||||||
} else if (isa<ConstantAggregateZero>(Init)) {
|
|
||||||
memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType()));
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Init->getType()->getTypeID()) {
|
switch (Init->getType()->getTypeID()) {
|
||||||
|
Reference in New Issue
Block a user