зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 2d0fadc97308 (bug 1215555) for bustage on ARM platforms on a CLOSED TREE
--HG-- extra : amend_source : 163d18fae6f752abbd6fb439ab9129af3e167528
This commit is contained in:
Родитель
5e9dceaa9a
Коммит
28f863ed8e
|
@ -123,11 +123,6 @@ class ModuleCompiler
|
|||
bool finishGeneratingFunction(AsmFunction& func, CodeGenerator& codegen,
|
||||
const AsmJSFunctionLabels& labels)
|
||||
{
|
||||
// If we have hit OOM then invariants which we assert below may not
|
||||
// hold, so abort now.
|
||||
if (masm().oom())
|
||||
return false;
|
||||
|
||||
// Code range
|
||||
unsigned line = func.lineno();
|
||||
unsigned column = func.column();
|
||||
|
|
|
@ -2185,7 +2185,7 @@ Assembler::as_BranchPool(uint32_t value, RepatchLabel* label, ARMBuffer::PoolEnt
|
|||
if (label->bound()) {
|
||||
BufferOffset dest(label);
|
||||
as_b(dest.diffB<BOffImm>(ret), c, ret);
|
||||
} else if (!oom()) {
|
||||
} else {
|
||||
label->use(ret.getOffset());
|
||||
}
|
||||
#ifdef JS_DISASM_ARM
|
||||
|
@ -2385,12 +2385,14 @@ Assembler::as_b(BOffImm off, Condition c, Label* documentation)
|
|||
BufferOffset
|
||||
Assembler::as_b(Label* l, Condition c)
|
||||
{
|
||||
if (m_buffer.oom()) {
|
||||
BufferOffset ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (l->bound()) {
|
||||
// Note only one instruction is emitted here, the NOP is overwritten.
|
||||
BufferOffset ret = allocBranchInst();
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
as_b(BufferOffset(l).diffB<BOffImm>(ret), c, ret);
|
||||
#ifdef JS_DISASM_ARM
|
||||
spewBranch(m_buffer.getInstOrNull(ret), l);
|
||||
|
@ -2398,9 +2400,6 @@ Assembler::as_b(Label* l, Condition c)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
int32_t old;
|
||||
BufferOffset ret;
|
||||
if (l->used()) {
|
||||
|
@ -2417,11 +2416,8 @@ Assembler::as_b(Label* l, Condition c)
|
|||
BOffImm inv;
|
||||
ret = as_b(inv, c, l);
|
||||
}
|
||||
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
MOZ_ASSERT(l->use(ret.getOffset() == old);
|
||||
DebugOnly<int32_t> check = l->use(ret.getOffset());
|
||||
MOZ_ASSERT(check == old);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2456,12 +2452,14 @@ Assembler::as_bl(BOffImm off, Condition c, Label* documentation)
|
|||
BufferOffset
|
||||
Assembler::as_bl(Label* l, Condition c)
|
||||
{
|
||||
if (m_buffer.oom()) {
|
||||
BufferOffset ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (l->bound()) {
|
||||
// Note only one instruction is emitted here, the NOP is overwritten.
|
||||
BufferOffset ret = allocBranchInst();
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
as_bl(BufferOffset(l).diffB<BOffImm>(ret), c, ret);
|
||||
#ifdef JS_DISASM_ARM
|
||||
spewBranch(m_buffer.getInstOrNull(ret), l);
|
||||
|
@ -2469,9 +2467,6 @@ Assembler::as_bl(Label* l, Condition c)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
int32_t old;
|
||||
BufferOffset ret;
|
||||
// See if the list was empty :(
|
||||
|
@ -2489,11 +2484,8 @@ Assembler::as_bl(Label* l, Condition c)
|
|||
BOffImm inv;
|
||||
ret = as_bl(inv, c, l);
|
||||
}
|
||||
|
||||
if (oom())
|
||||
return BufferOffset();
|
||||
|
||||
MOZ_ASSERT(l->use(ret.getOffset() == old);
|
||||
DebugOnly<int32_t> check = l->use(ret.getOffset());
|
||||
MOZ_ASSERT(check == old);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,13 +152,8 @@ class AssemblerBuffer
|
|||
|
||||
bool ensureSpace(int size) {
|
||||
// Space can exist in the most recent Slice.
|
||||
if (tail && tail->length() + size <= tail->Capacity()) {
|
||||
// Simulate allocation failure even when we don't need a new slice.
|
||||
if (js::oom::ShouldFailWithOOM())
|
||||
return fail_oom();
|
||||
|
||||
if (tail && tail->length() + size <= tail->Capacity())
|
||||
return true;
|
||||
}
|
||||
|
||||
// Otherwise, a new Slice must be added.
|
||||
Slice* slice = newSlice(lifoAlloc_);
|
||||
|
|
|
@ -704,8 +704,6 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
|
|||
// Mark and emit the guard branch.
|
||||
markNextAsBranch();
|
||||
this->putBytes(guardSize_ * InstSize, nullptr);
|
||||
if (this->oom())
|
||||
return;
|
||||
BufferOffset afterPool = this->nextOffset();
|
||||
Asm::WritePoolGuard(branch, this->getInst(branch), afterPool);
|
||||
|
||||
|
@ -866,7 +864,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer<SliceSize, Inst
|
|||
}
|
||||
|
||||
inhibitNops_ = true;
|
||||
while ((sizeExcludingCurrentPool() & (alignment - 1)) && !this->oom())
|
||||
while (sizeExcludingCurrentPool() & (alignment - 1))
|
||||
putInt(alignFillInst_);
|
||||
inhibitNops_ = false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче