mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out 30d5d70de548:1d61285b1da5 (bug 958672) for Linux32 jit-test failures
--HG-- extra : rebase_source : 57253988fe8ec431e03a28f4203d122ceb5c4da9
This commit is contained in:
parent
55e7a3e71f
commit
4279be2d7c
@ -1793,10 +1793,8 @@ CodeGenerator::visitCallNative(LCallNative *call)
|
||||
// Test for failure.
|
||||
masm.branchIfFalseBool(ReturnReg, masm.failureLabel(executionMode));
|
||||
|
||||
// Load the outparam vp[0] into output register(s), if observable.
|
||||
Address ResultAddress(StackPointer, IonNativeExitFrameLayout::offsetOfResult());
|
||||
if (call->mir()->hasUses())
|
||||
masm.loadValue(ResultAddress, JSReturnOperand);
|
||||
// Load the outparam vp[0] into output register(s).
|
||||
masm.loadValue(Address(StackPointer, IonNativeExitFrameLayout::offsetOfResult()), JSReturnOperand);
|
||||
|
||||
// The next instruction is removing the footer of the exit frame, so there
|
||||
// is no need for leaveFakeExitFrame.
|
||||
@ -1894,13 +1892,17 @@ CodeGenerator::visitCallDOMNative(LCallDOMNative *call)
|
||||
masm.passABIArg(argArgs);
|
||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, target->jitInfo()->method));
|
||||
|
||||
if (!target->jitInfo()->isInfallible)
|
||||
if (target->jitInfo()->isInfallible) {
|
||||
masm.loadValue(Address(StackPointer, IonDOMMethodExitFrameLayout::offsetOfResult()),
|
||||
JSReturnOperand);
|
||||
} else {
|
||||
// Test for failure.
|
||||
masm.branchIfFalseBool(ReturnReg, masm.exceptionLabel());
|
||||
|
||||
// Load the outparam vp[0] into output register(s), if observable.
|
||||
Address ResultAddress(StackPointer, IonDOMMethodExitFrameLayout::offsetOfResult());
|
||||
if (call->mir()->hasUses())
|
||||
masm.loadValue(ResultAddress, JSReturnOperand);
|
||||
// Load the outparam vp[0] into output register(s).
|
||||
masm.loadValue(Address(StackPointer, IonDOMMethodExitFrameLayout::offsetOfResult()),
|
||||
JSReturnOperand);
|
||||
}
|
||||
|
||||
// The next instruction is removing the footer of the exit frame, so there
|
||||
// is no need for leaveFakeExitFrame.
|
||||
|
@ -1004,9 +1004,17 @@ class LStackArgV : public LInstructionHelper<0, BOX_PIECES, 0>
|
||||
template <size_t Defs, size_t Operands, size_t Temps>
|
||||
class LJSCallInstructionHelper : public LCallInstructionHelper<Defs, Operands, Temps>
|
||||
{
|
||||
// Slot below which %esp should be adjusted to make the call.
|
||||
// Zero for a function without arguments.
|
||||
uint32_t argslot_;
|
||||
|
||||
public:
|
||||
LJSCallInstructionHelper(uint32_t argslot)
|
||||
: argslot_(argslot)
|
||||
{ }
|
||||
|
||||
uint32_t argslot() const {
|
||||
return mir()->numStackArgs();
|
||||
return argslot_;
|
||||
}
|
||||
MCall *mir() const {
|
||||
return this->mir_->toCall();
|
||||
@ -1031,6 +1039,8 @@ class LJSCallInstructionHelper : public LCallInstructionHelper<Defs, Operands, T
|
||||
uint32_t numActualArgs() const {
|
||||
return mir()->numActualArgs();
|
||||
}
|
||||
|
||||
typedef LJSCallInstructionHelper<Defs, Operands, Temps> JSCallHelper;
|
||||
};
|
||||
|
||||
// Generates a polymorphic callsite, wherein the function being called is
|
||||
@ -1040,8 +1050,9 @@ class LCallGeneric : public LJSCallInstructionHelper<BOX_PIECES, 1, 2>
|
||||
public:
|
||||
LIR_HEADER(CallGeneric)
|
||||
|
||||
LCallGeneric(const LAllocation &func, const LDefinition &nargsreg,
|
||||
const LDefinition &tmpobjreg)
|
||||
LCallGeneric(const LAllocation &func, uint32_t argslot,
|
||||
const LDefinition &nargsreg, const LDefinition &tmpobjreg)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
setOperand(0, func);
|
||||
setTemp(0, nargsreg);
|
||||
@ -1065,7 +1076,8 @@ class LCallKnown : public LJSCallInstructionHelper<BOX_PIECES, 1, 1>
|
||||
public:
|
||||
LIR_HEADER(CallKnown)
|
||||
|
||||
LCallKnown(const LAllocation &func, const LDefinition &tmpobjreg)
|
||||
LCallKnown(const LAllocation &func, uint32_t argslot, const LDefinition &tmpobjreg)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
setOperand(0, func);
|
||||
setTemp(0, tmpobjreg);
|
||||
@ -1085,8 +1097,10 @@ class LCallNative : public LJSCallInstructionHelper<BOX_PIECES, 0, 4>
|
||||
public:
|
||||
LIR_HEADER(CallNative)
|
||||
|
||||
LCallNative(const LDefinition &argContext, const LDefinition &argUintN,
|
||||
LCallNative(uint32_t argslot,
|
||||
const LDefinition &argContext, const LDefinition &argUintN,
|
||||
const LDefinition &argVp, const LDefinition &tmpreg)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
// Registers used for callWithABI().
|
||||
setTemp(0, argContext);
|
||||
@ -1117,8 +1131,10 @@ class LCallDOMNative : public LJSCallInstructionHelper<BOX_PIECES, 0, 4>
|
||||
public:
|
||||
LIR_HEADER(CallDOMNative)
|
||||
|
||||
LCallDOMNative(const LDefinition &argJSContext, const LDefinition &argObj,
|
||||
LCallDOMNative(uint32_t argslot,
|
||||
const LDefinition &argJSContext, const LDefinition &argObj,
|
||||
const LDefinition &argPrivate, const LDefinition &argArgs)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
setTemp(0, argJSContext);
|
||||
setTemp(1, argObj);
|
||||
|
@ -404,6 +404,7 @@ LIRGenerator::visitCall(MCall *call)
|
||||
return false;
|
||||
|
||||
// Height of the current argument vector.
|
||||
uint32_t argslot = call->numStackArgs();
|
||||
JSFunction *target = call->getSingleTarget();
|
||||
|
||||
// Call DOM functions.
|
||||
@ -415,9 +416,10 @@ LIRGenerator::visitCall(MCall *call)
|
||||
GetTempRegForIntArg(2, 0, &privReg);
|
||||
mozilla::DebugOnly<bool> ok = GetTempRegForIntArg(3, 0, &argsReg);
|
||||
MOZ_ASSERT(ok, "How can we not have four temp registers?");
|
||||
LCallDOMNative *lir = new(alloc()) LCallDOMNative(tempFixed(cxReg), tempFixed(objReg),
|
||||
tempFixed(privReg), tempFixed(argsReg));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
LCallDOMNative *lir = new(alloc()) LCallDOMNative(argslot, tempFixed(cxReg),
|
||||
tempFixed(objReg), tempFixed(privReg),
|
||||
tempFixed(argsReg));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
}
|
||||
|
||||
// Call known functions.
|
||||
@ -433,20 +435,21 @@ LIRGenerator::visitCall(MCall *call)
|
||||
mozilla::DebugOnly<bool> ok = GetTempRegForIntArg(3, 0, &tmpReg);
|
||||
MOZ_ASSERT(ok, "How can we not have four temp registers?");
|
||||
|
||||
LCallNative *lir = new(alloc()) LCallNative(tempFixed(cxReg), tempFixed(numReg),
|
||||
tempFixed(vpReg), tempFixed(tmpReg));
|
||||
LCallNative *lir = new(alloc()) LCallNative(argslot, tempFixed(cxReg),
|
||||
tempFixed(numReg),
|
||||
tempFixed(vpReg),
|
||||
tempFixed(tmpReg));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
}
|
||||
|
||||
LCallKnown *lir = new(alloc()) LCallKnown(useFixed(call->getFunction(), CallTempReg0),
|
||||
tempFixed(CallTempReg2));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
argslot, tempFixed(CallTempReg2));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
}
|
||||
|
||||
// Call anything, using the most generic code.
|
||||
LCallGeneric *lir = new(alloc()) LCallGeneric(useFixed(call->getFunction(), CallTempReg0),
|
||||
tempFixed(ArgumentsRectifierReg),
|
||||
tempFixed(CallTempReg2));
|
||||
argslot, tempFixed(ArgumentsRectifierReg), tempFixed(CallTempReg2));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user