mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1134638: 11. Add type checks in move emitter and LIR generation; r=nbp
This commit is contained in:
parent
61e2a2586e
commit
f0f683b11d
@ -547,12 +547,14 @@ LMoveGroup::add(LAllocation *from, LAllocation *to, LDefinition::Type type)
|
||||
|
||||
// Check that SIMD moves are aligned according to ABI requirements.
|
||||
if (LDefinition(type).isSimdType()) {
|
||||
MOZ_ASSERT(from->isMemory() || from->isFloatReg());
|
||||
if (from->isMemory()) {
|
||||
if (from->isArgument())
|
||||
MOZ_ASSERT(from->toArgument()->index() % SimdMemoryAlignment == 0);
|
||||
else
|
||||
MOZ_ASSERT(from->toStackSlot()->slot() % SimdMemoryAlignment == 0);
|
||||
}
|
||||
MOZ_ASSERT(to->isMemory() || to->isFloatReg());
|
||||
if (to->isMemory()) {
|
||||
if (to->isArgument())
|
||||
MOZ_ASSERT(to->toArgument()->index() % SimdMemoryAlignment == 0);
|
||||
|
@ -3969,6 +3969,7 @@ LIRGenerator::visitSimdShuffle(MSimdShuffle *ins)
|
||||
void
|
||||
LIRGenerator::visitSimdUnaryArith(MSimdUnaryArith *ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->input()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
// Cannot be at start, as the ouput is used as a temporary to store values.
|
||||
@ -3988,6 +3989,8 @@ LIRGenerator::visitSimdUnaryArith(MSimdUnaryArith *ins)
|
||||
void
|
||||
LIRGenerator::visitSimdBinaryComp(MSimdBinaryComp *ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
MOZ_ASSERT(ins->type() == MIRType_Int32x4);
|
||||
|
||||
if (ShouldReorderCommutative(ins->lhs(), ins->rhs(), ins))
|
||||
@ -4007,6 +4010,8 @@ LIRGenerator::visitSimdBinaryComp(MSimdBinaryComp *ins)
|
||||
void
|
||||
LIRGenerator::visitSimdBinaryBitwise(MSimdBinaryBitwise *ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
MDefinition *lhs = ins->lhs();
|
||||
|
@ -634,6 +634,8 @@ LIRGeneratorX86Shared::visitAsmJSAtomicBinopHeap(MAsmJSAtomicBinopHeap *ins)
|
||||
void
|
||||
LIRGeneratorX86Shared::visitSimdBinaryArith(MSimdBinaryArith *ins)
|
||||
{
|
||||
MOZ_ASSERT(IsSimdType(ins->lhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->rhs()->type()));
|
||||
MOZ_ASSERT(IsSimdType(ins->type()));
|
||||
|
||||
MDefinition *lhs = ins->lhs();
|
||||
|
Loading…
Reference in New Issue
Block a user