mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1143216 - Do not replace recovered on bailout instructions with effective addresses equivalent. r=sunfish
This commit is contained in:
parent
fbe457672c
commit
5d5993fb31
17
js/src/jit-test/tests/ion/bug1143216.js
Normal file
17
js/src/jit-test/tests/ion/bug1143216.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Note: This test produces a link error which is required to reproduce the
|
||||||
|
// original issue.
|
||||||
|
m = (function(stdlib, n, heap) {
|
||||||
|
"use asm"
|
||||||
|
var Float64ArrayView = new stdlib.Float64Array(heap)
|
||||||
|
var Int16ArrayView = new stdlib.Int16Array(heap)
|
||||||
|
function f(i0) {
|
||||||
|
i0 = i0 | 0
|
||||||
|
i0 = i0 | 0
|
||||||
|
Int16ArrayView[0] = (i0 << 0) + i0
|
||||||
|
Float64ArrayView[0]
|
||||||
|
}
|
||||||
|
return f
|
||||||
|
})(this, {}, Array)
|
||||||
|
for (var j = 0; j < 9; j++) {
|
||||||
|
m()
|
||||||
|
}
|
@ -17,6 +17,9 @@ AnalyzeLsh(TempAllocator &alloc, MLsh *lsh)
|
|||||||
if (lsh->specialization() != MIRType_Int32)
|
if (lsh->specialization() != MIRType_Int32)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (lsh->isRecoveredOnBailout())
|
||||||
|
return;
|
||||||
|
|
||||||
MDefinition *index = lsh->lhs();
|
MDefinition *index = lsh->lhs();
|
||||||
MOZ_ASSERT(index->type() == MIRType_Int32);
|
MOZ_ASSERT(index->type() == MIRType_Int32);
|
||||||
|
|
||||||
@ -56,6 +59,8 @@ AnalyzeLsh(TempAllocator &alloc, MLsh *lsh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
last = add;
|
last = add;
|
||||||
|
if (last->isRecoveredOnBailout())
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!base) {
|
if (!base) {
|
||||||
@ -71,6 +76,9 @@ AnalyzeLsh(TempAllocator &alloc, MLsh *lsh)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
MBitAnd *bitAnd = use->consumer()->toDefinition()->toBitAnd();
|
MBitAnd *bitAnd = use->consumer()->toDefinition()->toBitAnd();
|
||||||
|
if (bitAnd->isRecoveredOnBailout())
|
||||||
|
return;
|
||||||
|
|
||||||
MDefinition *other = bitAnd->getOperand(1 - bitAnd->indexOf(*use));
|
MDefinition *other = bitAnd->getOperand(1 - bitAnd->indexOf(*use));
|
||||||
if (!other->isConstantValue() || !other->constantValue().isInt32())
|
if (!other->isConstantValue() || !other->constantValue().isInt32())
|
||||||
return;
|
return;
|
||||||
@ -84,6 +92,9 @@ AnalyzeLsh(TempAllocator &alloc, MLsh *lsh)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (base->isRecoveredOnBailout())
|
||||||
|
return;
|
||||||
|
|
||||||
MEffectiveAddress *eaddr = MEffectiveAddress::New(alloc, base, index, scale, displacement);
|
MEffectiveAddress *eaddr = MEffectiveAddress::New(alloc, base, index, scale, displacement);
|
||||||
last->replaceAllUsesWith(eaddr);
|
last->replaceAllUsesWith(eaddr);
|
||||||
last->block()->insertAfter(last, eaddr);
|
last->block()->insertAfter(last, eaddr);
|
||||||
|
Loading…
Reference in New Issue
Block a user