mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changesets 7f9bca33903e, 0332a61f0a7c, and ea05d1bfeff8 (bug 1014083) for jittest failures.
This commit is contained in:
parent
374abb1cc6
commit
13ab094247
@ -8463,10 +8463,10 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mir->spIncrement())
|
||||
if (mir->spIncrement())
|
||||
masm.freeStack(mir->spIncrement());
|
||||
|
||||
JS_ASSERT((AlignmentAtPrologue + masm.framePushed()) % StackAlignment == 0);
|
||||
JS_ASSERT((AlignmentAtPrologue + masm.framePushed()) % StackAlignment == 0);
|
||||
|
||||
#ifdef DEBUG
|
||||
Label ok;
|
||||
|
@ -1554,7 +1554,7 @@ class LIRGraph
|
||||
// Round to StackAlignment, but also round to at least sizeof(Value) in
|
||||
// case that's greater, because StackOffsetOfPassedArg rounds argument
|
||||
// slots to 8-byte boundaries.
|
||||
size_t Alignment = Max(size_t(StackAlignment), sizeof(Value));
|
||||
size_t Alignment = Max(sizeof(StackAlignment), sizeof(Value));
|
||||
return AlignBytes(localSlotCount(), Alignment);
|
||||
}
|
||||
size_t paddedLocalSlotsSize() const {
|
||||
|
@ -118,17 +118,14 @@ class MIRGenerator
|
||||
bool performsCall() const {
|
||||
return performsCall_;
|
||||
}
|
||||
void setNeedsInitialStackAlignment() {
|
||||
needsInitialStackAlignment_ = true;
|
||||
}
|
||||
bool needsInitialStackAlignment() const {
|
||||
JS_ASSERT(compilingAsmJS());
|
||||
return needsInitialStackAlignment_;
|
||||
}
|
||||
void setPerformsAsmJSCall() {
|
||||
JS_ASSERT(compilingAsmJS());
|
||||
setPerformsCall();
|
||||
setNeedsInitialStackAlignment();
|
||||
performsAsmJSCall_ = true;
|
||||
}
|
||||
bool performsAsmJSCall() const {
|
||||
JS_ASSERT(compilingAsmJS());
|
||||
return performsAsmJSCall_;
|
||||
}
|
||||
void noteMinAsmJSHeapLength(uint32_t len) {
|
||||
minAsmJSHeapLength_ = len;
|
||||
@ -157,7 +154,7 @@ class MIRGenerator
|
||||
|
||||
uint32_t maxAsmJSStackArgBytes_;
|
||||
bool performsCall_;
|
||||
bool needsInitialStackAlignment_;
|
||||
bool performsAsmJSCall_;
|
||||
uint32_t minAsmJSHeapLength_;
|
||||
|
||||
// Keep track of whether frame arguments are modified during execution.
|
||||
|
@ -29,7 +29,7 @@ MIRGenerator::MIRGenerator(CompileCompartment *compartment, const JitCompileOpti
|
||||
cancelBuild_(false),
|
||||
maxAsmJSStackArgBytes_(0),
|
||||
performsCall_(false),
|
||||
needsInitialStackAlignment_(false),
|
||||
performsAsmJSCall_(false),
|
||||
minAsmJSHeapLength_(AsmJSAllocationGranularity),
|
||||
modifiesFrameArguments_(false),
|
||||
options(options)
|
||||
|
@ -52,8 +52,7 @@ CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, Mac
|
||||
sps_(&GetIonContext()->runtime->spsProfiler(), &lastPC_),
|
||||
osrEntryOffset_(0),
|
||||
skipArgCheckEntryOffset_(0),
|
||||
frameDepth_(graph->paddedLocalSlotsSize() + graph->argumentsSize()),
|
||||
frameInitialAdjustment_(0)
|
||||
frameDepth_(graph->paddedLocalSlotsSize() + graph->argumentsSize())
|
||||
{
|
||||
if (!gen->compilingAsmJS())
|
||||
masm.setInstrumentation(&sps_);
|
||||
@ -73,12 +72,10 @@ CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, Mac
|
||||
#else
|
||||
bool forceAlign = false;
|
||||
#endif
|
||||
if (gen->needsInitialStackAlignment() || forceAlign) {
|
||||
if (gen->performsAsmJSCall() || forceAlign) {
|
||||
unsigned alignmentAtCall = AlignmentMidPrologue + frameDepth_;
|
||||
if (unsigned rem = alignmentAtCall % StackAlignment) {
|
||||
if (unsigned rem = alignmentAtCall % StackAlignment)
|
||||
frameDepth_ += StackAlignment - rem;
|
||||
frameInitialAdjustment_ = rem;
|
||||
}
|
||||
}
|
||||
|
||||
// FrameSizeClass is only used for bailing, which cannot happen in
|
||||
|
@ -144,11 +144,6 @@ class CodeGeneratorShared : public LInstructionVisitor
|
||||
// spills.
|
||||
int32_t frameDepth_;
|
||||
|
||||
// In some cases, we force stack alignment to platform boundaries, see
|
||||
// also CodeGeneratorShared constructor. This value records the adjustment
|
||||
// we've done.
|
||||
int32_t frameInitialAdjustment_;
|
||||
|
||||
// Frame class this frame's size falls into (see IonFrame.h).
|
||||
FrameSizeClass frameClass_;
|
||||
|
||||
@ -166,7 +161,7 @@ class CodeGeneratorShared : public LInstructionVisitor
|
||||
|
||||
inline int32_t SlotToStackOffset(int32_t slot) const {
|
||||
JS_ASSERT(slot > 0 && slot <= int32_t(graph.localSlotCount()));
|
||||
int32_t offset = masm.framePushed() - frameInitialAdjustment_ - slot;
|
||||
int32_t offset = masm.framePushed() - slot;
|
||||
JS_ASSERT(offset >= 0);
|
||||
return offset;
|
||||
}
|
||||
@ -174,10 +169,10 @@ class CodeGeneratorShared : public LInstructionVisitor
|
||||
// See: SlotToStackOffset. This is used to convert pushed arguments
|
||||
// to a slot index that safepoints can use.
|
||||
//
|
||||
// offset = framePushed - frameInitialAdjustment - slot
|
||||
// offset + slot = framePushed - frameInitialAdjustment
|
||||
// slot = framePushed - frameInitialAdjustement - offset
|
||||
return masm.framePushed() - frameInitialAdjustment_ - offset;
|
||||
// offset = framePushed - slot
|
||||
// offset + slot = framePushed
|
||||
// slot = framePushed - offset
|
||||
return masm.framePushed() - offset;
|
||||
}
|
||||
|
||||
// For argument construction for calls. Argslots are Value-sized.
|
||||
|
@ -241,8 +241,8 @@ MoveEmitterX86::breakCycle(const MoveOperand &to, MoveOp::Type type)
|
||||
masm.storeDouble(to.floatReg(), cycleSlot());
|
||||
}
|
||||
break;
|
||||
case MoveOp::INT32:
|
||||
#ifdef JS_CODEGEN_X64
|
||||
case MoveOp::INT32:
|
||||
// x64 can't pop to a 32-bit destination, so don't push.
|
||||
if (to.isMemory()) {
|
||||
masm.load32(toAddress(to), ScratchReg);
|
||||
@ -251,6 +251,9 @@ MoveEmitterX86::breakCycle(const MoveOperand &to, MoveOp::Type type)
|
||||
masm.store32(to.reg(), cycleSlot());
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifndef JS_CODEGEN_X64
|
||||
case MoveOp::INT32:
|
||||
#endif
|
||||
case MoveOp::GENERAL:
|
||||
masm.Push(toOperand(to));
|
||||
@ -290,8 +293,8 @@ MoveEmitterX86::completeCycle(const MoveOperand &to, MoveOp::Type type)
|
||||
masm.loadDouble(cycleSlot(), to.floatReg());
|
||||
}
|
||||
break;
|
||||
case MoveOp::INT32:
|
||||
#ifdef JS_CODEGEN_X64
|
||||
case MoveOp::INT32:
|
||||
JS_ASSERT(pushedAtCycle_ != -1);
|
||||
JS_ASSERT(pushedAtCycle_ - pushedAtStart_ >= sizeof(int32_t));
|
||||
// x64 can't pop to a 32-bit destination.
|
||||
@ -302,6 +305,9 @@ MoveEmitterX86::completeCycle(const MoveOperand &to, MoveOp::Type type)
|
||||
masm.load32(cycleSlot(), to.reg());
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifndef JS_CODEGEN_X64
|
||||
case MoveOp::INT32:
|
||||
#endif
|
||||
case MoveOp::GENERAL:
|
||||
JS_ASSERT(masm.framePushed() - pushedAtStart_ >= sizeof(intptr_t));
|
||||
|
Loading…
Reference in New Issue
Block a user