From: Dragan Mladjenovic Date: Fri, 9 Mar 2018 06:58:43 +0000 (+0100) Subject: Bug 1444303 : [MIPS] Fix build failures after Bug 1425580 part 17; r=jandem X-Git-Tag: archive/raspbian/60.4.0esr-1+rpi1~1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6452033e9ca0702a9cb52a9cf3ef3df4f0d30af7;p=firefox-esr.git Bug 1444303 : [MIPS] Fix build failures after Bug 1425580 part 17; r=jandem Gbp-Pq: Topic porting Gbp-Pq: Name Bug-1444303-MIPS-Fix-build-failures-after-Bug-142558.patch --- diff --git a/js/src/jit/mips-shared/LIR-mips-shared.h b/js/src/jit/mips-shared/LIR-mips-shared.h index 43decd1e2c0..92a09732721 100644 --- a/js/src/jit/mips-shared/LIR-mips-shared.h +++ b/js/src/jit/mips-shared/LIR-mips-shared.h @@ -16,7 +16,9 @@ class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0> public: LIR_HEADER(WasmUint32ToDouble) - LWasmUint32ToDouble(const LAllocation& input) { + LWasmUint32ToDouble(const LAllocation& input) + : LInstructionHelper(classOpcode) + { setOperand(0, input); } }; @@ -27,7 +29,9 @@ class LWasmUint32ToFloat32 : public LInstructionHelper<1, 1, 0> public: LIR_HEADER(WasmUint32ToFloat32) - LWasmUint32ToFloat32(const LAllocation& input) { + LWasmUint32ToFloat32(const LAllocation& input) + : LInstructionHelper(classOpcode) + { setOperand(0, input); } }; @@ -38,8 +42,9 @@ class LDivI : public LBinaryMath<1> public: LIR_HEADER(DivI); - LDivI(const LAllocation& lhs, const LAllocation& rhs, - const LDefinition& temp) { + LDivI(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) + : LBinaryMath(classOpcode) + { setOperand(0, lhs); setOperand(1, rhs); setTemp(0, temp); @@ -58,7 +63,8 @@ class LDivPowTwoI : public LInstructionHelper<1, 1, 1> LIR_HEADER(DivPowTwoI) LDivPowTwoI(const LAllocation& lhs, int32_t shift, const LDefinition& temp) - : shift_(shift) + : LInstructionHelper(classOpcode), + shift_(shift) { setOperand(0, lhs); setTemp(0, temp); @@ -67,11 +73,9 @@ class LDivPowTwoI : public LInstructionHelper<1, 1, 1> const LAllocation* numerator() { return getOperand(0); } - - int32_t shift() { + int32_t shift() const { return shift_; } - MDiv* mir() const { return mir_->toDiv(); } @@ -82,8 +86,8 @@ class LModI : public LBinaryMath<1> public: LIR_HEADER(ModI); - LModI(const LAllocation& lhs, const LAllocation& rhs, - const LDefinition& callTemp) + LModI(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& callTemp) + : LBinaryMath(classOpcode) { setOperand(0, lhs); setOperand(1, rhs); @@ -93,7 +97,6 @@ class LModI : public LBinaryMath<1> const LDefinition* callTemp() { return getTemp(0); } - MMod* mir() const { return mir_->toMod(); } @@ -105,17 +108,17 @@ class LModPowTwoI : public LInstructionHelper<1, 1, 0> public: LIR_HEADER(ModPowTwoI); - int32_t shift() - { - return shift_; - } LModPowTwoI(const LAllocation& lhs, int32_t shift) - : shift_(shift) + : LInstructionHelper(classOpcode), + shift_(shift) { setOperand(0, lhs); } + int32_t shift() const { + return shift_; + } MMod* mir() const { return mir_->toMod(); } @@ -130,7 +133,8 @@ class LModMaskI : public LInstructionHelper<1, 1, 2> LModMaskI(const LAllocation& lhs, const LDefinition& temp0, const LDefinition& temp1, int32_t shift) - : shift_(shift) + : LInstructionHelper(classOpcode), + shift_(shift) { setOperand(0, lhs); setTemp(0, temp0); @@ -140,7 +144,6 @@ class LModMaskI : public LInstructionHelper<1, 1, 2> int32_t shift() const { return shift_; } - MMod* mir() const { return mir_->toMod(); } @@ -153,7 +156,9 @@ class LTableSwitch : public LInstructionHelper<0, 1, 2> LIR_HEADER(TableSwitch); LTableSwitch(const LAllocation& in, const LDefinition& inputCopy, - const LDefinition& jumpTablePointer, MTableSwitch* ins) { + const LDefinition& jumpTablePointer, MTableSwitch* ins) + : LInstructionHelper(classOpcode) + { setOperand(0, in); setTemp(0, inputCopy); setTemp(1, jumpTablePointer); @@ -163,7 +168,6 @@ class LTableSwitch : public LInstructionHelper<0, 1, 2> MTableSwitch* mir() const { return mir_->toTableSwitch(); } - const LAllocation* index() { return getOperand(0); } @@ -185,6 +189,7 @@ class LTableSwitchV : public LInstructionHelper<0, BOX_PIECES, 3> LTableSwitchV(const LBoxAllocation& input, const LDefinition& inputCopy, const LDefinition& floatCopy, const LDefinition& jumpTablePointer, MTableSwitch* ins) + : LInstructionHelper(classOpcode) { setBoxOperand(InputValue, input); setTemp(0, inputCopy); @@ -215,6 +220,10 @@ class LMulI : public LBinaryMath<0> public: LIR_HEADER(MulI); + LMulI() + : LBinaryMath(classOpcode) + {} + MMul* mir() { return mir_->toMul(); } @@ -225,6 +234,10 @@ class LUDivOrMod : public LBinaryMath<0> public: LIR_HEADER(UDivOrMod); + LUDivOrMod() + : LBinaryMath(classOpcode) + {} + MBinaryArithInstruction* mir() const { MOZ_ASSERT(mir_->isDiv() || mir_->isMod()); return static_cast(mir_); @@ -259,12 +272,14 @@ class LWasmUnalignedLoadBase : public details::LWasmLoadBase public: typedef LWasmLoadBase Base; - explicit LWasmUnalignedLoadBase(const LAllocation& ptr, const LDefinition& valueHelper) - : Base(ptr, LAllocation()) + explicit LWasmUnalignedLoadBase(LNode::Opcode opcode, const LAllocation& ptr, + const LDefinition& valueHelper) + : Base(opcode, ptr, LAllocation()) { Base::setTemp(0, LDefinition::BogusTemp()); Base::setTemp(1, valueHelper); } + const LAllocation* ptr() { return Base::getOperand(0); } @@ -278,19 +293,21 @@ class LWasmUnalignedLoadBase : public details::LWasmLoadBase class LWasmUnalignedLoad : public details::LWasmUnalignedLoadBase<1> { public: + LIR_HEADER(WasmUnalignedLoad); + explicit LWasmUnalignedLoad(const LAllocation& ptr, const LDefinition& valueHelper) - : LWasmUnalignedLoadBase(ptr, valueHelper) + : LWasmUnalignedLoadBase(classOpcode, ptr, valueHelper) {} - LIR_HEADER(WasmUnalignedLoad); }; class LWasmUnalignedLoadI64 : public details::LWasmUnalignedLoadBase { public: + LIR_HEADER(WasmUnalignedLoadI64); + explicit LWasmUnalignedLoadI64(const LAllocation& ptr, const LDefinition& valueHelper) - : LWasmUnalignedLoadBase(ptr, valueHelper) + : LWasmUnalignedLoadBase(classOpcode, ptr, valueHelper) {} - LIR_HEADER(WasmUnalignedLoadI64); }; namespace details { @@ -305,12 +322,15 @@ class LWasmUnalignedStoreBase : public LInstructionHelper<0, NumOps, 2> static const size_t PtrIndex = 0; static const size_t ValueIndex = 1; - LWasmUnalignedStoreBase(const LAllocation& ptr, const LDefinition& valueHelper) + LWasmUnalignedStoreBase(LNode::Opcode opcode, const LAllocation& ptr, + const LDefinition& valueHelper) + : Base(opcode) { Base::setOperand(0, ptr); Base::setTemp(0, LDefinition::BogusTemp()); Base::setTemp(1, valueHelper); } + MWasmStore* mir() const { return Base::mir_->toWasmStore(); } @@ -328,12 +348,14 @@ class LWasmUnalignedStore : public details::LWasmUnalignedStoreBase<2> { public: LIR_HEADER(WasmUnalignedStore); + LWasmUnalignedStore(const LAllocation& ptr, const LAllocation& value, const LDefinition& valueHelper) - : LWasmUnalignedStoreBase(ptr, valueHelper) + : LWasmUnalignedStoreBase(classOpcode, ptr, valueHelper) { setOperand(1, value); } + const LAllocation* value() { return Base::getOperand(ValueIndex); } @@ -345,10 +367,11 @@ class LWasmUnalignedStoreI64 : public details::LWasmUnalignedStoreBase<1 + INT64 LIR_HEADER(WasmUnalignedStoreI64); LWasmUnalignedStoreI64(const LAllocation& ptr, const LInt64Allocation& value, const LDefinition& valueHelper) - : LWasmUnalignedStoreBase(ptr, valueHelper) + : LWasmUnalignedStoreBase(classOpcode, ptr, valueHelper) { setInt64Operand(1, value); } + const LInt64Allocation value() { return getInt64Operand(ValueIndex); } @@ -359,7 +382,9 @@ class LWasmCompareExchangeI64 : public LInstructionHelpertoWasmAtomicBinopHeap(); } diff --git a/js/src/jit/mips32/LIR-mips32.h b/js/src/jit/mips32/LIR-mips32.h index eafa288521c..64e55a48d35 100644 --- a/js/src/jit/mips32/LIR-mips32.h +++ b/js/src/jit/mips32/LIR-mips32.h @@ -18,7 +18,8 @@ class LBoxFloatingPoint : public LInstructionHelper<2, 1, 1> LIR_HEADER(BoxFloatingPoint); LBoxFloatingPoint(const LAllocation& in, const LDefinition& temp, MIRType type) - : type_(type) + : LInstructionHelper(classOpcode), + type_(type) { setOperand(0, in); setTemp(0, temp); @@ -37,6 +38,10 @@ class LUnbox : public LInstructionHelper<1, 2, 0> public: LIR_HEADER(Unbox); + LUnbox() + : LInstructionHelper(classOpcode) + {} + MUnbox* mir() const { return mir_->toUnbox(); } @@ -61,7 +66,8 @@ class LUnboxFloatingPoint : public LInstructionHelper<1, 2, 0> static const size_t Input = 0; LUnboxFloatingPoint(const LBoxAllocation& input, MIRType type) - : type_(type) + : LInstructionHelper(classOpcode), + type_(type) { setBoxOperand(Input, input); } @@ -69,7 +75,6 @@ class LUnboxFloatingPoint : public LInstructionHelper<1, 2, 0> MUnbox* mir() const { return mir_->toUnbox(); } - MIRType type() const { return type_; } @@ -87,14 +92,17 @@ class LDivOrModI64 : public LCallInstructionHelperisDiv() || mir_->isMod()); return static_cast(mir_); } + bool canBeDivideByZero() const { if (mir_->isMod()) return mir_->toMod()->canBeDivideByZero(); @@ -122,6 +130,7 @@ class LUDivOrModI64 : public LCallInstructionHelperisDiv() || mir_->isMod()); return static_cast(mir_); } + bool canBeDivideByZero() const { if (mir_->isMod()) return mir_->toMod()->canBeDivideByZero(); @@ -154,6 +164,7 @@ class LWasmTruncateToInt64 : public LCallInstructionHelper LIR_HEADER(WasmTruncateToInt64); explicit LWasmTruncateToInt64(const LAllocation& in) + : LCallInstructionHelper(classOpcode) { setOperand(0, in); } @@ -168,7 +179,9 @@ class LInt64ToFloatingPoint : public LCallInstructionHelper<1, INT64_PIECES, 0> public: LIR_HEADER(Int64ToFloatingPoint); - explicit LInt64ToFloatingPoint(const LInt64Allocation& in) { + explicit LInt64ToFloatingPoint(const LInt64Allocation& in) + : LCallInstructionHelper(classOpcode) + { setInt64Operand(0, in); } @@ -183,6 +196,7 @@ class LWasmAtomicLoadI64 : public LInstructionHelper LIR_HEADER(WasmAtomicLoadI64); LWasmAtomicLoadI64(const LAllocation& ptr) + : LInstructionHelper(classOpcode) { setOperand(0, ptr); } @@ -200,7 +214,9 @@ class LWasmAtomicStoreI64 : public LInstructionHelper<0, 1 + INT64_PIECES, 1> public: LIR_HEADER(WasmAtomicStoreI64); - LWasmAtomicStoreI64(const LAllocation& ptr, const LInt64Allocation& value, const LDefinition& tmp) + LWasmAtomicStoreI64(const LAllocation& ptr, const LInt64Allocation& value, + const LDefinition& tmp) + : LInstructionHelper(classOpcode) { setOperand(0, ptr); setInt64Operand(1, value); diff --git a/js/src/jit/mips64/LIR-mips64.h b/js/src/jit/mips64/LIR-mips64.h index 09630430ff3..2056eea3309 100644 --- a/js/src/jit/mips64/LIR-mips64.h +++ b/js/src/jit/mips64/LIR-mips64.h @@ -12,10 +12,19 @@ namespace jit { class LUnbox : public LInstructionHelper<1, 1, 0> { + protected: + LUnbox(LNode::Opcode opcode, const LAllocation& input) + : LInstructionHelper(opcode) + { + setOperand(0, input); + } + public: LIR_HEADER(Unbox); - explicit LUnbox(const LAllocation& input) { + explicit LUnbox(const LAllocation& input) + : LInstructionHelper(classOpcode) + { setOperand(0, input); } @@ -37,7 +46,7 @@ class LUnboxFloatingPoint : public LUnbox LIR_HEADER(UnboxFloatingPoint); LUnboxFloatingPoint(const LAllocation& input, MIRType type) - : LUnbox(input), + : LUnbox(classOpcode, input), type_(type) { } @@ -51,7 +60,9 @@ class LDivOrModI64 : public LBinaryMath<1> public: LIR_HEADER(DivOrModI64) - LDivOrModI64(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) { + LDivOrModI64(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) + : LBinaryMath(classOpcode) + { setOperand(0, lhs); setOperand(1, rhs); setTemp(0, temp); @@ -60,11 +71,11 @@ class LDivOrModI64 : public LBinaryMath<1> const LDefinition* remainder() { return getTemp(0); } - MBinaryArithInstruction* mir() const { MOZ_ASSERT(mir_->isDiv() || mir_->isMod()); return static_cast(mir_); } + bool canBeDivideByZero() const { if (mir_->isMod()) return mir_->toMod()->canBeDivideByZero(); @@ -88,7 +99,9 @@ class LUDivOrModI64 : public LBinaryMath<1> public: LIR_HEADER(UDivOrModI64); - LUDivOrModI64(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) { + LUDivOrModI64(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) + : LBinaryMath(classOpcode) + { setOperand(0, lhs); setOperand(1, rhs); setTemp(0, temp); @@ -97,7 +110,6 @@ class LUDivOrModI64 : public LBinaryMath<1> const LDefinition* remainder() { return getTemp(0); } - const char* extraName() const { return mir()->isTruncated() ? "Truncated" : nullptr; } @@ -106,7 +118,6 @@ class LUDivOrModI64 : public LBinaryMath<1> MOZ_ASSERT(mir_->isDiv() || mir_->isMod()); return static_cast(mir_); } - bool canBeDivideByZero() const { if (mir_->isMod()) return mir_->toMod()->canBeDivideByZero(); @@ -125,7 +136,9 @@ class LWasmTruncateToInt64 : public LInstructionHelper<1, 1, 0> public: LIR_HEADER(WasmTruncateToInt64); - explicit LWasmTruncateToInt64(const LAllocation& in) { + explicit LWasmTruncateToInt64(const LAllocation& in) + : LInstructionHelper(classOpcode) + { setOperand(0, in); } @@ -139,7 +152,9 @@ class LInt64ToFloatingPoint : public LInstructionHelper<1, 1, 0> public: LIR_HEADER(Int64ToFloatingPoint); - explicit LInt64ToFloatingPoint(const LInt64Allocation& in) { + explicit LInt64ToFloatingPoint(const LInt64Allocation& in) + : LInstructionHelper(classOpcode) + { setInt64Operand(0, in); }